File: rules

package info (click to toggle)
loop-aes-utils 2.12r-15%2Betch1
  • links: PTS
  • area: main
  • in suites: etch
  • size: 8,876 kB
  • ctags: 5,077
  • sloc: ansic: 46,163; sh: 11,326; makefile: 886; perl: 86; csh: 62; sed: 55
file content (101 lines) | stat: -rwxr-xr-x 2,532 bytes parent folder | download | duplicates (2)
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
#!/usr/bin/make -f
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

CFLAGS = -Wall -g

ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
	CFLAGS += -O0
else
	CFLAGS += -O2
endif

DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)

config-stamp: patch-stamp configure
	dh_testdir
	./configure
	touch config-stamp

build: build-stamp
build-stamp: config-stamp
	dh_testdir
	$(MAKE) SUBDIRS="lib mount"
	touch build-stamp

clean: clean1 unpatch
clean1:
	dh_testdir
	dh_testroot
	rm -f build-stamp config-stamp
	$(MAKE) clean
ifneq "$(wildcard /usr/share/misc/config.sub)" ""
	cp -f /usr/share/misc/config.sub config.sub
endif
ifneq "$(wildcard /usr/share/misc/config.guess)" ""
	cp -f /usr/share/misc/config.guess config.guess
endif
	dh_clean 

DIR = debian/loop-aes-utils
DIR_UDEB = debian/mount-aes-udeb

install: build
	dh_testdir
	dh_testroot
	dh_clean -k
	dh_installdirs

	install -m 4755 -o root mount/mount $(DIR)/bin
	install -m 4755 -o root mount/umount $(DIR)/bin
	install -m 755 mount/losetup $(DIR)/sbin
	install -m 755 mount/swapon $(DIR)/sbin
	install -m 755 debian/loop-aes-keygen $(DIR)/usr/bin

	# lintian-override
	install -m 644 debian/lintian-override $(DIR)/usr/share/lintian/overrides/loop-aes-utils

	# udeb
	install -d $(DIR_UDEB)/bin
	install -d $(DIR_UDEB)/sbin
	install -m 755 mount/mount $(DIR_UDEB)/bin/mount-aes
	install -m 755 mount/umount $(DIR_UDEB)/bin/umount-aes
	install -m 755 mount/losetup $(DIR_UDEB)/sbin/losetup-aes
	install -m 755 mount/swapon $(DIR_UDEB)/sbin/swapon-aes
	install -m 755 debian/loop-aes-keygen $(DIR_UDEB)/bin
	# initramsfs-tools integration
	#install -m 755 debian/initramfs-tools-script $(DIR)/usr/share/initramfs-tools/scripts/local-top/loopaes
	#install -m 755 debian/initramfs-tools-hook $(DIR)/usr/share/initramfs-tools/hooks/loopaes

binary-indep: build install

binary-arch: build install
	dh_testdir
	dh_testroot
	dh_installchangelogs HISTORY
	dh_installdocs debian/README
	dh_installman -A
	dh_installinit --name=checkfs-loop --no-start -- start 28 S .
	dh_link
	dh_strip
	dh_compress
	dh_fixperms --exclude bin/mount --exclude bin/umount
	dh_installdeb
	dh_shlibdeps
	dh_gencontrol
	dh_md5sums
	dh_builddeb

binary: binary-indep binary-arch

patch: patch-stamp
patch-stamp:
	dpatch apply-all -v
	touch patch-stamp

unpatch:
	dpatch deapply-all
	rm -rf patch-stamp debian/patched

.PHONY: build clean binary-indep binary-arch binary install patch unpatch clean1