]> 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 ./autogen.sh
11
12 @# Build the userland, but don't build the kernel modules.
13 ./configure \
14 --prefix='' \
15 --libexecdir=/usr/libexec \
16 --libdir=/lib \
17 --includedir=/usr/include \
18 --datarootdir=/usr/share \
19 --with-config=user
20
21 override_dh_auto_test:
22 # The dh_auto_test rule is disabled because
23 # `make check` cannot run in an unprivileged build environment.
24
25 override_dh_auto_install:
26 @# Install the utilities.
27 make install DESTDIR='$(CURDIR)/debian/tmp'
28
29 @# Get a bare copy of the source code for DKMS.
30 @# This creates the $(CURDIR)/$(NAME)-$(VERSION)/ tree, which does not
31 @# contain the userland sources. NB: Remove-userland-dist-rules.patch
32 make distdir
33
34 @# This shunt allows DKMS to install the Module.symvers and zfs_config.h
35 @# files to the ${dkms_tree} area through the POST_INSTALL directive.
36 echo '#!/bin/sh' >'$(CURDIR)/$(NAME)-$(VERSION)/cp'
37 echo 'cp "$$@"' >>'$(CURDIR)/$(NAME)-$(VERSION)/cp'
38 chmod 755 '$(CURDIR)/$(NAME)-$(VERSION)/cp'
39
40 @# Install the DKMS source.
41 mkdir -p '$(CURDIR)/debian/tmp/usr/src/'
42 mv '$(CURDIR)/$(NAME)-$(VERSION)' '$(CURDIR)/debian/tmp/usr/src/'
43
44 @# Process templates and install the dkms.conf file.
45 dh_dkms -V $(VERSION)
46
47 @# Install the init.d file.
48 dh_installinit --name=zfs
49
50 override_dh_shlibdeps:
51 @# Suppress libtool dependency_libs warnings that are caused by
52 @# inter-library dependencies. (eg: zfs -> libzfs -> libuuid)
53 @# @TODO: Add pkgconfig support instead.
54 dh_shlibdeps -- --warnings=0