3 include /usr
/share
/dpkg
/default.mk
5 VERSION
:= $(DEB_VERSION_UPSTREAM
)
6 REVISION
:= $(shell echo
$(DEB_VERSION
) | cut
-d-
-f2
)
8 SPHINX_BUILD
= $(shell dpkg
-L python3-sphinx | grep
-m
1 "/sphinx-build$$")
10 export DEB_BUILD_MAINT_OPTIONS
= hardening
=+all
13 dh
$@
--with autoreconf
,python3
,sphinxdoc
16 @
# Embed the downstream version in the module.
18 -e
's/^Version:.*/Version: $(VERSION)/' \
19 -e
's/^Release:.*/Release: $(REVISION)/' \
23 override_dh_autoreconf
: adapt_meta_file
26 override_dh_auto_configure
:
27 @
# Build the userland, but don't build the kernel modules.
28 dh_auto_configure
-- \
31 --libdir=/lib
/"$(DEB_HOST_MULTIARCH)" \
32 --with-udevdir
=/lib
/udev \
33 --with-zfsexecdir
=/usr
/lib
/zfs-linux \
36 --with-python
=python3 \
37 --with-pammoduledir
='/lib/$(DEB_HOST_MULTIARCH)/security' \
38 --with-pkgconfigdir
='/usr/lib/$(DEB_HOST_MULTIARCH)/pkgconfig' \
39 --with-systemdunitdir
=/lib
/systemd
/system \
40 --with-systemdpresetdir
=/lib
/systemd
/system-preset \
41 --with-systemdgeneratordir
=/lib
/systemd
/system-generators \
44 for i in
$(wildcard $(CURDIR
)/debian
/*.
install.in
) ; do \
45 basename "$$i" | grep _KVERS_
&& continue
; \
46 sed
's/@DEB_HOST_MULTIARCH@/$(DEB_HOST_MULTIARCH)/g' "$$i" > "$${i%%.in}" ; \
49 override_dh_auto_test
:
50 override_dh_auto_test
:
51 ifeq (amd64
,$(DEB_HOST_ARCH
))
52 # Upstream provides an ABI guarantee that we validate here
56 # The dh_auto_test rule is disabled because
57 # `make check` cannot run in an unprivileged build environment.
59 override_dh_auto_install
:
60 @
# Install the utilities.
61 $(MAKE
) install DESTDIR
='$(CURDIR)/debian/tmp'
63 # Use upstream's bash completion
64 install -D
-t
'$(CURDIR)/debian/tmp/usr/share/bash-completion/completions/' \
65 '$(CURDIR)/contrib/bash_completion.d/zfs'
67 # Move from bin_dir to /usr/sbin
68 # Remove suffix (.py) as per policy 10.4 - Scripts
69 # https://www.debian.org/doc/debian-policy/ch-files.html#s-scripts
70 mkdir
-p
'$(CURDIR)/debian/tmp/usr/sbin/'
71 mv
'$(CURDIR)/debian/tmp/usr/bin/arc_summary' '$(CURDIR)/debian/tmp/usr/sbin/arc_summary'
72 mv
'$(CURDIR)/debian/tmp/usr/bin/arcstat' '$(CURDIR)/debian/tmp/usr/sbin/arcstat'
73 mv
'$(CURDIR)/debian/tmp/usr/bin/dbufstat' '$(CURDIR)/debian/tmp/usr/sbin/dbufstat'
75 @
# Zed has dependencies outside of the system root.
76 mv
'$(CURDIR)/debian/tmp/sbin/zed' '$(CURDIR)/debian/tmp/usr/sbin/zed'
78 mkdir
-p
$(CURDIR
)/debian
/tmp
/usr
/lib
/$(DEB_HOST_MULTIARCH
)
79 for i in
`ls $(CURDIR)/debian/tmp/lib/$(DEB_HOST_MULTIARCH)/*.so`; do \
80 ln
-s
/lib
/$(DEB_HOST_MULTIARCH
)/`readlink $${i}` $(CURDIR
)/debian
/tmp
/usr
/lib
/$(DEB_HOST_MULTIARCH
)/`basename $${i}`; \
84 chmod a-x
'$(CURDIR)/debian/tmp/etc/zfs/zfs-functions'
85 chmod a-x
'$(CURDIR)/debian/tmp/etc/default/zfs'
86 chmod a-x
'$(CURDIR)/debian/tmp/usr/share/bash-completion/completions/zfs'
89 dh_python3
-p python3-pyzfs
91 override_dh_makeshlibs
:
94 override_dh_auto_clean
:
95 find .
-name .gitignore
-delete
96 rm -rf zfs-
$(DEB_VERSION_UPSTREAM
)
98 @if
test -e META.orig
; then mv META.orig META
; fi
101 find debian
/tmp
/lib
-name
*.la
-delete
105 dh_missing
--fail-missing
107 override_dh_installsystemd
:
108 # these to lines prevent the restarting of all systemd services, except
109 # zfs-zed - they should not be restarted (importing, mounting, creating
110 # links in /dev, and can cause erros in the log
111 # (upon major.minor change)
112 dh_installsystemd
--no-stop-on-upgrade
-X zfs-zed.service
113 dh_installsystemd
--name zfs-zed
115 override_dh_installdocs
:
117 ifeq (,$(findstring nodoc
, $(DEB_BUILD_OPTIONS
)))
118 http_proxy
='127.0.0.1:9' $(SPHINX_BUILD
) -N
-bhtml
"$(CURDIR)/contrib/pyzfs/docs/source/" debian
/pyzfs-doc
/usr
/share
/doc
/pyzfs-doc
/html
/
124 cme update dpkg-copyright
-file debian
/copyright.cme