chiark / gitweb /
d/rules: Use dh sequencer
authorNiels Thykier <niels@thykier.net>
Sun, 12 Jan 2025 18:41:30 +0000 (18:41 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 12 Jan 2025 20:11:22 +0000 (20:11 +0000)
Closes: #1089303
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
debian/rules

index 56ac6a4b945b3e4439a763b1fb5c46984ccb5a26..a5900c8fdc8b3589aa06f1f877ba4ecea2d7b5bf 100755 (executable)
@@ -20,29 +20,24 @@ makebuildargs := OPTIMISE= DEBUG= \
  CMDLINE_CPPFLAGS="$(shell $(D_BUILDFLAGS) --get CPPFLAGS) -D_TIME_BITS=64 -D_FILE_OFFSET_BITS=64" \
  CMDLINE_LDFLAGS="$(shell $(D_BUILDFLAGS) --get LDFLAGS)"
 
-build:
-       $(checkdir)
+%:
+       dh $@
+
+override_dh_auto_build:
        set -e; for s in $(subdirs_build_arch); do \
                dh_auto_build --sourcedirectory=$$s -- all $(makebuildargs); \
        done
-       touch build
 
-build-indep: build
-build-arch: build
 
-clean:
-       $(checkdir)
+override_dh_auto_clean:
        rm -f build
        set -e; for s in $(subdirs_build_arch); do \
                $(MAKE) -C $$s -i distclean || \
                $(MAKE) -C $$s -f Makefile.in distclean; \
        done
        rm -rf debian/sv-*
-       dh_clean
 
-binary-prep:
-       $(checkdir)
-       rm -rf debian/tmp*
+override_dh_auto_install:
        # The ownership information will be reset later to root:root in
        # the `dpkg-deb` call, so the actual ownership here is of no
        # consequence as long as we are allowed to perform the action.
@@ -103,25 +98,14 @@ binary-prep:
                debian/chiark-utils-bin/usr/share/man/man8/trivsoundd.8
        rmdir   debian/chiark-utils-bin/usr/sbin
 
+       # We are not installing these. To avoid dh_missing complaining,
+       # lets just remove them (Could also be moved to debian/not-installed)
+       rm -fr debian/tmp/fishdescriptor/usr/lib/python2.7
+       rm -fr debian/tmp/fishdescriptor/usr/lib/python3
+       rm -f debian/tmp/fishdescriptor/usr/bin/fishdescriptor
+
 
-       dh_installchangelogs
-       dh_installdocs
-       dh_installman
-       dh_installexamples
-       dh_compress
-
-binary-indep:  build binary-prep
-       dh_lintian -i
-       dh_link -i
-       dh_fixperms -i
-       dh_installdeb -i
-       dh_gencontrol -i
-       dh_md5sums -i
-       dh_builddeb -i
-
-binary-arch:   build binary-prep
-       $(checkdir)
-       dh_strip
+override_dh_shlibdeps:
        dh_shlibdeps -p chiark-rwbuffer
        dh_shlibdeps -p chiark-really
 
@@ -137,24 +121,7 @@ binary-arch:       build binary-prep
                a="$$a -d$$d $$f"; \
            done; set -x; \
            dh_shlibdeps -p chiark-utils-bin -- $$a
-       dh_lintian -a
-       dh_link -a
-       dh_fixperms -a
-       chmod u+s,o-x debian/chiark-really/usr/sbin/really
-       dh_installdeb -a
-       dh_gencontrol -a
-       dh_md5sums -a
-       dh_builddeb -a
-
-define checkdir
-       test -f cprogs/writebuffer.c
-endef
 
-# Below here is fairly generic really
 
-binary:                binary-indep binary-arch
-
-source diff:
-       @echo >&2 'source and diff are obsolete - use dpkg-source -b'; false
-
-.PHONY: binary binary-arch binary-indep clean
+execute_after_dh_fixperms:
+       chmod u+s,o-x debian/chiark-really/usr/sbin/really