3 NAME
:= $(shell awk
'/^Name:/{print $$2}' META
)
4 VERSION
:= $(shell awk
'/^Version:/{print $$2}' META
)
5 LSB_DISTRIBUTOR
:= $(shell lsb_release
-is
)
10 override_dh_auto_configure
:
13 @
# Build the userland, but don't build the kernel modules.
16 --libexecdir
=/usr
/libexec \
18 --includedir=/usr
/include \
19 --datarootdir
=/usr
/share \
22 override_dh_auto_test
:
23 # The dh_auto_test rule is disabled because
24 # `make check` cannot run in an unprivileged build environment.
26 override_dh_auto_install
:
27 @
# Install the utilities.
28 make
install DESTDIR
='$(CURDIR)/debian/tmp'
30 @
# Get a bare copy of the source code for DKMS.
31 @
# This creates the $(CURDIR)/$(NAME)-$(VERSION)/ tree, which does not
32 @
# contain the userland sources. NB: Remove-userland-dist-rules.patch
35 @
# This shunt allows DKMS to install the Module.symvers and zfs_config.h
36 @
# files to the ${dkms_tree} area through the POST_INSTALL directive.
37 echo
'#!/bin/sh' >'$(CURDIR)/$(NAME)-$(VERSION)/cp'
38 echo
'cp "$$@"' >>'$(CURDIR)/$(NAME)-$(VERSION)/cp'
39 chmod
755 '$(CURDIR)/$(NAME)-$(VERSION)/cp'
41 @
# Install the DKMS source.
42 mkdir
-p
'$(CURDIR)/debian/tmp/usr/src/'
43 mv
'$(CURDIR)/$(NAME)-$(VERSION)' '$(CURDIR)/debian/tmp/usr/src/'
45 @
# Process templates and install the dkms.conf file.
48 @
# Install the /etc/default/zfs options file.
49 dh_installinit
--name
=zfs
51 @
# Install the /etc/init.d/zfs-mount script.
52 ifeq ($(LSB_DISTRIBUTOR
),Debian
)
53 @
# Debian runs local mounts at sysv sequences [10..12] [08..09].
54 dh_installinit
--name
=zfs-mount \
55 --no-restart-on-upgrade
--no-start
-- defaults
13 07
57 dh_installinit
--name
=zfs-mount \
58 --no-restart-on-upgrade
--no-start
61 @
# Install the /etc/init.d/zfs-share script.
62 ifeq ($(LSB_DISTRIBUTOR
),Debian
)
63 @
# Debian runs nfs-kernel-server at sysv sequence 17 01.
64 dh_installinit
--name
=zfs-share \
65 --no-restart-on-upgrade
--no-start
-- defaults
18 00
66 else ifeq ($(LSB_DISTRIBUTOR
),Ubuntu
)
67 @
# Ubuntu runs nfs-kernel-server at sysv sequence 20 80.
68 dh_installinit
--name
=zfs-share \
69 --no-restart-on-upgrade
--no-start
-- defaults
21 79
71 dh_installinit
--name
=zfs-share \
72 --no-restart-on-upgrade
--no-start
76 # Ubuntu 12.04 LTS Lucid Lynx compatibility.
77 # (>= debhelper-8.0.0) does this automatically.
79 chmod
0440 debian
/zfsutils
/etc
/sudoers.d
/zfs
81 override_dh_shlibdeps
:
82 @
# Suppress libtool dependency_libs warnings that are caused by
83 @
# inter-library dependencies. (eg: zfs -> libzfs -> libuuid)
84 @
# @TODO: Add pkgconfig support instead.
85 dh_shlibdeps
-- --warnings
=0