]> git.proxmox.com Git - mirror_zfs-debian.git/blob - debian/rules
Add libzfs-dev to the debian/control file.
[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 --prefix=/usr --with-config=user
12
13 override_dh_auto_test:
14 # `make check` cannot run in an unprivileged build environment.
15
16 override_dh_auto_install:
17 # Install the utilities.
18 make install DESTDIR='$(CURDIR)/debian/tmp'
19
20 # Get a bare copy of the source code. This creates the $(CURDIR)/$(NAME)-$(VERSION)/ tree.
21 make distdir
22
23 # This shunt allows DKMS to delete header files that are peculiar to each
24 # module instance through the POST_REMOVE directive in the dkms.conf file.
25 echo '#!/bin/sh' >'$(CURDIR)/$(NAME)-$(VERSION)/rm'
26 echo 'rm "$$@"' >>'$(CURDIR)/$(NAME)-$(VERSION)/rm'
27 chmod 755 '$(CURDIR)/$(NAME)-$(VERSION)/rm'
28
29 # Install the DKMS source.
30 mkdir -p '$(CURDIR)/debian/tmp/usr/src/'
31 mv '$(CURDIR)/$(NAME)-$(VERSION)' '$(CURDIR)/debian/tmp/usr/src/'
32
33 # Install the dkms.conf file.
34 dh_dkms -V $(VERSION)
35
36 # Install the init.d file.
37 dh_installinit --name=zfs
38
39 # @FIXME: `make distclean` fails when --with-config=user is set.
40 # Kludge by creating dummy makefiles.
41 echo 'distclean:' >$(CURDIR)/include/Makefile
42 echo ' -rm -f Makefile' >>$(CURDIR)/include/Makefile
43 echo 'distclean:' >$(CURDIR)/module/Makefile
44 echo ' -rm -f Makefile' >>$(CURDIR)/module/Makefile