archrelease: copy trunk to community-any
[ArchLinux/community.git] / strongswan / repos / community-x86_64 / PKGBUILD
blobdb9182bdaadb0c6cc5cb201a75f0a0b15f088a5b
1 # Maintainer : Christian Rebischke <Chris.Rebischke@archlinux.org>
2 # Contributor: dkorzhevin <dkorzhevin at gmail dot com>
3 # Contributor: Thermi <noel [at] familie-kuntze dot de>
4 # Contributor: nikicat <develniks at gmail dot com>
5 # Contributor: danilo <gezuru at gmail dot com>
6 # Contributor: Jason Begley <jayray at digitalgoat dot com>
7 # Contributor: Ray Kohler <ataraxia937 at gmail dot com>
8 # Contributor: Daniel Riedemann <daniel.riedemann [at] googlemail [dot] com>
9 # Contributor: 458italia <svenskaparadox [at] gmail dot com>
10 # Contributor: Thermi <noel [at] familie-kuntze dot com>
12 pkgname=strongswan
13 pkgver=5.9.10
14 pkgrel=1
15 pkgdesc='Open source IPsec implementation'
16 url='https://www.strongswan.org'
17 license=('GPL2')
18 arch=('x86_64')
19 makedepends=('libnm' 'systemd' 'python' 'ruby' 'mariadb' 'python-setuptools')
20 depends=('curl' 'gmp' 'iproute2' 'openssl' 'sqlite' 'libcap' 'systemd-libs' 'pam')
21 optdepends=('libnm: for networkmanager support'
22   'mariadb: MySQL support'
23   'ruby: Ruby support'
24   'python: Python support'
25   'resolvconf: Resolveplugin'
26   'openldap: LDAP support')
27 # TODO: move to package() and use find
28 backup=(
29   etc/ipsec.conf
30   etc/ipsec.secrets
31   etc/swanctl/swanctl.conf
32   etc/strongswan.conf
33   etc/strongswan.d/{charon-logging.conf,charon.conf,pki.conf,pool.conf,scepclient.conf,starter.conf,swanctl.conf}
34   etc/strongswan.d/charon/{aesni.conf,attr-sql.conf,attr.conf,bliss.conf,chapoly.conf,cmac.conf,connmark.conf,constraints.conf,curl.conf,des.conf,dhcp.conf,dnskey.conf,eap-aka-3gpp2.conf,eap-aka.conf,eap-gtc.conf,eap-identity.conf,eap-md5.conf,eap-mschapv2.conf,eap-radius.conf,eap-sim-file.conf,eap-sim.conf,eap-simaka-pseudonym.conf,eap-simaka-reauth.conf,eap-tls.conf,ext-auth.conf,farp.conf,fips-prf.conf,forecast.conf,gmp.conf,ha.conf,hmac.conf,kernel-netlink.conf,md5.conf,mgf1.conf,nonce.conf,newhope.conf,ntru.conf,openssl.conf,pem.conf,pgp.conf,pkcs1.conf,pkcs12.conf,pkcs7.conf,pkcs8.conf,pubkey.conf,random.conf,rc2.conf,resolve.conf,revocation.conf,sha1.conf,sha2.conf,sha3.conf,socket-default.conf,sql.conf,sqlite.conf,sshkey.conf,stroke.conf,updown.conf,vici.conf,x509.conf,xauth-eap.conf,xauth-generic.conf,xcbc.conf,unity.conf,curve25519.conf,bypass-lan.conf})
35 source=("https://download.strongswan.org/strongswan-${pkgver}.tar.bz2"{,.sig}
36   'configure_ac.patch')
38 validpgpkeys=("948F158A4E76A27BF3D07532DF42C170B34DBA77")
39 sha512sums=('cf1d4a79ec02ac0502494ce6bfcab7399ddff151e2bc39bd4fbb9562bae7d0c66cf8d1e387b3c36a35e4387d597889fd7519e7bce07d3a7f764b1b73bd8a4667'
40             'SKIP'
41             '0e2c818f2f620410dda949d9016a4c1a686bf2946acb3b42a729b2376c077f4dad6762fe8d2f736c213c4895c1fbd60c0d654a1c36f72d06f58ba7cff635bc74')
42 install=strongswan.install
43 #options=('debug' '!strip')
44 # We don't build libipsec because it would get loaded before kernel-netlink and netkey, which
45 # would case processing to be handled in user space. Also, the plugin is experimental. If you need it,
46 # add --enable-libipsec and --enable-kernel-libipsec
47 prepare() {
48   cd ${pkgname}-${pkgver}
49   patch -p1 -l <"${srcdir}/configure_ac.patch"
50   autoreconf -fiv
53 build() {
54   cd ${pkgname}-${pkgver}
55 #  CFLAGS="$CFLAGS -O2 -Wall"
56   ./configure --prefix=/usr \
57     --sbindir=/usr/bin \
58     --sysconfdir=/etc \
59     --libexecdir=/usr/lib \
60     --with-ipsecdir=/usr/lib/strongswan \
61     --with-nm-ca-dir=/etc/ssl/certs \
62     --enable-integrity-test \
63     --enable-sqlite \
64     --enable-pkcs11 \
65     --enable-openssl \
66     --enable-curl \
67     --enable-sql \
68     --enable-attr-sql \
69     --enable-farp \
70     --enable-dhcp \
71     --enable-eap-sim \
72     --enable-eap-sim-file \
73     --enable-eap-simaka-pseudonym \
74     --enable-eap-simaka-reauth \
75     --enable-eap-identity \
76     --enable-eap-md5 \
77     --enable-eap-gtc \
78     --enable-eap-aka \
79     --enable-eap-aka-3gpp2 \
80     --enable-eap-mschapv2 \
81     --enable-eap-radius \
82     --enable-xauth-eap \
83     --enable-ha \
84     --enable-vici \
85     --enable-swanctl \
86     --enable-systemd \
87     --enable-ext-auth \
88     --enable-mysql \
89     --enable-ldap \
90     --enable-cmd \
91     --enable-forecast \
92     --enable-connmark \
93     --enable-aesni \
94     --enable-eap-ttls \
95     --enable-radattr \
96     --enable-xauth-pam \
97     --enable-xauth-noauth \
98     --enable-eap-dynamic \
99     --enable-eap-peap \
100     --enable-eap-tls \
101     --enable-chapoly \
102     --enable-unity \
103     --with-capabilities=libcap \
104     --enable-newhope \
105     --enable-ntru \
106     --enable-mgf1 \
107     --enable-sha3 \
108     --enable-bliss \
109     --enable-dnscert \
110     --enable-nm \
111     --enable-agent \
112     --enable-bypass-lan \
113     --enable-ruby-gems \
114     --enable-python-eggs
115   make
118 package() {
119   cd   ${pkgname}-${pkgver}
120   make   DESTDIR="${pkgdir}" install
121   # this is not necessary anymore
122   #install -Dm644 "${pkgdir}/etc/dbus-1/system.d/nm-strongswan-service.conf" "${pkgdir}/usr/share/dbus-1/system.d/nm-strongswan-service.conf"
123   #rm -v "${pkgdir}/etc/dbus-1/system.d/nm-strongswan-service.conf"
124   # remove empty directory
125   #rmdir -v "${pkgdir}/etc/dbus-1/system.d"