3 NAME
:= $(shell awk
'$$1 == "Name:" { print $$2; }' META
)
4 VERSION
:= $(shell dpkg-parsechangelog \
5 | awk
'$$1 == "Version:" { print $$2; }' | cut
-d-
-f1
)
7 override_dh_auto_configure
:
8 @
# Embed the downstream version in the module.
9 @sed
-e
's/^Version:.*/Version: $(VERSION)/' -i.orig META
11 @
# Create the makefiles and configure script.
14 @
# Build the userland, but don't build the kernel modules.
15 .
/configure
--prefix=/usr
--with-config
=user
17 override_dh_auto_test
:
18 # scripts/check.sh tries insmod and rmmod, so it cannot
19 # run in an unprivileged build environment.
21 override_dh_auto_install
:
22 @
# Install the utilities.
23 make
install DESTDIR
='$(CURDIR)/debian/tmp'
25 @
# Create a dummy hostid file for the zfs-initramfs package.
26 @
# NB: Commentary in the spl.postinst script.
27 mkdir
-p
'$(CURDIR)/debian/tmp/etc/'
28 /usr
/bin
/printf
'\xFF\xFF\xFF\xFF' >'$(CURDIR)/debian/tmp/etc/hostid'
30 @
# Get a bare copy of the source code.
31 @
# This creates the $(CURDIR)/$(NAME)-$(VERSION)/ tree.
34 @
# Delete boilerplate to satisfy the lintian extra-license-file check.
35 rm '$(CURDIR)/$(NAME)-$(VERSION)/COPYING'
37 @
# This shunt allows DKMS to install the Module.symvers and spl_config.h
38 @
# files to the ${dkms_tree} area through the POST_INSTALL directive.
39 echo
'#!/bin/sh' >'$(CURDIR)/$(NAME)-$(VERSION)/cp'
40 echo
'cp "$$@"' >>'$(CURDIR)/$(NAME)-$(VERSION)/cp'
41 chmod
755 '$(CURDIR)/$(NAME)-$(VERSION)/cp'
43 # Install the DKMS source.
44 mkdir
-p
'$(CURDIR)/debian/tmp/usr/src/'
45 mv
'$(CURDIR)/$(NAME)-$(VERSION)' '$(CURDIR)/debian/tmp/usr/src/'
47 # Install the dkms.conf file.
50 override_dh_auto_clean
:
52 @if
test -e META.orig
; then mv META.orig META
; fi