SPL=/usr/src/spl-$(VERSION)
endif
+ifndef SPLOBJ
+SPLOBJ=/var/lib/dkms/spl/$(VERSION)/$(KVERS)/$(shell dpkg-architecture -qDEB_TARGET_GNU_CPU)
+endif
+
non_epoch_version=$(shell echo $(KVERS) | perl -pe 's/^\d+://')
PACKAGE=zfs
pmodules = $(PACKAGE)-modules-$(non_epoch_version)
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
%:
- dh $@ --with autoreconf,dkms,python2,systemd --parallel
+ dh $@ --with autoreconf,dkms,python3,systemd --parallel
override_dh_auto_configure:
@cp debian/control.in debian/control
@# Build the userland, but don't build the kernel modules.
dh_auto_configure -- \
- --bindir=/bin \
+ --bindir=/usr/bin \
--sbindir=/sbin \
--libdir=/lib \
--with-udevdir=/lib/udev \
+ --with-systemdunitdir=/lib/systemd/system \
+ --with-systemdpresetdir=/lib/systemd/system-preset \
--with-config=user
override_dh_auto_test:
@# Install the utilities.
$(MAKE) install DESTDIR='$(CURDIR)/debian/tmp'
+
+ # Move from bin_dir to /usr/sbin
+ # Remove suffix (.py) as per policy 10.4 - Scripts
+ # https://www.debian.org/doc/debian-policy/ch-files.html#s-scripts
+ mkdir -p '$(CURDIR)/debian/tmp/usr/sbin/'
+ mv '$(CURDIR)/debian/tmp/usr/bin/arc_summary.py' '$(CURDIR)/debian/tmp/usr/sbin/arc_summary'
+ mv '$(CURDIR)/debian/tmp/usr/bin/arcstat.py' '$(CURDIR)/debian/tmp/usr/sbin/arcstat'
+ mv '$(CURDIR)/debian/tmp/usr/bin/dbufstat.py' '$(CURDIR)/debian/tmp/usr/sbin/dbufstat'
+
+ @# Zed has dependencies outside of the system root.
+ $(INSTALL) -d '$(CURDIR)/debian/tmp/usr/sbin/'
+ mv '$(CURDIR)/debian/tmp/sbin/zed' '$(CURDIR)/debian/tmp/usr/sbin/zed'
+
@# Get a bare copy of the source code for DKMS.
@# This creates the $(CURDIR)/$(NAME)-$(VERSION)/ tree, which does not
@# contain the userland sources. NB: Remove-userland-dist-rules.patch
rm $${i}; \
done
- chmod -x $(CURDIR)/debian/tmp/etc/zfs/zfs-functions
- chmod -x $(CURDIR)/debian/tmp/etc/default/zfs
+ chmod a-x $(CURDIR)/debian/tmp/etc/zfs/zfs-functions
+ chmod a-x $(CURDIR)/debian/tmp/etc/default/zfs
override_dh_dkms:
dh_dkms -V $(VERSION)
endif
override_dh_auto_clean:
+ find . -name .gitignore -delete
+ rm -rf zfs-$(VERSION)
dh_auto_clean
debconf-updatepo
@if test -e META.orig; then mv META.orig META; fi
override_dh_install:
find . -name lib*.la -delete
- dh_install --list-missing
+ dh_install --fail-missing
# ------------
--with-config=kernel \
--with-linux=$(KSRC) \
--with-linux-obj=$(KOBJ) \
- --with-spl=$(SPL)
+ --with-spl=$(SPL) \
+ --with-spl-obj=$(SPLOBJ)
touch override_dh_configure_modules_udeb_stamp
override_dh_configure_modules: override_dh_configure_modules_stamp
--with-config=kernel \
--with-linux=$(KSRC) \
--with-linux-obj=$(KOBJ) \
- --with-spl=$(SPL)
+ --with-spl=$(SPL) \
+ --with-spl-obj=$(SPLOBJ)
touch override_dh_configure_modules_stamp
override_dh_binary-modules-udeb: override_dh_prep-deb-files override_dh_configure_modules_udeb
dh_gencontrol -p${pmodules}
dh_md5sums -p${pmodules}
dh_builddeb -p${pmodules}
+
+debian-copyright:
+ cme update dpkg-copyright -file debian/copyright.cme