File: rules

package info (click to toggle)
devmapper 2%3A1.02.08-1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 4,276 kB
  • ctags: 2,921
  • sloc: ansic: 16,422; sh: 2,778; makefile: 406; perl: 16
file content (132 lines) | stat: -rwxr-xr-x 3,330 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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
#!/usr/bin/make -f

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

ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
CFLAGS += -g
endif
ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
INSTALL_PROGRAM += -s
endif

BUILD_DIR = debian/build

PACKAGES_DEB = libdevmapper-dev libdevmapper1.02 dmsetup
PACKAGES_UDEB = libdevmapper1.02-udeb dmsetup-udeb

$(BUILD_DIR)/build-deb/config.status: DIR = $(BUILD_DIR)/build-deb
$(BUILD_DIR)/build-deb/config.status:
	dh_testdir

	rm -rf $(DIR)
	mkdir -p $(DIR)
	cp -al $(filter-out debian, $(wildcard *)) $(DIR)
	cp --remove-destination /usr/share/misc/config.sub /usr/share/misc/config.guess $(DIR)/autoconf
	cd $(DIR); \
	./configure \
		--prefix=/usr \
		--mandir=\$${prefix}/share/man \
		--infodir=\$${prefix}/share/info \
		--libdir=/lib --sbindir=/sbin \
		--enable-compat \
		--enable-pkgconfig \
		--with-device-uid=0 \
		--with-device-gid=6 \
		--with-device-mode=0660

$(BUILD_DIR)/build-udeb/config.status: DIR = $(BUILD_DIR)/build-udeb
$(BUILD_DIR)/build-udeb/config.status:
	dh_testdir

	rm -rf $(DIR)
	mkdir -p $(DIR)
	cp -al $(filter-out debian, $(wildcard *)) $(DIR)
	cp --remove-destination /usr/share/misc/config.sub /usr/share/misc/config.guess $(DIR)/autoconf
	cd $(DIR); \
	./configure \
		--prefix=/usr \
		--mandir=\$${prefix}/share/man \
		--infodir=\$${prefix}/share/info \
		--libdir=/lib --sbindir=/sbin \
		--with-optimisation=-Os \
		--enable-compat \
		--disable-selinux

build: build-deb build-udeb

build-deb: $(BUILD_DIR)/build-deb-stamp
$(BUILD_DIR)/build-deb-stamp: DIR = $(BUILD_DIR)/build-deb
$(BUILD_DIR)/build-deb-stamp: $(BUILD_DIR)/build-deb/config.status
	dh_testdir

	$(MAKE) -C $(DIR)

	touch $@

build-udeb: $(BUILD_DIR)/build-udeb-stamp
$(BUILD_DIR)/build-udeb-stamp: DIR = $(BUILD_DIR)/build-udeb
$(BUILD_DIR)/build-udeb-stamp: $(BUILD_DIR)/build-udeb/config.status
	dh_testdir

	$(MAKE) -C $(DIR)

	touch $@

clean:
	dh_testdir
	rm -rf $(BUILD_DIR)

	dh_clean

install: install-deb install-udeb

install-deb: DH_OPTIONS = $(addprefix -p,$(PACKAGES_DEB))
install-deb: DIR = $(BUILD_DIR)/build-deb
install-deb: INSTALL_DIR = $(BUILD_DIR)/install-deb
install-deb: build-deb
	dh_testdir
	dh_testroot
	dh_clean -k $(DH_OPTIONS)

	rm -rf $(INSTALL_DIR)
	$(MAKE) -C $(DIR) install DESTDIR=$(CURDIR)/$(INSTALL_DIR)

	dh_install $(DH_OPTIONS) --sourcedir=$(INSTALL_DIR)

install-udeb: DH_OPTIONS = $(addprefix -p,$(PACKAGES_UDEB))
install-udeb: DIR = $(BUILD_DIR)/build-udeb
install-udeb: INSTALL_DIR = $(BUILD_DIR)/install-udeb
install-udeb: build-udeb
	dh_testdir
	dh_testroot
	dh_clean -k $(DH_OPTIONS)

	rm -rf $(INSTALL_DIR)
	$(MAKE) -C $(DIR) install DESTDIR=$(CURDIR)/$(INSTALL_DIR)

	dh_install $(DH_OPTIONS) --sourcedir=$(INSTALL_DIR)

# Build architecture-independent files here.
binary-indep:

# Build architecture-dependent files here.
binary-arch: build install
	dh_testdir -a
	dh_testroot -a
	dh_installchangelogs WHATS_NEW -a
	dh_installdocs -a
	dh_installinit -a -- start 25 S .
	dh_strip -a
	dh_link -a
	dh_compress -a
	dh_fixperms -a
	dh_makeshlibs -a -V 'libdevmapper1.02 (>= 2:1.02.02-2)' --add-udeb 'libdevmapper1.02-udeb'
	dh_installdeb -a
	dh_shlibdeps -a
	dh_gencontrol -a
	dh_md5sums -a
	dh_builddeb -a

binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install configure