testing: Make strongSwan build recipe more configurable
[strongswan.git] / testing / scripts / recipes / 013_strongswan.mk
1 #!/usr/bin/make
2
3 PV = $(SWANVERSION)
4 PKG = strongswan-$(PV)
5 TAR = $(PKG).tar.bz2
6 SRC = http://download.strongswan.org/$(TAR)
7
8 # can be passed to load sources from a directory instead of a tarball
9 ifneq ($(origin SRCDIR), undefined)
10 DIR = $(SRCDIR)
11 BUILDDIR ?= $(SRCDIR)
12 endif
13 DIR ?= .
14 # can be passed if not building in the source directory
15 BUILDDIR ?= $(PKG)
16
17 NUM_CPUS := $(shell getconf _NPROCESSORS_ONLN)
18
19 CONFIG_OPTS = \
20 --sysconfdir=/etc \
21 --with-random-device=/dev/urandom \
22 --disable-load-warning \
23 --enable-curl \
24 --enable-soup \
25 --enable-ldap \
26 --enable-eap-aka \
27 --enable-eap-aka-3gpp2 \
28 --enable-eap-sim \
29 --enable-eap-sim-file \
30 --enable-eap-md5 \
31 --enable-md4 \
32 --enable-eap-mschapv2 \
33 --enable-eap-identity \
34 --enable-eap-radius \
35 --enable-eap-dynamic \
36 --enable-eap-tls \
37 --enable-eap-ttls \
38 --enable-eap-peap \
39 --enable-eap-tnc \
40 --enable-tnc-ifmap \
41 --enable-tnc-pdp \
42 --enable-tnc-imc \
43 --enable-tnc-imv \
44 --enable-tnccs-11 \
45 --enable-tnccs-20 \
46 --enable-tnccs-dynamic \
47 --enable-imc-test \
48 --enable-imv-test \
49 --enable-imc-scanner \
50 --enable-imv-scanner \
51 --enable-imc-os \
52 --enable-imv-os \
53 --enable-imc-attestation \
54 --enable-imv-attestation \
55 --enable-imc-swid \
56 --enable-imv-swid \
57 --enable-sql \
58 --enable-sqlite \
59 --enable-attr-sql \
60 --enable-mediation \
61 --enable-openssl \
62 --enable-blowfish \
63 --enable-kernel-pfkey \
64 --enable-integrity-test \
65 --enable-leak-detective \
66 --enable-load-tester \
67 --enable-test-vectors \
68 --enable-gcrypt \
69 --enable-socket-default \
70 --enable-socket-dynamic \
71 --enable-dhcp \
72 --enable-farp \
73 --enable-addrblock \
74 --enable-ctr \
75 --enable-ccm \
76 --enable-gcm \
77 --enable-cmac \
78 --enable-ha \
79 --enable-af-alg \
80 --enable-whitelist \
81 --enable-xauth-generic \
82 --enable-xauth-eap \
83 --enable-pkcs8 \
84 --enable-unity \
85 --enable-unbound \
86 --enable-ipseckey \
87 --enable-dnscert \
88 --enable-acert \
89 --enable-cmd \
90 --enable-libipsec \
91 --enable-kernel-libipsec \
92 --enable-tkm \
93 --enable-ntru \
94 --enable-lookip
95
96 export ADA_PROJECT_PATH=/usr/local/ada/lib/gnat
97
98 all: install
99
100 $(TAR):
101 wget $(SRC)
102
103 $(PKG): $(TAR)
104 tar xfj $(TAR)
105
106 configure: $(BUILDDIR)
107 cd $(BUILDDIR) && $(DIR)/configure $(CONFIG_OPTS)
108
109 build: configure
110 cd $(BUILDDIR) && make -j $(NUM_CPUS)
111
112 install: build
113 cd $(BUILDDIR) && make install