3 include /usr
/share
/dpkg
/default.mk
5 VERSION
:= $(DEB_VERSION_UPSTREAM
)
6 REVISION
:= $(shell echo
$(DEB_VERSION
) | cut
-d-
-f2
)
8 export DEB_BUILD_MAINT_OPTIONS
= hardening
=+all
11 dh
$@
--with autoreconf
,python3
,systemd
--parallel
14 @
# Embed the downstream version in the module.
16 -e
's/^Version:.*/Version: $(VERSION)/' \
17 -e
's/^Release:.*/Release: $(REVISION)/' \
21 override_dh_autoreconf
: adapt_meta_file
24 override_dh_auto_configure
:
25 @
# Build the userland, but don't build the kernel modules.
26 dh_auto_configure
-- \
30 --with-udevdir
=/lib
/udev \
31 --with-zfsexecdir
=/usr
/lib
/zfs-linux \
33 --with-systemdunitdir
=/lib
/systemd
/system \
34 --with-systemdpresetdir
=/lib
/systemd
/system-preset \
37 override_dh_auto_test
:
38 # The dh_auto_test rule is disabled because
39 # `make check` cannot run in an unprivileged build environment.
41 override_dh_auto_install
:
42 @
# Install the utilities.
43 $(MAKE
) install DESTDIR
='$(CURDIR)/debian/tmp'
45 # Use upstream's bash completion
46 install -D
-t
'$(CURDIR)/debian/tmp/usr/share/bash-completion/completions/' \
47 '$(CURDIR)/contrib/bash_completion.d/zfs'
49 # Move from bin_dir to /usr/sbin
50 # Remove suffix (.py) as per policy 10.4 - Scripts
51 # https://www.debian.org/doc/debian-policy/ch-files.html#s-scripts
52 mkdir
-p
'$(CURDIR)/debian/tmp/usr/sbin/'
53 mv
'$(CURDIR)/debian/tmp/usr/bin/arc_summary.py' '$(CURDIR)/debian/tmp/usr/sbin/arc_summary'
54 mv
'$(CURDIR)/debian/tmp/usr/bin/arcstat.py' '$(CURDIR)/debian/tmp/usr/sbin/arcstat'
55 mv
'$(CURDIR)/debian/tmp/usr/bin/dbufstat.py' '$(CURDIR)/debian/tmp/usr/sbin/dbufstat'
57 @
# Zed has dependencies outside of the system root.
58 mv
'$(CURDIR)/debian/tmp/sbin/zed' '$(CURDIR)/debian/tmp/usr/sbin/zed'
60 mkdir
-p
$(CURDIR
)/debian
/tmp
/usr
/lib
61 for i in
`ls $(CURDIR)/debian/tmp/lib/*.so`; do \
62 ln
-s
/lib
/`readlink $${i}` $(CURDIR
)/debian
/tmp
/usr
/lib
/`basename $${i}`; \
66 chmod a-x
'$(CURDIR)/debian/tmp/etc/zfs/zfs-functions'
67 chmod a-x
'$(CURDIR)/debian/tmp/etc/default/zfs'
68 chmod a-x
'$(CURDIR)/debian/tmp/usr/share/bash-completion/completions/zfs'
70 override_dh_makeshlibs
:
72 ifeq ($(BUILD_UDEB
), true
)
73 dh_makeshlibs
-V
-plibnvpair1linux
74 dh_makeshlibs
-V
-plibuutil1linux
75 dh_makeshlibs
-V
-plibzfs2linux
76 dh_makeshlibs
-V
-plibzpool2linux
77 dh_makeshlibs
-V
-pzfsutils-linux
81 dh_strip
--dbg-package
=zfs-dbg
83 override_dh_auto_clean
:
84 find .
-name .gitignore
-delete
85 rm -rf zfs-
$(DEB_VERSION_UPSTREAM
)
87 @if
test -e META.orig
; then mv META.orig META
; fi
90 find .
-name lib
*.la
-delete
91 dh_install
--fail-missing
96 cme update dpkg-copyright
-file debian
/copyright.cme