summaryrefslogtreecommitdiff
path: root/debian/rules
blob: dd7fec75c0678a1a0d1a4f7748bf658145e579db (plain)
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
#!/usr/bin/make -f

include /usr/share/dpkg/architecture.mk

export DPKG_GENSYMBOLS_CHECK_LEVEL := 4

# list of arch for which build 32-bit library
lib32 := illumos-amd64 kopensolaris-amd64

# list of arch for which build 64-bit library
lib64 :=

variants := default

ifneq (,$(filter $(DEB_HOST_ARCH), $(lib32)))
variants += 32
endif
ifneq (,$(filter $(DEB_HOST_ARCH), $(lib64)))
variants += 64
endif

configure.32 := --libdir=\$${prefix}/lib32 --disable-progs CFLAGS="-m32"
configure.64 := --libdir=\$${prefix}/lib64 --disable-progs CFLAGS="-m64"

%:
	dh $@

override_dh_auto_configure : $(variants:%=configure-%-stamp)
override_dh_auto_build     : $(variants:%=build-%-stamp)
override_dh_auto_install   : $(variants:%=install-%-stamp)
override_dh_auto_clean:
	rm -rf debian/build

override_dh_strip:
	dh_strip -p libiscsit1 --dbg-package=libiscsit1-dbg
	dh_strip -N libiscsit1

configure-%-stamp:
	dh_auto_configure -B debian/build/$* -- \
		--libexecdir=\$${prefix}/lib \
		$(configure.$*)
	touch $@

build-%-stamp: configure-%-stamp
	dh_auto_build -B debian/build/$*
	touch $@

install-%-stamp: build-%-stamp
	dh_auto_install -B debian/build/$*
	touch $@