1 ###############################################################################
2 # IPFire.org - An Open Source Firewall Solution #
3 # Copyright (C) - IPFire Development Team <info@ipfire.org> #
4 ###############################################################################
10 groups = Networking/VPN
11 url = http://www.strongswan.org/
13 summary = IPsec (IKEv1 + IKEv2) implementation for Linux.
16 StrongSwan is a complete IPsec and IKEv1 implementation for
17 Linux 2.4 and 2.6 kernels. It also fully supports the new IKEv2
18 protocol with Linux 2.6 kernels. It interoperates in both IKEv1
19 and IKEv2 mode with most other IPsec-based VPN products.
22 source_dl = http://download.strongswan.org/
23 sources = %{thisapp}.tar.bz2
42 systemd-devel >= 221-2
46 configure_options += \
48 --with-ipseclibdir=%{libdir}/ipsec \
60 --enable-xauth-noauth \
65 --enable-eap-mschapv2 \
66 --enable-eap-identity \
69 --with-capabilities=libcap \
76 if "%{DISTRO_ARCH}" == "i686"
77 configure_options += --enable-padlock
80 # The testsuite does not run through in the build system
87 mv -v %{BUILDROOT}%{unitdir}/strongswan{-swanctl,}.service
89 # Install network settings
90 install -v -m 644 %{DIR_SOURCE}/network.conf \
91 %{BUILDROOT}%{sysconfdir}/strongswan.d/
93 # Create directory for connections
94 mkdir -pv %{BUILDROOT}%{sysconfdir}/swanctl/connections
95 echo "include connections/*.conf" > \
96 %{BUILDROOT}%{sysconfdir}/swanctl/swanctl.conf
98 # Drop unneeded files.
99 rm -rvf %{BUILDROOT}%{libdir}/ipsec/lib*.so
101 # Move libraries to libdir.
102 mv %{BUILDROOT}%{libdir}/ipsec/lib*.so.* %{BUILDROOT}%{libdir}
109 systemctl daemon-reload >/dev/null 2>&1 || :
113 systemctl daemon-reload >/dev/null 2>&1 || :
114 systemctl reload-or-try-restart strongswan.service >/dev/null 2>&1 || :
118 systemctl disable --no-reload strongswan.service >/dev/null 2>&1 || :
119 systemctl stop strongswan.service >/dev/null 2>&1 || :
123 systemctl daemon-reload >/dev/null 2>&1 || :
127 package %{name}-debuginfo