]>
Commit | Line | Data |
---|---|---|
f4cb848e MW |
1 | #!/usr/bin/make -f |
2 | ||
3 | #export DH_VERBOSE=1 | |
4 | ||
5 | CC = gcc | |
5084c13f | 6 | CFLAGS = -Wall -Wno-format -Wno-pointer-sign -g |
bd29dab4 | 7 | CONFIGURE_ARGS = \ |
5084c13f MW |
8 | --prefix=/usr --libexecdir=/usr/lib --sysconfdir=/etc --enable-curl \ |
9 | --enable-ldap --disable-aes --disable-des --disable-md5 --disable-sha1 \ | |
10 | --disable-sha2 --disable-fips-prf --disable-gmp --disable-pgp --disable-dnskey \ | |
11 | --enable-mysql --enable-sqlite --enable-eap-identity --enable-eap-md5 \ | |
12 | --enable-eap-mschapv2 --enable-eap-tls --enable-eap-radius --enable-xauth-eap \ | |
13 | --enable-farp --enable-attr-sql --enable-dhcp --enable-openssl --enable-agent \ | |
14 | --enable-pkcs11 --enable-ctr --enable-ccm --enable-gcm --enable-addrblock \ | |
15 | --enable-nm --disable-hmac --with-capabilities=libcap \ | |
16 | --with-ipsecdir=/usr/lib/strongswan --with-ipseclibdir=/usr/lib/strongswan | |
f4cb848e MW |
17 | |
18 | ifeq (,$(filter noopt,$(DEB_BUILD_OPTIONS))) | |
19 | CFLAGS += -O2 | |
20 | endif | |
f4cb848e MW |
21 | ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS))) |
22 | NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS))) | |
23 | MAKEFLAGS += -j$(NUMJOBS) | |
24 | endif | |
bd29dab4 MW |
25 | ifeq ($(DEB_BUILD_ARCH_CPU),i386) |
26 | CONFIGURE_ARGS += --enable-padlock | |
27 | endif | |
f4cb848e MW |
28 | |
29 | build: | |
30 | dh_testdir | |
328447ac MW |
31 | ./configure $(CONFIGURE_ARGS) CC="$(CC)" CFLAGS="$(CFLAGS)" |
32 | $(MAKE) | |
f4cb848e MW |
33 | touch build |
34 | ||
35 | clean: | |
36 | dh_testdir | |
37 | dh_testroot | |
38 | rm -f build | |
39 | [ ! -f Makefile ] || $(MAKE) clean | |
40 | dh_clean | |
41 | ||
42 | install: build | |
43 | dh_testdir | |
44 | dh_testroot | |
45 | dh_clean | |
46 | dh_installdirs | |
47 | $(MAKE) DESTDIR=$(CURDIR)/debian/tmp install | |
48 | ||
49 | binary-indep: build install | |
50 | binary-arch: build install | |
51 | dh_testdir | |
52 | dh_testroot | |
53 | dh_installchangelogs NEWS | |
54 | dh_installdocs README | |
55 | dh_installinit --name=ipsec | |
6ce32d87 | 56 | dh_install -s |
f4cb848e MW |
57 | dh_link |
58 | dh_strip | |
59 | dh_compress | |
6ce32d87 | 60 | dh_fixperms -Xetc/ipsec.secrets -Xetc/ipsec.d |
f4cb848e MW |
61 | dh_makeshlibs |
62 | dh_installdeb | |
63 | dh_shlibdeps | |
6ce32d87 | 64 | dh_gencontrol -s |
f4cb848e | 65 | dh_md5sums |
6ce32d87 | 66 | dh_builddeb -s |
f4cb848e MW |
67 | |
68 | binary: binary-indep binary-arch | |
69 | .PHONY: build clean binary-indep binary-arch binary install | |
70 |