2007-12-13 04:49:24 +01:00
|
|
|
#
|
2010-05-31 18:22:33 +02:00
|
|
|
# spec file for package strongswan (Version 4.3.6)
|
2007-12-13 04:49:24 +01:00
|
|
|
#
|
2010-03-05 11:51:28 +01:00
|
|
|
# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
2007-12-13 04:49:24 +01:00
|
|
|
#
|
2008-08-28 12:57:23 +02:00
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
2007-12-13 04:49:24 +01:00
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
|
|
#
|
|
|
|
|
|
|
|
# norootforbuild
|
|
|
|
|
2008-02-19 14:17:02 +01:00
|
|
|
|
2007-12-13 04:49:24 +01:00
|
|
|
Name: strongswan
|
2010-05-31 18:22:33 +02:00
|
|
|
%define upstream_version 4.3.6
|
|
|
|
%define strongswan_docdir %{_docdir}/%{name}
|
|
|
|
Version: 4.3.6
|
|
|
|
Release: 1
|
2010-03-05 11:51:28 +01:00
|
|
|
License: GPLv2+
|
2007-12-13 04:49:24 +01:00
|
|
|
Group: Productivity/Networking/Security
|
2010-05-31 18:22:33 +02:00
|
|
|
Summary: StrongSwan -- OpenSource IPsec-based VPN Solution
|
2007-12-13 04:49:24 +01:00
|
|
|
Url: http://www.strongswan.org/
|
2010-05-31 18:22:33 +02:00
|
|
|
PreReq: gmp grep %insserv_prereq %fillup_prereq
|
|
|
|
Requires: iproute2
|
|
|
|
Provides: pluto klips ipsec VPN freeswan
|
|
|
|
Obsoletes: freeswan
|
|
|
|
Conflicts: openswan
|
2007-12-13 04:49:24 +01:00
|
|
|
AutoReqProv: on
|
|
|
|
Source0: http://download.strongswan.org/strongswan-%{upstream_version}.tar.bz2
|
|
|
|
Source1: http://download.strongswan.org/strongswan-%{upstream_version}.tar.bz2.sig
|
|
|
|
Source2: %{name}.init.in
|
2008-04-25 16:46:58 +02:00
|
|
|
Source3: %{name}-%{version}-rpmlintrc
|
2009-07-14 23:56:37 +02:00
|
|
|
Patch1: %{name}_modprobe_syslog.patch
|
2010-05-31 18:22:33 +02:00
|
|
|
Patch2: strongswan-4.3.6-time_t_ptr.diff
|
2007-12-13 04:49:24 +01:00
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
|
|
BuildRequires: bison flex gmp-devel gperf pkg-config
|
2009-07-14 23:56:37 +02:00
|
|
|
BuildRequires: libcap-devel
|
|
|
|
BuildRequires: libopenssl-devel
|
|
|
|
BuildRequires: libgcrypt-devel
|
2007-12-13 04:49:24 +01:00
|
|
|
BuildRequires: openldap2-devel
|
2010-05-31 18:22:33 +02:00
|
|
|
BuildRequires: curl-devel
|
2007-12-13 04:49:24 +01:00
|
|
|
|
|
|
|
%description
|
|
|
|
StrongSwan is an OpenSource IPsec-based VPN Solution for Linux
|
|
|
|
|
2010-03-05 11:51:28 +01:00
|
|
|
* runs both on Linux 2.4 (KLIPS IPsec) and Linux 2.6 (NETKEY IPsec) kernels
|
|
|
|
* implements both the IKEv1 and IKEv2 (RFC 4306) key exchange protocols
|
|
|
|
* Fully tested support of IPv6 IPsec tunnel and transport connections
|
|
|
|
* Dynamical IP address and interface update with IKEv2 MOBIKE (RFC 4555)
|
|
|
|
* Automatic insertion and deletion of IPsec-policy-based firewall rules
|
|
|
|
* Strong 128/192/256 bit AES or Camellia encryption, 3DES support
|
2007-12-13 04:49:24 +01:00
|
|
|
* NAT-Traversal via UDP encapsulation and port floating (RFC 3947)
|
|
|
|
* Dead Peer Detection (DPD, RFC 3706) takes care of dangling tunnels
|
2010-03-05 11:51:28 +01:00
|
|
|
* Static virtual IPs and IKEv1 ModeConfig pull and push modes
|
|
|
|
* XAUTH server and client functionality on top of IKEv1 Main Mode authentication
|
|
|
|
* Virtual IP address pool managed by IKE daemon or SQL database
|
|
|
|
* Secure IKEv2 EAP user authentication (EAP-SIM, EAP-AKA, EAP-MSCHAPv2, etc.)
|
|
|
|
* Optional relaying of EAP messages to AAA server via EAP-RADIUS plugin
|
|
|
|
* Support of IKEv2 Multiple Authentication Exchanges (RFC 4739)
|
2007-12-13 04:49:24 +01:00
|
|
|
* Authentication based on X.509 certificates or preshared keys
|
2010-03-05 11:51:28 +01:00
|
|
|
* Generation of a default self-signed certificate during first strongSwan startup
|
|
|
|
* Retrieval and local caching of Certificate Revocation Lists via HTTP or LDAP
|
|
|
|
* Full support of the Online Certificate Status Protocol (OCSP, RCF 2560).
|
2007-12-13 04:49:24 +01:00
|
|
|
* CA management (OCSP and CRL URIs, default LDAP server)
|
|
|
|
* Powerful IPsec policies based on wildcards or intermediate CAs
|
2010-03-05 11:51:28 +01:00
|
|
|
* Group policies based on X.509 attribute certificates (RFC 3281)
|
|
|
|
* Storage of RSA private keys and certificates on a smartcard (PKCS #11 interface)
|
|
|
|
* Modular plugins for crypto algorithms and relational database interfaces
|
|
|
|
* Support of elliptic curve DH groups and ECDSA certificates (Suite B, RFC 4869)
|
|
|
|
* Optional built-in integrity and crypto tests for plugins and libraries
|
2007-12-13 04:49:24 +01:00
|
|
|
|
|
|
|
|
|
|
|
Authors:
|
|
|
|
--------
|
|
|
|
Andreas Steffen
|
|
|
|
and others
|
|
|
|
|
|
|
|
%package doc
|
2010-05-31 18:22:33 +02:00
|
|
|
License: GPLv2+
|
|
|
|
Summary: StrongSwan -- OpenSource IPsec-based VPN Solution
|
2007-12-13 04:49:24 +01:00
|
|
|
Group: Productivity/Networking/Security
|
|
|
|
|
|
|
|
%description doc
|
|
|
|
StrongSwan is an OpenSource IPsec-based VPN Solution for Linux
|
|
|
|
|
|
|
|
This package provides the StrongSwan documentation.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Authors:
|
|
|
|
--------
|
|
|
|
Andreas Steffen
|
|
|
|
and others
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q -n %{name}-%{upstream_version}
|
|
|
|
%patch1 -p0
|
2010-05-31 18:22:33 +02:00
|
|
|
%patch2 -p0
|
2007-12-13 04:49:24 +01:00
|
|
|
sed -e 's|@libexecdir@|%_libexecdir|g' \
|
|
|
|
< $RPM_SOURCE_DIR/strongswan.init.in \
|
|
|
|
> strongswan.init
|
|
|
|
|
|
|
|
%build
|
2009-07-30 23:00:09 +02:00
|
|
|
CFLAGS="$RPM_OPT_FLAGS -W -Wall -Wno-pointer-sign -Wno-strict-aliasing"
|
|
|
|
export RPM_OPT_FLAGS CFLAGS
|
2010-03-05 11:51:28 +01:00
|
|
|
#libtoolize --force
|
2007-12-13 04:49:24 +01:00
|
|
|
%{?suse_update_config:%{suse_update_config -f}}
|
2010-05-31 18:22:33 +02:00
|
|
|
autoreconf
|
2007-12-13 04:49:24 +01:00
|
|
|
%configure \
|
2009-07-30 23:00:09 +02:00
|
|
|
--enable-integrity-test \
|
2009-07-14 23:56:37 +02:00
|
|
|
--with-capabilities=libcap \
|
|
|
|
--with-resolv-conf=%{_localstatedir}/run/strongswan/resolv.conf \
|
|
|
|
--enable-smartcard \
|
|
|
|
--with-default-pkcs11=%{_libdir}/opensc-pkcs11.so \
|
|
|
|
--enable-cisco-quirks \
|
|
|
|
--enable-openssl \
|
2010-05-14 21:20:22 +02:00
|
|
|
%if 0%{suse_version} >= 1110
|
|
|
|
--enable-gcrypt \
|
|
|
|
%endif
|
2009-07-14 23:56:37 +02:00
|
|
|
--enable-ldap \
|
2010-05-14 21:20:22 +02:00
|
|
|
--enable-curl
|
2008-08-29 01:51:42 +02:00
|
|
|
make %{?_smp_mflags:%_smp_mflags}
|
2007-12-13 04:49:24 +01:00
|
|
|
|
|
|
|
%install
|
|
|
|
export RPM_BUILD_ROOT
|
|
|
|
install -m755 -d ${RPM_BUILD_ROOT}%{_sbindir}/
|
2008-08-29 01:51:42 +02:00
|
|
|
install -m755 -d ${RPM_BUILD_ROOT}%{_sysconfdir}/ipsec.d/
|
2007-12-13 04:49:24 +01:00
|
|
|
install -m755 -d ${RPM_BUILD_ROOT}%{_sysconfdir}/init.d/
|
|
|
|
install -m755 strongswan.init ${RPM_BUILD_ROOT}%{_sysconfdir}/init.d/ipsec
|
2010-05-31 18:22:33 +02:00
|
|
|
ln -s %{_sysconfdir}/init.d/ipsec ${RPM_BUILD_ROOT}%{_sbindir}/rcipsec
|
2007-12-13 04:49:24 +01:00
|
|
|
#
|
|
|
|
make install DESTDIR="$RPM_BUILD_ROOT"
|
|
|
|
#
|
|
|
|
rm -f ${RPM_BUILD_ROOT}%{_sysconfdir}/ipsec.secrets
|
|
|
|
cat << EOT > ${RPM_BUILD_ROOT}%{_sysconfdir}/ipsec.secrets
|
|
|
|
#
|
|
|
|
# ipsec.secrets
|
|
|
|
#
|
|
|
|
# This file holds the RSA private keys or the PSK preshared secrets for
|
|
|
|
# the IKE/IPsec authentication. See the ipsec.secrets(5) manual page.
|
|
|
|
#
|
|
|
|
EOT
|
|
|
|
#
|
2010-05-31 18:22:33 +02:00
|
|
|
rm -f $RPM_BUILD_ROOT%{_libdir}/libstrongswan.{so,a,la}
|
2009-07-30 23:00:09 +02:00
|
|
|
find $RPM_BUILD_ROOT%{_libexecdir}/ipsec \
|
2007-12-13 04:49:24 +01:00
|
|
|
-name "*.a" -o -name "*.la" | xargs -r rm -f
|
|
|
|
#
|
|
|
|
install -m755 -d ${RPM_BUILD_ROOT}%{strongswan_docdir}/
|
|
|
|
install -m644 TODO NEWS README COPYING CREDITS \
|
|
|
|
${RPM_BUILD_ROOT}%{strongswan_docdir}/
|
2009-07-14 23:56:37 +02:00
|
|
|
install -m755 -d $RPM_BUILD_ROOT%{_localstatedir}/run/strongswan
|
2007-12-13 04:49:24 +01:00
|
|
|
|
2010-05-31 18:22:33 +02:00
|
|
|
%post
|
2007-12-13 04:49:24 +01:00
|
|
|
%{run_ldconfig}
|
|
|
|
%{fillup_and_insserv ipsec}
|
|
|
|
|
2010-05-31 18:22:33 +02:00
|
|
|
%preun
|
2007-12-13 04:49:24 +01:00
|
|
|
%{stop_on_removal ipsec}
|
|
|
|
if test -s %{_sysconfdir}/ipsec.secrets.rpmsave; then
|
|
|
|
cp -p --backup=numbered %{_sysconfdir}/ipsec.secrets.rpmsave %{_sysconfdir}/ipsec.secrets.rpmsave.old
|
|
|
|
fi
|
|
|
|
if test -s %{_sysconfdir}/ipsec.conf.rpmsave; then
|
|
|
|
cp -p --backup=numbered %{_sysconfdir}/ipsec.conf.rpmsave %{_sysconfdir}/ipsec.conf.rpmsave.old
|
|
|
|
fi
|
|
|
|
|
2010-05-31 18:22:33 +02:00
|
|
|
%postun
|
|
|
|
%{run_ldconfig}
|
2007-12-13 04:49:24 +01:00
|
|
|
%{insserv_cleanup}
|
|
|
|
|
|
|
|
%files
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%config(noreplace) %attr(600,root,root) %{_sysconfdir}/ipsec.conf
|
|
|
|
%config(noreplace) %attr(600,root,root) %{_sysconfdir}/ipsec.secrets
|
2010-05-31 18:22:33 +02:00
|
|
|
%config(noreplace) %attr(600,root,root) %{_sysconfdir}/strongswan.conf
|
2007-12-13 04:49:24 +01:00
|
|
|
%dir %{_sysconfdir}/ipsec.d
|
|
|
|
%dir %{_sysconfdir}/ipsec.d/crls
|
|
|
|
%dir %{_sysconfdir}/ipsec.d/reqs
|
|
|
|
%dir %{_sysconfdir}/ipsec.d/certs
|
|
|
|
%dir %{_sysconfdir}/ipsec.d/acerts
|
|
|
|
%dir %{_sysconfdir}/ipsec.d/aacerts
|
|
|
|
%dir %{_sysconfdir}/ipsec.d/cacerts
|
|
|
|
%dir %{_sysconfdir}/ipsec.d/ocspcerts
|
|
|
|
%dir %attr(700,root,root) %{_sysconfdir}/ipsec.d/private
|
|
|
|
%config %{_sysconfdir}/init.d/ipsec
|
|
|
|
%{_sbindir}/rcipsec
|
|
|
|
%{_sbindir}/ipsec
|
2010-05-31 18:22:33 +02:00
|
|
|
%{_libexecdir}/ipsec
|
|
|
|
%{_libdir}/libstrongswan.*
|
2007-12-13 04:49:24 +01:00
|
|
|
%{_mandir}/man5/ipsec.conf.5*
|
|
|
|
%{_mandir}/man5/ipsec.secrets.5*
|
2010-05-31 18:22:33 +02:00
|
|
|
%{_mandir}/man8/ipsec.8*
|
|
|
|
%dir %{_localstatedir}/run/strongswan
|
2007-12-13 04:49:24 +01:00
|
|
|
|
|
|
|
%files doc
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%dir %{strongswan_docdir}
|
|
|
|
%{strongswan_docdir}/TODO
|
|
|
|
%{strongswan_docdir}/NEWS
|
|
|
|
%{strongswan_docdir}/README
|
|
|
|
%{strongswan_docdir}/COPYING
|
|
|
|
%{strongswan_docdir}/CREDITS
|
|
|
|
%{_mandir}/man3/anyaddr.3*
|
|
|
|
%{_mandir}/man3/atoaddr.3*
|
|
|
|
%{_mandir}/man3/atoasr.3*
|
|
|
|
%{_mandir}/man3/atosa.3*
|
|
|
|
%{_mandir}/man3/atoul.3*
|
|
|
|
%{_mandir}/man3/goodmask.3*
|
|
|
|
%{_mandir}/man3/initaddr.3*
|
|
|
|
%{_mandir}/man3/initsubnet.3*
|
|
|
|
%{_mandir}/man3/keyblobtoid.3*
|
|
|
|
%{_mandir}/man3/portof.3*
|
|
|
|
%{_mandir}/man3/prng.3*
|
|
|
|
%{_mandir}/man3/rangetosubnet.3*
|
|
|
|
%{_mandir}/man3/sameaddr.3*
|
|
|
|
%{_mandir}/man3/subnetof.3*
|
|
|
|
%{_mandir}/man3/ttoaddr.3*
|
|
|
|
%{_mandir}/man3/ttodata.3*
|
|
|
|
%{_mandir}/man3/ttosa.3*
|
|
|
|
%{_mandir}/man3/ttoul.3*
|
|
|
|
%{_mandir}/man8/_copyright.8*
|
|
|
|
%{_mandir}/man8/_updown.8*
|
|
|
|
%{_mandir}/man8/_updown_espmark.8*
|
|
|
|
%{_mandir}/man8/openac.8*
|
|
|
|
%{_mandir}/man8/pluto.8*
|
|
|
|
%{_mandir}/man8/scepclient.8*
|
|
|
|
%{_mandir}/man8/starter.8*
|
2008-02-19 14:17:02 +01:00
|
|
|
|
2007-12-13 04:49:24 +01:00
|
|
|
%changelog
|