--- /dev/null
+#!/bin/sh
+
+# Abort on error.
+set -e
+
+if [ -x /usr/sbin/update-initramfs -a \
+ -e /etc/initramfs-tools/initramfs.conf ]; then
+ update-initramfs -u
+fi
+
+#DEBHELPER#
+
+# debhelper doesn't know what timers are...
+update_svc() {
+ deb-systemd-helper unmask "$1" >/dev/null || true
+
+ if deb-systemd-helper --quiet was-enabled "$1"; then
+ deb-systemd-helper enable "$1" >/dev/null || true
+ else
+ deb-systemd-helper update-state "$1" >/dev/null || true
+ fi
+}
+update_svc e2scrub_all.timer
+update_svc e2scrub_reap.service
+
+# Start our new services
+if [ -d /run/systemd/system ]; then
+ systemctl --system daemon-reload >/dev/null || true
+ deb-systemd-invoke start e2scrub_all.timer >/dev/null || true
+fi
+
+exit 0
--- /dev/null
+#!/bin/sh
+
+update_svc() {
+ deb-systemd-helper mask "$1" >/dev/null || true
+
+ if deb-systemd-helper --quiet was-enabled "$1"; then
+ # Enables the unit on first installation, creates new
+ # symlinks on upgrades if the unit file has changed.
+ deb-systemd-helper disable "$1" >/dev/null || true
+ fi
+}
+
+if [ "$1" != "upgrade" ]; then
+ # Abort on error.
+ set -e
+
+ if [ -x /usr/sbin/update-initramfs -a \
+ -e /etc/initramfs-tools/initramfs.conf ]; then
+ update-initramfs -u
+ fi
+
+ #DEBHELPER#
+
+ # debhelper doesn't know what timers are...
+ update_svc e2scrub_all.timer
+ update_svc e2scrub_reap.service
+
+ # Start our new services
+ if [ -d /run/systemd/system ]; then
+ deb-systemd-invoke stop e2scrub_all.timer >/dev/null || true
+ fi
+fi
+
+exit 0
+
DH_VERSION := $(shell dpkg-query -W -f '$${Version}' debhelper)
+USE_DH9 ?= $(shell if dpkg --compare-versions $(DH_VERSION) lt 11 ; then echo yes ; fi)
+
# USE_DBGSYM :=
USE_DBGSYM ?= $(shell if dpkg --compare-versions $(DH_VERSION) ">=" 9.20160114 ; then echo yes ; fi)
UDEB_PRIORITY ?= $(shell grep '^Package: e2fsprogs-udeb' debian/control -A 10 | grep ^Priority: | cut -d ' ' -f 2)
STAMPSDIR ?= debian/stampdir
+CFGDH ?= ${STAMPSDIR}/configure-dh
CFGSTDSTAMP ?= ${STAMPSDIR}/configure-std-stamp
CFGBFSTAMP ?= ${STAMPSDIR}/configure-bf-stamp
BUILDSTDSTAMP ?= ${STAMPSDIR}/build-std-stamp
mv debian/control.save debian/control ; \
fi
-${CFGSTDSTAMP}:
+${CFGDH}:
+ifeq ($(USE_DH9),yes)
+ mv debian/compat debian/compat.save
+ echo 9 > debian/compat
+ mv debian/e2fsprogs.postinst debian/e2fsprogs.postinst.save
+ cp debian/e2fsprogs.postinst.dh9 debian/e2fsprogs.postinst
+ cp debian/e2fsprogs.postrm.dh9 debian/e2fsprogs.postrm
+endif
+ mkdir -p ${STAMPSDIR}
+ touch ${CFGDH}
+
+${CFGSTDSTAMP}: ${CFGDH}
dh_testdir
if which dh_update_autotools_config > /dev/null 2>&1 ; then \
dh_update_autotools_config ;\
mkdir -p ${STAMPSDIR}
touch ${CFGSTDSTAMP}
-${CFGBFSTAMP}:
+${CFGBFSTAMP}: ${CFGDH}
dh_testdir
if which dh_update_autotools_config > /dev/null 2>&1 ; then \
dh_update_autotools_config ;\
mv debian/orig-gmo/* po ; \
rmdir debian/orig-gmo ; \
fi
+ if test -f debian/compat.save; then \
+ mv debian/compat.save debian/compat ; \
+ fi
+ if test -f debian/e2fsprogs.postinst.save; then \
+ mv debian/e2fsprogs.postinst.save debian/e2fsprogs.postinst ; \
+ fi
+ if test -f debian/e2fsprogs.postrm; then \
+ rm -f debian/e2fsprogs.postrm ; \
+ fi
rm -rf ${STAMPSDIR}
[ ! -f ${stdbuilddir}/Makefile ] || $(MAKE) -C ${stdbuilddir} V=1 distclean
[ ! -f ${bfbuilddir}/Makefile ] || $(MAKE) -C ${bfbuilddir} V=1 distclean
dh_compress -a
dh_makeshlibs -a --add-udeb=e2fsprogs-udeb
+ifneq ($(USE_DH9),yes)
dh_installsystemd -p e2fsprogs
-
+endif
$(INSTALL) -D -p -m644 debian/e2fsprogs-udeb.lintian-overrides \
debian/e2fsprogs-udeb/usr/share/lintian/overrides/e2fsprogs-udeb
dh_installdeb -a