]> git.proxmox.com Git - mirror_zfs-debian.git/blame - debian/rules
Refresh debian/patches after upstream merge.
[mirror_zfs-debian.git] / debian / rules
CommitLineData
7e4739a2
DH
1#!/usr/bin/make -f
2
3NAME := $(shell awk '/^Name:/{print $$2}' META)
4VERSION := $(shell awk '/^Version:/{print $$2}' META)
5
6%:
2a9c6adc 7 dh $@ --with autotools_dev
7e4739a2
DH
8
9override_dh_auto_configure:
2a9c6adc
DH
10 ./autogen.sh
11
7e4739a2 12 # Build the userland, but don't build the kernel modules.
ab520f13 13 ./configure \
4f023100 14 --prefix='' \
ab520f13 15 --libexecdir=/usr/libexec \
44bb78ce 16 --libdir=/lib \
ab520f13
DH
17 --includedir=/usr/include \
18 --datarootdir=/usr/share \
19 --with-config=user \
7e4739a2
DH
20
21override_dh_auto_test:
22 # `make check` cannot run in an unprivileged build environment.
23
24override_dh_auto_install:
25 # Install the utilities.
26 make install DESTDIR='$(CURDIR)/debian/tmp'
27
bc1ef279
DH
28 # Get a bare copy of the source code.
29 # This creates the $(CURDIR)/$(NAME)-$(VERSION)/ tree.
7e4739a2
DH
30 make distdir
31
bc1ef279
DH
32 # @FIXME: Create a distdir_modules rule.
33 #
34 # Scripts distribution is disabled because Lintian complains about
35 # having them in the DKMS sources. Stub the automake files to prevent
36 # a spurious configure error until the distdir rule can be improved.
37 mkdir -p \
38 '$(CURDIR)/$(NAME)-$(VERSION)/scripts' \
39 '$(CURDIR)/$(NAME)-$(VERSION)/scripts/zpios-profile' \
40 '$(CURDIR)/$(NAME)-$(VERSION)/scripts/zpios-test' \
41 '$(CURDIR)/$(NAME)-$(VERSION)/scripts/zpool-config' \
42 '$(CURDIR)/$(NAME)-$(VERSION)/scripts/zpool-layout'
43 touch \
44 '$(CURDIR)/$(NAME)-$(VERSION)/scripts/common.sh.in' \
45 '$(CURDIR)/$(NAME)-$(VERSION)/scripts/Makefile.in' \
46 '$(CURDIR)/$(NAME)-$(VERSION)/scripts/zpios-profile/Makefile.in' \
47 '$(CURDIR)/$(NAME)-$(VERSION)/scripts/zpios-test/Makefile.in' \
48 '$(CURDIR)/$(NAME)-$(VERSION)/scripts/zpool-config/Makefile.in' \
49 '$(CURDIR)/$(NAME)-$(VERSION)/scripts/zpool-layout/Makefile.in'
50
b2260a0c
DH
51 # This shunt allows DKMS to install the Module.symvers and zfs_config.h
52 # files to the ${dkms_tree} area through the POST_INSTALL directive.
53 echo '#!/bin/sh' >'$(CURDIR)/$(NAME)-$(VERSION)/cp'
54 echo 'cp "$$@"' >>'$(CURDIR)/$(NAME)-$(VERSION)/cp'
55 chmod 755 '$(CURDIR)/$(NAME)-$(VERSION)/cp'
7e4739a2
DH
56
57 # Install the DKMS source.
58 mkdir -p '$(CURDIR)/debian/tmp/usr/src/'
59 mv '$(CURDIR)/$(NAME)-$(VERSION)' '$(CURDIR)/debian/tmp/usr/src/'
60
61 # Install the dkms.conf file.
62 dh_dkms -V $(VERSION)
63
9e5db36f
DH
64 # Install the init.d file.
65 dh_installinit --name=zfs
9b360ccf
DH
66
67override_dh_shlibdeps:
68 dh_shlibdeps -- --warnings=0