Changeset 1204 in ProjectBuilder for projects/afio/pbconf/2.5/afio/deb/rules


Ignore:
Timestamp:
Feb 18, 2011, 10:28:59 AM (13 years ago)
Author:
Bruno Cornec
Message:
  • Add debian 6.0 build support and VMs
  • use --no-suggests for urpmi to allow for minimal chorrot build
  • Adapt pbinit for website to new b structure (needs to be tested)
  • add afio build for debian based distro (and build it fr latest debian 6 and ubuntu 10.10)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • projects/afio/pbconf/2.5/afio/deb/rules

    r451 r1204  
    2121
    2222ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
    23         CFLAGS += -O0
     23    CFLAGS += -O0
    2424else
    25         CFLAGS += -O2
     25    CFLAGS += -O2
    2626endif
    2727ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
    28         INSTALL_PROGRAM += -s
     28    INSTALL_PROGRAM += -s
    2929endif
    30 config.status: configure
    31         dh_testdir
    32 
    33         # Configure the package.
    34         CFLAGS="$(CFLAGS)" ./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr
    35  --mandir=\$${prefix}/share/man
    3630
    3731# Build both architecture dependent and independent
    38 build: build-arch build-indep
     32build: build-arch
    3933
    4034# Build architecture dependent
    4135build-arch: build-arch-stamp
    4236
    43 build-arch-stamp:  config.status
    44         dh_testdir
     37build-arch-stamp:
     38    dh_testdir
    4539
    46         # Compile the package.
    47         $(MAKE)
    48 
    49         touch build-stamp
    50 
    51 # Build architecture independent
    52 build-indep: build-indep-stamp
    53 
    54 build-indep-stamp:  config.status
    55         # Nothing to do, the only indep item is the manual which is available as html in original source
    56         touch build-indep-stamp
     40    # Compile the package.
     41    $(MAKE)
     42    chmod 644 script*/*
     43    touch build-stamp
    5744
    5845# Clean up
    5946clean:
    60         dh_testdir
    61         dh_testroot
    62         rm -f build-arch-stamp build-indep-stamp #CONFIGURE-STAMP#
    63         # Clean temporary document directory
    64         rm -rf debian/doc-temp
    65         # Clean up.
    66         -$(MAKE) distclean
    67         rm -f config.log
     47    dh_testdir
     48    dh_testroot
     49    rm -f build-arch-stamp #CONFIGURE-STAMP#
     50    # Clean temporary document directory
     51    rm -rf debian/doc-temp
     52    # Clean up.
     53    -$(MAKE) distclean
     54    rm -f config.log
    6855ifneq "$(wildcard /usr/share/misc/config.sub)" ""
    69         cp -f /usr/share/misc/config.sub config.sub
     56    cp -f /usr/share/misc/config.sub config.sub
    7057endif
    7158ifneq "$(wildcard /usr/share/misc/config.guess)" ""
    72         cp -f /usr/share/misc/config.guess config.guess
     59    cp -f /usr/share/misc/config.guess config.guess
    7360endif
    7461
    75         dh_clean
     62    dh_clean
    7663
    7764# Install architecture dependent and independent
    78 install: install-arch install-indep
     65install: install-arch
    7966
    8067# Install architecture dependent
    8168install-arch: build-arch
    82         dh_testdir
    83         dh_testroot
    84         dh_clean -k -s
    85         dh_installdirs -s
     69    dh_testdir
     70    dh_testroot
     71    dh_clean -k -s
     72    dh_installdirs -s
    8673
    87         # Install the package files into build directory:
    88         # - start with upstream make install
    89         $(MAKE) install prefix=$(CURDIR)/debian/$(PACKAGE_NAME)/usr mandir=$(CURDIR)/debian/$(PACKAGE_NAME)/us
    90 r/share/man
    91         # - copy html manual to temporary location for renaming
    92         mkdir -p debian/doc-temp
    93         dh_install -s
    94 
    95 # Install architecture independent
    96 install-indep: build-indep
    97         dh_testdir
    98         dh_testroot
    99         dh_clean -k -i
    100         dh_installdirs -i
    101         dh_install -i
     74    # Install the package files into build directory:
     75    dh_install -s
     76    rm -rf $(CURDIR)/debian/$(PACKAGE_NAME)
     77    mkdir -p $(CURDIR)/debian/$(PACKAGE_NAME)/usr/bin
     78    mkdir -p $(CURDIR)/debian/$(PACKAGE_NAME)/usr/share/man/man1
     79    install -p -m 755 afio $(CURDIR)/debian/$(PACKAGE_NAME)/usr/bin
     80    install -p -m 644 afio.1 $(CURDIR)/debian/$(PACKAGE_NAME)/usr/share/man/man1
    10281
    10382# Must not depend on anything. This is to be called by
     
    10584# in another 'make' thread.
    10685binary-common:
    107         dh_testdir
    108         dh_testroot
    109         dh_installchangelogs ChangeLog
    110         dh_installdocs
    111         dh_installman
    112         dh_link
    113         dh_strip
    114         dh_compress
    115         dh_fixperms
    116         dh_installdeb
    117         dh_shlibdeps
    118         dh_gencontrol
    119         dh_md5sums
    120         dh_builddeb
    121 
    122 # Build architecture independant packages using the common target.
    123 binary-indep: build-indep install-indep
    124         $(MAKE) -f debian/rules DH_OPTIONS=-i binary-common
     86    dh_testdir
     87    dh_testroot
     88    #dh_installchangelogs changelog
     89    dh_installdocs
     90    dh_installman
     91    dh_link
     92    dh_strip
     93    dh_compress
     94    dh_fixperms
     95    dh_installdeb
     96    dh_shlibdeps
     97    dh_gencontrol
     98    dh_md5sums
     99    dh_builddeb
    125100
    126101# Build architecture dependant packages using the common target.
    127102binary-arch: build-arch install-arch
    128         $(MAKE) -f debian/rules DH_OPTIONS=-a binary-common
     103    $(MAKE) -f debian/rules DH_OPTIONS=-a binary-common
    129104
    130105# Build architecture depdendent and independent packages
    131 binary: binary-arch binary-indep
     106binary: binary-arch
    132107.PHONY: clean binary
    133108
Note: See TracChangeset for help on using the changeset viewer.