Upgraded our Debian package to 5.0
[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
18 ifeq (,$(filter noopt,$(DEB_BUILD_OPTIONS)))
19         CFLAGS += -O2
20 endif
21 ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
22         NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
23         MAKEFLAGS += -j$(NUMJOBS)
24 endif
25 ifeq ($(DEB_BUILD_ARCH_CPU),i386)
26   CONFIGURE_ARGS += --enable-padlock
27 endif
28
29 build:
30         dh_testdir
31         ./configure $(CONFIGURE_ARGS)
32         $(MAKE) CC="$(CC)" CFLAGS="$(CFLAGS)"
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
56         dh_install -s
57         dh_link
58         dh_strip
59         dh_compress
60         dh_fixperms -Xetc/ipsec.secrets -Xetc/ipsec.d
61         dh_makeshlibs
62         dh_installdeb
63         dh_shlibdeps
64         dh_gencontrol -s
65         dh_md5sums
66         dh_builddeb -s
67
68 binary: binary-indep binary-arch
69 .PHONY: build clean binary-indep binary-arch binary install
70