]> git.proxmox.com Git - mirror_zfs-debian.git/blob - debian/rules
Merge branch 'upstream'
[mirror_zfs-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 # Build the userland, but don't build the kernel modules.
11 ./configure \
12 --prefix='' \
13 --libexecdir=/usr/libexec \
14 --libdir=/lib \
15 --includedir=/usr/include \
16 --datarootdir=/usr/share \
17 --with-config=user \
18
19 override_dh_auto_test:
20 # `make check` cannot run in an unprivileged build environment.
21
22 override_dh_auto_install:
23 # Install the utilities.
24 make install DESTDIR='$(CURDIR)/debian/tmp'
25
26 # Get a bare copy of the source code.
27 # This creates the $(CURDIR)/$(NAME)-$(VERSION)/ tree.
28 make distdir
29
30 # @FIXME: Create a distdir_modules rule.
31 #
32 # Scripts distribution is disabled because Lintian complains about
33 # having them in the DKMS sources. Stub the automake files to prevent
34 # a spurious configure error until the distdir rule can be improved.
35 mkdir -p \
36 '$(CURDIR)/$(NAME)-$(VERSION)/scripts' \
37 '$(CURDIR)/$(NAME)-$(VERSION)/scripts/zpios-profile' \
38 '$(CURDIR)/$(NAME)-$(VERSION)/scripts/zpios-test' \
39 '$(CURDIR)/$(NAME)-$(VERSION)/scripts/zpool-config' \
40 '$(CURDIR)/$(NAME)-$(VERSION)/scripts/zpool-layout'
41 touch \
42 '$(CURDIR)/$(NAME)-$(VERSION)/scripts/common.sh.in' \
43 '$(CURDIR)/$(NAME)-$(VERSION)/scripts/Makefile.in' \
44 '$(CURDIR)/$(NAME)-$(VERSION)/scripts/zpios-profile/Makefile.in' \
45 '$(CURDIR)/$(NAME)-$(VERSION)/scripts/zpios-test/Makefile.in' \
46 '$(CURDIR)/$(NAME)-$(VERSION)/scripts/zpool-config/Makefile.in' \
47 '$(CURDIR)/$(NAME)-$(VERSION)/scripts/zpool-layout/Makefile.in'
48
49 # This shunt allows DKMS to delete header files that are peculiar
50 # to each module instance through the POST_REMOVE directive in the
51 # dkms.conf file.
52 echo '#!/bin/sh' >'$(CURDIR)/$(NAME)-$(VERSION)/rm'
53 echo 'rm "$$@"' >>'$(CURDIR)/$(NAME)-$(VERSION)/rm'
54 chmod 755 '$(CURDIR)/$(NAME)-$(VERSION)/rm'
55
56 # Install the DKMS source.
57 mkdir -p '$(CURDIR)/debian/tmp/usr/src/'
58 mv '$(CURDIR)/$(NAME)-$(VERSION)' '$(CURDIR)/debian/tmp/usr/src/'
59
60 # Install the dkms.conf file.
61 dh_dkms -V $(VERSION)
62
63 # Install the init.d file.
64 dh_installinit --name=zfs
65
66 override_dh_shlibdeps:
67 dh_shlibdeps -- --warnings=0