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 \
35 --with-systemdgeneratordir
=/lib
/systemd
/system-generators \
38 override_dh_auto_test
:
39 # The dh_auto_test rule is disabled because
40 # `make check` cannot run in an unprivileged build environment.
42 override_dh_auto_install
:
43 @
# Install the utilities.
44 $(MAKE
) install DESTDIR
='$(CURDIR)/debian/tmp'
46 # Use upstream's bash completion
47 install -D
-t
'$(CURDIR)/debian/tmp/usr/share/bash-completion/completions/' \
48 '$(CURDIR)/contrib/bash_completion.d/zfs'
50 # Move from bin_dir to /usr/sbin
51 # Remove suffix (.py) as per policy 10.4 - Scripts
52 # https://www.debian.org/doc/debian-policy/ch-files.html#s-scripts
53 mkdir
-p
'$(CURDIR)/debian/tmp/usr/sbin/'
54 mv
'$(CURDIR)/debian/tmp/usr/bin/arc_summary' '$(CURDIR)/debian/tmp/usr/sbin/arc_summary'
55 mv
'$(CURDIR)/debian/tmp/usr/bin/arcstat' '$(CURDIR)/debian/tmp/usr/sbin/arcstat'
56 mv
'$(CURDIR)/debian/tmp/usr/bin/dbufstat' '$(CURDIR)/debian/tmp/usr/sbin/dbufstat'
58 @
# Zed has dependencies outside of the system root.
59 mv
'$(CURDIR)/debian/tmp/sbin/zed' '$(CURDIR)/debian/tmp/usr/sbin/zed'
61 mkdir
-p
$(CURDIR
)/debian
/tmp
/usr
/lib
62 for i in
`ls $(CURDIR)/debian/tmp/lib/*.so`; do \
63 ln
-s
/lib
/`readlink $${i}` $(CURDIR
)/debian
/tmp
/usr
/lib
/`basename $${i}`; \
67 chmod a-x
'$(CURDIR)/debian/tmp/etc/zfs/zfs-functions'
68 chmod a-x
'$(CURDIR)/debian/tmp/etc/default/zfs'
69 chmod a-x
'$(CURDIR)/debian/tmp/usr/share/bash-completion/completions/zfs'
71 override_dh_makeshlibs
:
73 ifeq ($(BUILD_UDEB
), true
)
74 dh_makeshlibs
-V
-plibnvpair1linux
75 dh_makeshlibs
-V
-plibuutil1linux
76 dh_makeshlibs
-V
-plibzfs2linux
77 dh_makeshlibs
-V
-plibzpool2linux
78 dh_makeshlibs
-V
-pzfsutils-linux
82 dh_strip
--dbg-package
=zfs-dbg
84 override_dh_auto_clean
:
85 find .
-name .gitignore
-delete
86 rm -rf zfs-
$(DEB_VERSION_UPSTREAM
)
88 @if
test -e META.orig
; then mv META.orig META
; fi
91 find .
-name lib
*.la
-delete
92 dh_install
--fail-missing
97 cme update dpkg-copyright
-file debian
/copyright.cme