$(MAKE) -C $$s -i distclean || \
$(MAKE) -C $$s -f Makefile.in distclean; \
done
- rm -rf *~ debian/tmp debian/*~ debian/files* debian/substvars*
- rm -rf debian/sv-* debian/*.debhelper.log
+ rm -rf debian/sv-*
+ dh_clean
binary-prep:
$(checkdir)
rm -rf debian/tmp*
+ # 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.
#
+ # Chown'ing from your own user/group to itself is always allowed,
+ # so we pass that via id -u/-g.
set -e; for s in $(subdirs_build_arch) $(subdirs_nobuild); do \
$(MAKE) -C $$s install install-docs install-examples \
prefix=$t/$$s/usr \
etcdir=$t/$$s/etc \
varlib=$t/$$s/var/lib \
- mandir=$t/$$s/usr/share/man; \
+ mandir=$t/$$s/usr/share/man \
+ SYSTEM_USER=$$(id -u) \
+ SYSTEM_GROUP=$$(id -g); \
done
#
mv $t/cprogs $t/chiark-utils-bin
#
gzip -9fn $t/*/usr/share/man/man*/*
-binary-hook-chiark-backup:
-binary-hook-chiark-rwbuffer:
-binary-hook-sync-accounts:
-binary-hook-chiark-scripts:
-binary-hook-chiark-really:
-binary-hook-chiark-utils-bin:
-
binary-one:
- set -e; for f in preinst postinst prerm postrm conffiles; do \
- test -f debian/$p/$$f || continue; \
- cp debian/$p/$$f $t/$p/DEBIAN/$$f; \
- chmod u=rwX,go=rX $t/$p/DEBIAN/$$f; \
- done
- dh_lintian -p$p -Pdebian/tmp/$p
- dh_link -p$p -Pdebian/tmp/$p
- dpkg-gencontrol -p$p -P$t/$p -Tdebian/sv-$p
- chown -R root.root debian/tmp
- chmod -R g-ws debian/tmp
- debian/rules binary-hook-$p
- dpkg --build $t/$p ..
-
-binary-indep: checkroot build binary-prep
+ dh_lintian -p$p -P$t/$p
+ dh_link -p$p -P$t/$p
+ dh_fixperms -p$p -P$t/$p
+ chmod u+s,o-x $t/chiark-really/usr/sbin/really
+ dh_installdeb -p$p -P$t/$p
+ dh_gencontrol -p$p -P$t/$p
+ dh_md5sums -p$p -Pdebian/tmp/$p
+ dh_builddeb -p$p -Pdebian/tmp/$p
+
+
+binary-indep: build binary-prep
set -e; for p in $(packages_indep); do \
debian/rules binary-one p=$$p; done
-binary-arch: checkroot build binary-prep
+binary-arch: build binary-prep
$(checkdir)
set -ex; for p in chiark-really chiark-utils-bin chiark-rwbuffer; do \
dh_strip -p$$p -Pdebian/tmp/$$p; done
- dpkg-shlibdeps -Tdebian/sv-chiark-rwbuffer \
- $t/chiark-rwbuffer/usr/bin/*
- dpkg-shlibdeps -Tdebian/sv-chiark-really \
- $t/chiark-really/usr/sbin/*
+ dh_shlibdeps -p chiark-rwbuffer -P$t/chiark-rwbuffer
+ dh_shlibdeps -p chiark-really -P$t/chiark-really
+
set -e; for f in $t/chiark-utils-bin/usr/bin/*; do \
case "$$f" in \
*/xbatmon-simple|*/xduplic-copier) \
esac; \
a="$$a -d$$d $$f"; \
done; set -x; \
- dpkg-shlibdeps -Tdebian/sv-chiark-utils-bin $$a
+ dh_shlibdeps -p chiark-utils-bin -P$t/chiark-utils-bin -- $$a
set -e; for p in $(packages_arch); \
do debian/rules binary-one p=$$p; done
source diff:
@echo >&2 'source and diff are obsolete - use dpkg-source -b'; false
-checkroot:
- $(checkdir)
- test root = "`whoami`"
-
-.PHONY: binary binary-arch binary-indep clean checkroot
+.PHONY: binary binary-arch binary-indep clean