I've attached an updated test rules file for this patch.
It's a bit cleaner
- no double run of configure
- uses cleaner conditionals


Regards,
Roger

-- 
  .''`.  Roger Leigh
 : :' :  Debian GNU/Linux             http://people.debian.org/~rleigh/
 `. `'   Printing on GNU/Linux?       http://gutenprint.sourceforge.net/
   `-    GPG Public Key: 0x25BFB848   Please GPG sign your mail.
#!/usr/bin/make -f

DEB_HOST_ARCH_OS    ?= $(shell dpkg-architecture -qDEB_HOST_ARCH_OS)

ifneq ($(DEB_HOST_ARCH_OS),linux)
        LVMSNAP_OPTIONS = --disable-lvm-snapshot
        BTRFSSNAP_OPTIONS = --disable-btrfs-snapshot
else
        LVMSNAP_OPTIONS = --enable-lvm-snapshot
        BTRFSSNAP_OPTIONS = --enable-btrfs-snapshot
endif

%:
        /home/rleigh/coding/debhelper/dh $@ --with autotools_dev 
--builddirectory=debian/build --parallel

CFLAGS = -Wall -g

ifneq (,$(filter noopt,$(DEB_BUILD_OPTIONS)))
        CFLAGS += -O0
else
        CFLAGS += -O2
endif

override_dh_auto_configure: debian/build/config.status

debian/build/config.status:
        dh_auto_configure -- \
          --libexecdir=/usr/lib \
          --enable-dchroot --enable-dchroot-dsa \
          --enable-static --disable-shared \
          --with-bash-completion-dir=/etc/bash_completion.d \
          $(LVMSNAP_OPTIONS) $(BTRFSSNAP_OPTIONS) \
          BTRFS=/sbin/btrfs \
          BTRFSCTL=/sbin/btrfsctl \
          LVCREATE=/sbin/lvcreate \
          LVREMOVE=/sbin/lvremove

override_dh_auto_build:
ifneq (,$(shell dh_listpackages -a 2>/dev/null))
        $(MAKE) -C debian/build all
endif
ifneq (,$(shell dh_listpackages -i 2>/dev/null))
        $(MAKE) -C debian/build doc
endif

override_dh_auto_test:
ifneq (,$(shell dh_listpackages -a 2>/dev/null))
        dh_auto_test
endif

override_dh_auto_install:
ifneq (,$(shell dh_listpackages -a 2>/dev/null))
        $(MAKE) -C debian/build install DESTDIR=$(CURDIR)/debian/install
endif
ifneq (,$(filter dchroot, $(shell dh_listpackages)))
        mkdir -p $(CURDIR)/debian/dchroot/usr/share/lintian/overrides
        cp $(CURDIR)/debian/dchroot.lintian-overrides 
$(CURDIR)/debian/dchroot/usr/share/lintian/overrides/dchroot
endif
ifneq (,$(filter dchroot-dsa, $(shell dh_listpackages)))
        mkdir -p $(CURDIR)/debian/dchroot-dsa/usr/share/lintian/overrides
        cp $(CURDIR)/debian/dchroot-dsa.lintian-overrides 
$(CURDIR)/debian/dchroot-dsa/usr/share/lintian/overrides/dchroot-dsa
endif
ifneq (,$(filter schroot, $(shell dh_listpackages)))
        mkdir -p $(CURDIR)/debian/schroot/usr/share/lintian/overrides
        cp $(CURDIR)/debian/schroot.lintian-overrides 
$(CURDIR)/debian/schroot/usr/share/lintian/overrides/schroot
endif
ifneq (,$(filter schroot-common, $(shell dh_listpackages)))
        $(MAKE) -C debian/build/po install DESTDIR=$(CURDIR)/debian/install
endif

override_dh_installchangelogs:
        dh_installchangelogs ChangeLog

override_dh_installdocs:
        dh_installdocs
ifneq (,$(filter dchroot, $(shell dh_listpackages)))
        rm -rf $(CURDIR)/debian/dchroot/usr/share/doc/dchroot
        ln -sf schroot $(CURDIR)/debian/dchroot/usr/share/doc/dchroot
endif
ifneq (,$(filter dchroot-dsa, $(shell dh_listpackages)))
        rm -rf $(CURDIR)/debian/dchroot-dsa/usr/share/doc/dchroot-dsa
        ln -sf schroot $(CURDIR)/debian/dchroot-dsa/usr/share/doc/dchroot-dsa
endif
ifneq (,$(filter libsbuild-doc, $(shell dh_listpackages)))
        find $(CURDIR)/debian/libsbuild-doc/usr/share/doc/libsbuild-doc -name 
'*.map' -print0 | xargs -0 rm -f
        find $(CURDIR)/debian/libsbuild-doc/usr/share/doc/libsbuild-doc -name 
'*.md5' -print0 | xargs -0 rm -f
endif

override_dh_fixperms:
        dh_fixperms
ifneq (,$(filter dchroot, $(shell dh_listpackages)))
        chmod 4755 $(CURDIR)/debian/dchroot/usr/bin/dchroot
endif
ifneq (,$(filter dchroot-dsa, $(shell dh_listpackages)))
        chmod 4755 $(CURDIR)/debian/dchroot-dsa/usr/bin/dchroot-dsa
endif
ifneq (,$(filter schroot, $(shell dh_listpackages)))
        chmod 4755 $(CURDIR)/debian/schroot/usr/bin/schroot
endif

override_dh_installinit:
        dh_installinit --no-start --update-rcd-params='start 75 S .'

override_dh_strip:
        dh_strip --dbg-package=schroot-dbg

Attachment: signature.asc
Description: Digital signature

Reply via email to