ike: Fix half-open count for initiating SAs when initially checked in
[strongswan.git] / packages / strongswan / debian / rules
1 #!/usr/bin/make -f
2
3 #export DH_VERBOSE=1
4
5 CC = gcc
6 CFLAGS = -Wall -Wno-format -Wno-pointer-sign -g
7 CONFIGURE_ARGS = \
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 \
17         --with-dev-headers=/usr/include/strongswan
18
19 ifeq (,$(filter noopt,$(DEB_BUILD_OPTIONS)))
20         CFLAGS += -O2
21 endif
22 ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
23         NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
24         MAKEFLAGS += -j$(NUMJOBS)
25 endif
26 ifeq ($(DEB_BUILD_ARCH_CPU),i386)
27   CONFIGURE_ARGS += --enable-padlock
28 endif
29
30 build:
31         dh_testdir
32         ./configure $(CONFIGURE_ARGS) CC="$(CC)" CFLAGS="$(CFLAGS)"
33         $(MAKE)
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
57         dh_install -s
58         dh_link
59         dh_strip --dbg=strongswan-dbg
60         dh_compress
61         dh_fixperms -Xetc/ipsec.secrets -Xetc/ipsec.d
62         dh_makeshlibs
63         dh_installdeb
64         dh_shlibdeps
65         dh_gencontrol -s
66         dh_md5sums
67         dh_builddeb -s
68
69 binary: binary-indep binary-arch
70 .PHONY: build clean binary-indep binary-arch binary install
71