File: rules

package info (click to toggle)
loop-aes-utils 2.12p-4sarge2
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 8,644 kB
  • ctags: 5,072
  • sloc: ansic: 46,123; sh: 7,606; makefile: 884; perl: 86; csh: 62; sed: 55
file content (94 lines) | stat: -rwxr-xr-x 2,142 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
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
#!/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
	CFLAGS="$(CFLAGS)" ./configure \
	  --host=$(DEB_HOST_GNU_TYPE) \
	  --build=$(DEB_BUILD_GNU_TYPE) \
	  --prefix=/usr \
	  --mandir=\$${prefix}/share/man \
	  --infodir=\$${prefix}/share/info \
	  --bindir=\$${prefix}/bin
	touch config-stamp

build: build-stamp
build-stamp: config-stamp
	dh_testdir
	$(MAKE) $(DEBIAN_OPTIMIZE) 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 = $(CURDIR)/debian/loop-aes-utils

install: build
	dh_testdir
	dh_testroot
	dh_clean -k
	dh_installdirs

	install -m 4755 -o root mount/mount mount/umount $(DIR)/bin
	install -m 755 mount/losetup mount/swapon $(DIR)/sbin

	install -m 644 mount/mount.8 mount/umount.8 mount/losetup.8 \
	  mount/swapon.8 mount/swapoff.8 $(DIR)/usr/share/man/man8
	install -m 644 mount/fstab.5 $(DIR)/usr/share/man/man5

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

binary-indep: build install

binary-arch: build install
	dh_testdir
	dh_testroot
	dh_installchangelogs HISTORY
	dh_installdocs debian/README
	dh_installman
	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