]>
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 \ | |
eb1b380a MW |
16 | --with-ipsecdir=/usr/lib/strongswan --with-ipseclibdir=/usr/lib/strongswan \ |
17 | --with-dev-headers=/usr/include/strongswan | |
f4cb848e MW |
18 | |
19 | ifeq (,$(filter noopt,$(DEB_BUILD_OPTIONS))) | |
20 | CFLAGS += -O2 | |
21 | endif | |
f4cb848e MW |
22 | ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS))) |
23 | NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS))) | |
24 | MAKEFLAGS += -j$(NUMJOBS) | |
25 | endif | |
bd29dab4 MW |
26 | ifeq ($(DEB_BUILD_ARCH_CPU),i386) |
27 | CONFIGURE_ARGS += --enable-padlock | |
28 | endif | |
f4cb848e MW |
29 | |
30 | build: | |
31 | dh_testdir | |
328447ac MW |
32 | ./configure $(CONFIGURE_ARGS) CC="$(CC)" CFLAGS="$(CFLAGS)" |
33 | $(MAKE) | |
f4cb848e MW |
34 | touch build |
35 | ||
36 | clean: | |
37 | dh_testdir | |
38 | dh_testroot | |
39 | rm -f build | |
40 | [ ! -f Makefile ] || $(MAKE) clean | |
41 | dh_clean | |
42 | ||
43 | install: build | |
44 | dh_testdir | |
45 | dh_testroot | |
46 | dh_clean | |
47 | dh_installdirs | |
48 | $(MAKE) DESTDIR=$(CURDIR)/debian/tmp install | |
49 | ||
50 | binary-indep: build install | |
51 | binary-arch: build install | |
52 | dh_testdir | |
53 | dh_testroot | |
54 | dh_installchangelogs NEWS | |
55 | dh_installdocs README | |
56 | dh_installinit --name=ipsec | |
6ce32d87 | 57 | dh_install -s |
f4cb848e MW |
58 | dh_link |
59 | dh_strip | |
60 | dh_compress | |
6ce32d87 | 61 | dh_fixperms -Xetc/ipsec.secrets -Xetc/ipsec.d |
f4cb848e MW |
62 | dh_makeshlibs |
63 | dh_installdeb | |
64 | dh_shlibdeps | |
6ce32d87 | 65 | dh_gencontrol -s |
f4cb848e | 66 | dh_md5sums |
6ce32d87 | 67 | dh_builddeb -s |
f4cb848e MW |
68 | |
69 | binary: binary-indep binary-arch | |
70 | .PHONY: build clean binary-indep binary-arch binary install | |
71 |