]> git.proxmox.com Git - mirror_spl-debian.git/blob - debian/rules
Merge branch 'upstream'
[mirror_spl-debian.git] / debian / rules
1 #!/usr/bin/make -f
2
3 NAME := $(shell awk '/^Name:/{print $$2}' META)
4 VERSION := $(shell awk '/^Version:/{print $$2}' META)
5
6 %:
7 dh $@
8
9 override_dh_auto_configure:
10 ./autogen.sh
11
12 # Build the userland, but don't build the kernel modules.
13 ./configure --prefix=/usr --with-config=user
14
15 override_dh_auto_test:
16 # scripts/check.sh tries insmod and rmmod, so it cannot
17 # run in an unprivileged build environment.
18
19 override_dh_auto_install:
20 # Install the utilities.
21 make install DESTDIR='$(CURDIR)/debian/tmp'
22
23 # Create a dummy hostid file for the zfs-initramfs package.
24 # NB: Commentary in the spl.postinst script.
25 mkdir -p '$(CURDIR)/debian/tmp/etc/'
26 /usr/bin/printf '\xFF\xFF\xFF\xFF' >'$(CURDIR)/debian/tmp/etc/hostid'
27
28 # Get a bare copy of the source code.
29 # This creates the $(CURDIR)/$(NAME)-$(VERSION)/ tree.
30 make distdir
31
32 # Delete boilerplate to satisfy the lintian extra-license-file check.
33 rm '$(CURDIR)/$(NAME)-$(VERSION)/COPYING'
34
35 # This shunt allows DKMS to install the Module.symvers and spl_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'
40
41 # Install the DKMS source.
42 mkdir -p '$(CURDIR)/debian/tmp/usr/src/'
43 mv '$(CURDIR)/$(NAME)-$(VERSION)' '$(CURDIR)/debian/tmp/usr/src/'
44
45 # Install the dkms.conf file.
46 dh_dkms -V $(VERSION)