Changeset 933


Ignore:
Timestamp:
12/05/09 18:32:59 (3 years ago)
Author:
bruno
Message:
  • Improves debian build (tab/space were mixed)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • devel/pb/lib/ProjectBuilder/Env.pm

    r916 r933  
    6868 
    6969if (! -f $ENV{'PBETC'}) { 
    70     pb_log(0, "No existing $ENV{'PBETC'} found, creating one as template"); 
     70    pb_log(0, "No existing $ENV{'PBETC'} found, creating one as template\n"); 
    7171    open(PBRC, "> $ENV{'PBETC'}") || die "Unable to create $ENV{'PBETC'}"; 
    7272    print PBRC << "EOF"; 
     
    221221if ($action =~ /^newproj$/) { 
    222222    if (! -d "$ENV{'PBDEFDIR'}/$ENV{'PBPROJ'}") { 
     223        # TODO: There is also the need to do  
     224        # svn import "$ENV{'PBDEFDIR'}/$ENV{'PBPROJ'}" svn://repo 
     225        # in case it doesn't exist there 
    223226        pb_mkdir_p("$ENV{'PBDEFDIR'}/$ENV{'PBPROJ'}") || die "Unable to recursively create $ENV{'PBDEFDIR'}/$ENV{'PBPROJ'}"; 
    224227    } 
     
    309312 
    310313        # List of pkg to build by default (mandatory) 
     314        # TODO: projtag could be with a 1 default value 
    311315        my ($defpkgdir,$pbpackager, $pkgv, $pkgt) = pb_conf_get("defpkgdir","pbpackager","projver","projtag"); 
    312316        # List of additional pkg to build when all is called (optional) 
     
    558562 
    559563# PBDESC contains the description of the package 
    560 #filter PBDESC = "Bla-Bla" 
     564#filter PBDESC = Bla-Bla 
    561565 
    562566# PBSUMMARY contains a short single line description of the package 
    563 #filter PBSUMMARY = "Bla" 
     567#filter PBSUMMARY = Bla 
    564568 
    565569# PBURL contains the URL of the Web site of the project 
     
    785789                open(CONF,"> $ENV{'PBROOTDIR'}/$pp/deb/compat") || die "Unable to create $ENV{'PBROOTDIR'}/$pp/deb/compat"; 
    786790                print CONF << "EOF"; 
    787 DBDEBCOMP 
     791PBDEBCOMP 
    788792EOF 
    789793                close(CONF); 
     
    825829 
    826830ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) 
    827         CFLAGS += -O0 
     831    CFLAGS += -O0 
    828832else 
    829         CFLAGS += -O2 
     833    CFLAGS += -O2 
    830834endif 
    831835ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS))) 
    832         INSTALL_PROGRAM += -s 
     836    INSTALL_PROGRAM += -s 
    833837endif 
    834838config.status: configure 
    835         dh_testdir 
    836  
    837         # Configure the package. 
    838         CFLAGS="$(CFLAGS)" ./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr 
     839    dh_testdir 
     840 
     841    # Configure the package. 
     842    CFLAGS="$(CFLAGS)" ./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr 
    839843 --mandir=\$${prefix}/share/man 
    840844 
     
    846850 
    847851build-arch-stamp:  config.status 
    848         dh_testdir 
    849  
    850         # Compile the package. 
    851         $(MAKE) 
    852  
    853         touch build-stamp 
     852    dh_testdir 
     853 
     854    # Compile the package. 
     855    $(MAKE) 
     856 
     857    touch build-stamp 
    854858 
    855859# Build architecture independent 
     
    857861 
    858862build-indep-stamp:  config.status 
    859         # Nothing to do, the only indep item is the manual which is available as html in original source 
    860         touch build-indep-stamp 
     863    # Nothing to do, the only indep item is the manual which is available as html in original source 
     864    touch build-indep-stamp 
    861865 
    862866# Clean up 
    863867clean: 
    864         dh_testdir 
    865         dh_testroot 
    866         rm -f build-arch-stamp build-indep-stamp #CONFIGURE-STAMP# 
    867         # Clean temporary document directory 
    868         rm -rf debian/doc-temp 
    869         # Clean up. 
    870         -$(MAKE) distclean 
    871         rm -f config.log 
     868    dh_testdir 
     869    dh_testroot 
     870    rm -f build-arch-stamp build-indep-stamp #CONFIGURE-STAMP# 
     871    # Clean temporary document directory 
     872    rm -rf debian/doc-temp 
     873    # Clean up. 
     874    -$(MAKE) distclean 
     875    rm -f config.log 
    872876ifneq "$(wildcard /usr/share/misc/config.sub)" "" 
    873         cp -f /usr/share/misc/config.sub config.sub 
     877    cp -f /usr/share/misc/config.sub config.sub 
    874878endif 
    875879ifneq "$(wildcard /usr/share/misc/config.guess)" "" 
    876         cp -f /usr/share/misc/config.guess config.guess 
     880    cp -f /usr/share/misc/config.guess config.guess 
    877881endif 
    878882 
    879         dh_clean 
     883    dh_clean 
    880884 
    881885# Install architecture dependent and independent 
     
    884888# Install architecture dependent 
    885889install-arch: build-arch 
    886         dh_testdir 
    887         dh_testroot 
    888         dh_clean -k -s 
    889         dh_installdirs -s 
    890  
    891         # Install the package files into build directory: 
    892         # - start with upstream make install 
    893         $(MAKE) install prefix=$(CURDIR)/debian/$(PACKAGE_NAME)/usr mandir=$(CURDIR)/debian/$(PACKAGE_NAME)/us 
    894 r/share/man 
    895         # - copy html manual to temporary location for renaming 
    896         mkdir -p debian/doc-temp 
    897         dh_install -s 
     890    dh_testdir 
     891    dh_testroot 
     892    dh_clean -k -s 
     893    dh_installdirs -s 
     894 
     895    # Install the package files into build directory: 
     896    # - start with upstream make install 
     897    $(MAKE) install prefix=$(CURDIR)/debian/$(PACKAGE_NAME)/usr mandir=$(CURDIR)/debian/$(PACKAGE_NAME)/usr/share/man 
     898    # - copy html manual to temporary location for renaming 
     899    mkdir -p debian/doc-temp 
     900    dh_install -s 
    898901 
    899902# Install architecture independent 
    900903install-indep: build-indep 
    901         dh_testdir 
    902         dh_testroot 
    903         dh_clean -k -i 
    904         dh_installdirs -i 
    905         dh_install -i 
     904    dh_testdir 
     905    dh_testroot 
     906    dh_clean -k -i 
     907    dh_installdirs -i 
     908    dh_install -i 
    906909 
    907910# Must not depend on anything. This is to be called by 
     
    909912# in another 'make' thread. 
    910913binary-common: 
    911         dh_testdir 
    912         dh_testroot 
    913         dh_installchangelogs ChangeLog 
    914         dh_installdocs 
    915         dh_installman 
    916         dh_link 
    917         dh_strip 
    918         dh_compress 
    919         dh_fixperms 
    920         dh_installdeb 
    921         dh_shlibdeps 
    922         dh_gencontrol 
    923         dh_md5sums 
    924         dh_builddeb 
     914    dh_testdir 
     915    dh_testroot 
     916    dh_installchangelogs ChangeLog 
     917    dh_installdocs 
     918    dh_installman 
     919    dh_link 
     920    dh_strip 
     921    dh_compress 
     922    dh_fixperms 
     923    dh_installdeb 
     924    dh_shlibdeps 
     925    dh_gencontrol 
     926    dh_md5sums 
     927    dh_builddeb 
    925928 
    926929# Build architecture independant packages using the common target. 
    927930binary-indep: build-indep install-indep 
    928         $(MAKE) -f debian/rules DH_OPTIONS=-i binary-common 
     931    $(MAKE) -f debian/rules DH_OPTIONS=-i binary-common 
    929932 
    930933# Build architecture dependant packages using the common target. 
    931934binary-arch: build-arch install-arch 
    932         $(MAKE) -f debian/rules DH_OPTIONS=-a binary-common 
     935    $(MAKE) -f debian/rules DH_OPTIONS=-a binary-common 
    933936 
    934937# Build architecture depdendent and independent packages 
Note: See TracChangeset for help on using the changeset viewer.