File: rules

package info (click to toggle)
ecryptfs-utils 111-4
  • links: PTS
  • area: main
  • in suites: stretch
  • size: 3,528 kB
  • ctags: 1,728
  • sloc: ansic: 18,280; sh: 7,043; makefile: 361; python: 41
file content (66 lines) | stat: -rwxr-xr-x 1,898 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
#!/usr/bin/make -f
# -*- makefile -*-

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

DEB_BUILD_ARCH     ?= $(shell dpkg-architecture -qDEB_BUILD_ARCH)
DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)

CFLAGS += -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64

export DEB_BUILD_MAINT_OPTIONS = hardening=+all

%:
	dh ${@} --with autoreconf,python2

override_dh_autoreconf:
	dh_autoreconf ./autogen.sh

override_dh_auto_configure:
	dh_auto_configure -- \
		--enable-gpg --enable-pam --enable-static --enable-tspi \
		--disable-gui --disable-openssl --disable-pkcs11-helper \
		CFLAGS="$(CFLAGS)"

override_dh_auto_install:
	dh_auto_install

	install -D -m 0644 debian/local/ecryptfs-utils.pam-auth-update debian/ecryptfs-utils/usr/share/pam-configs/ecryptfs-utils

	# Adding kmod integration
	install -D -m 0644 debian/local/ecryptfs-utils.kmod debian/ecryptfs-utils/lib/modules-load.d/ecryptfs.conf

	# Removing useless files
	find debian/tmp -name "*.pyc" | xargs rm -f

	rm -f debian/tmp/usr/lib/*/*.la

	rm -f debian/tmp/usr/lib/python*/dist-packages/ecryptfs-utils/*.la
	rm -f debian/tmp/usr/lib/python*/dist-packages/ecryptfs-utils/*.a

override_dh_builddeb:
	dh_builddeb -- -Zxz

override_dh_fixperms:
	dh_fixperms

	chmod 4755 debian/ecryptfs-utils/sbin/mount.ecryptfs_private

override_dh_install:
	dh_install --fail-missing

override_dh_python2:
	dh_python2 --no-guessing-versions

	# Adding missing symlinks
	cd debian/python-ecryptfs/usr/lib/python*/dist-packages/ecryptfs-utils && \
	ln -s _libecryptfs.${DEB_HOST_MULTIARCH}.so _libecryptfs.so.0.0 && \
	ln -s _libecryptfs.${DEB_HOST_MULTIARCH}.so _libecryptfs.so.0.0.0

override_dh_strip:
	dh_strip --dbg-package=ecryptfs-utils-dbg

.PHONY: override_dh_autoreconf override_dh_auto_configure \
	override_dh_auto_install override_dh_install override_dh_strip \
	override_dh_fixperms override_dh_builddeb