]>
Commit | Line | Data |
---|---|---|
7e4739a2 DH |
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. | |
ab520f13 DH |
11 | ./configure \ |
12 | --prefix=/ \ | |
13 | --bindir=/lib/udev \ | |
14 | --libexecdir=/usr/libexec \ | |
15 | --includedir=/usr/include \ | |
16 | --datarootdir=/usr/share \ | |
17 | --with-config=user \ | |
7e4739a2 DH |
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. This creates the $(CURDIR)/$(NAME)-$(VERSION)/ tree. | |
27 | make distdir | |
28 | ||
29 | # This shunt allows DKMS to delete header files that are peculiar to each | |
30 | # module instance through the POST_REMOVE directive in the dkms.conf file. | |
31 | echo '#!/bin/sh' >'$(CURDIR)/$(NAME)-$(VERSION)/rm' | |
32 | echo 'rm "$$@"' >>'$(CURDIR)/$(NAME)-$(VERSION)/rm' | |
33 | chmod 755 '$(CURDIR)/$(NAME)-$(VERSION)/rm' | |
34 | ||
35 | # Install the DKMS source. | |
36 | mkdir -p '$(CURDIR)/debian/tmp/usr/src/' | |
37 | mv '$(CURDIR)/$(NAME)-$(VERSION)' '$(CURDIR)/debian/tmp/usr/src/' | |
38 | ||
39 | # Install the dkms.conf file. | |
40 | dh_dkms -V $(VERSION) | |
41 | ||
9e5db36f DH |
42 | # Install the init.d file. |
43 | dh_installinit --name=zfs |