From fb1a841f06ce9e0a48759b703689a8b1c6ed51dedf0facbbd16c541127f93a2d Mon Sep 17 00:00:00 2001 From: Marius Tomaschewski Date: Mon, 22 Nov 2010 09:10:09 +0000 Subject: [PATCH] - Cleaned up spec file; use with_mysql,sqlite,gcrypt,nm flags - Disabled tests sub-package with load-tester and test-vectors plugins by default using a with_tests flag. OBS-URL: https://build.opensuse.org/package/show/network:vpn/strongswan?expand=0&rev=22 --- strongswan.changes | 7 +++ strongswan.spec | 153 ++++++++++++++++++++++++++------------------- 2 files changed, 94 insertions(+), 66 deletions(-) diff --git a/strongswan.changes b/strongswan.changes index 2b05921..01c7650 100644 --- a/strongswan.changes +++ b/strongswan.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Mon Nov 22 09:05:30 UTC 2010 - mt@suse.de + +- Cleaned up spec file; use with_mysql,sqlite,gcrypt,nm flags +- Disabled tests sub-package with load-tester and test-vectors + plugins by default using a with_tests flag. + ------------------------------------------------------------------- Tue Nov 16 12:01:46 UTC 2010 - mt@suse.de diff --git a/strongswan.spec b/strongswan.spec index 045265d..d1f6c6c 100644 --- a/strongswan.spec +++ b/strongswan.spec @@ -22,6 +22,11 @@ Name: strongswan %define upstream_version 4.5.0 %define strongswan_docdir %{_docdir}/%{name} %define strongswan_plugins %{_libexecdir}/ipsec/plugins +%define with_mysql 1 +%define with_sqlite 0%{suse_version} >= 1110 +%define with_gcrypt 0%{suse_version} >= 1110 +%define with_nm 0%{suse_version} >= 1110 +%define with_tests 0 Version: 4.5.0 Release: 1 License: GPLv2+ @@ -42,15 +47,20 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: bison flex gmp-devel gperf pkg-config BuildRequires: libcap-devel BuildRequires: libopenssl-devel -BuildRequires: libgcrypt-devel BuildRequires: openldap2-devel BuildRequires: curl-devel pam-devel -%if 0%{suse_version} >= 1110 -BuildRequires: libuuid-devel -BuildRequires: NetworkManager-devel +%if %with_mysql +BuildRequires: libmysqlclient-devel +%endif +%if %with_sqlite BuildRequires: sqlite3-devel %endif -BuildRequires: libmysqlclient-devel +%if %with_gcrypt +BuildRequires: libgcrypt-devel +%endif +%if %with_nm +BuildRequires: NetworkManager-devel +%endif %description StrongSwan is an OpenSource IPsec-based VPN Solution for Linux @@ -117,44 +127,6 @@ StrongSwan is an OpenSource IPsec-based VPN Solution for Linux This package provides the strongswan library and plugins. -%package mysql -License: GPLv2+ -Summary: OpenSource IPsec-based VPN Solution -Group: Productivity/Networking/Security -Requires: strongswan-libs0 = %{version} - -%description mysql -StrongSwan is an OpenSource IPsec-based VPN Solution for Linux - -This package provides the strongswan mysql plugin. - -%if 0%{suse_version} >= 1110 - -%package sqlite -License: GPLv2+ -Summary: OpenSource IPsec-based VPN Solution -Group: Productivity/Networking/Security -Requires: strongswan-libs0 = %{version} - -%description sqlite -StrongSwan is an OpenSource IPsec-based VPN Solution for Linux - -This package provides the strongswan sqlite plugin. - -%endif - -%package tests -License: GPLv2+ -Summary: OpenSource IPsec-based VPN Solution -Group: Productivity/Networking/Security -Requires: strongswan-libs0 = %{version} - -%description tests -StrongSwan is an OpenSource IPsec-based VPN Solution for Linux - -This package provides the strongswan crypto test-vectors plugin -and the load testing plugin for IKEv2 daemon. - %package ikev1 License: GPLv2+ Summary: OpenSource IPsec-based VPN Solution @@ -193,8 +165,6 @@ Group: Productivity/Networking/Security PreReq: grep %insserv_prereq %fillup_prereq Requires: strongswan-libs0 = %{version} Requires: strongswan-daemon = %{version} -#Recommends: strongswan-ikev1 = %{version} -#Recommends: strongswan-ikev2 = %{version} Provides: strongswan-daemon-starter = %{version} Provides: strongswan = %{version} ipsec VPN Obsoletes: strongswan < %{version} @@ -207,8 +177,35 @@ This package provides the /etc/init.d/ipsec service script and allows to maintain both, IKEv1 and IKEv2 daemons, using /etc/ipsec.conf and /etc/ipsec.sectes files. -%if 0%{suse_version} >= 1110 +%if %with_mysql +%package mysql +License: GPLv2+ +Summary: OpenSource IPsec-based VPN Solution +Group: Productivity/Networking/Security +Requires: strongswan-libs0 = %{version} +%description mysql +StrongSwan is an OpenSource IPsec-based VPN Solution for Linux + +This package provides the strongswan mysql plugin. + +%endif + +%if %with_sqlite +%package sqlite +License: GPLv2+ +Summary: OpenSource IPsec-based VPN Solution +Group: Productivity/Networking/Security +Requires: strongswan-libs0 = %{version} + +%description sqlite +StrongSwan is an OpenSource IPsec-based VPN Solution for Linux + +This package provides the strongswan sqlite plugin. + +%endif + +%if %with_nm %package nm License: GPLv2+ Summary: OpenSource IPsec-based VPN Solution @@ -226,6 +223,21 @@ NetworkManager-strongswan graphical user interface. %endif +%if %with_tests +%package tests +License: GPLv2+ +Summary: OpenSource IPsec-based VPN Solution +Group: Productivity/Networking/Security +Requires: strongswan-libs0 = %{version} + +%description tests +StrongSwan is an OpenSource IPsec-based VPN Solution for Linux + +This package provides the strongswan crypto test-vectors plugin +and the load testing plugin for IKEv2 daemon. + +%endif + %prep %setup -q -n %{name}-%{upstream_version} %patch1 -p0 @@ -269,16 +281,24 @@ export RPM_OPT_FLAGS CFLAGS --enable-sql \ --enable-attr-sql \ --enable-addrblock \ -%if 0%{suse_version} >= 1110 - --enable-gcrypt \ - --enable-nm \ +%if %with_mysql + --enable-mysql \ +%endif +%if %with_sqlite --enable-sqlite \ %endif - --enable-ldap \ - --enable-curl \ - --enable-mysql \ +%if %with_gcrypt + --enable-gcrypt \ +%endif +%if %with_nm + --enable-nm \ +%endif +%if %with_tests --enable-load-tester \ - --enable-test-vectors + --enable-test-vectors \ +%endif + --enable-ldap \ + --enable-curl make %{?_smp_mflags:%_smp_mflags} %install @@ -383,16 +403,6 @@ fi %defattr(-,root,root) %dir %{_libexecdir}/ipsec %{_libexecdir}/ipsec/charon -#%dir %{strongswan_plugins} - -%if 0%{suse_version} >= 1110 - -%files nm -%defattr(-,root,root) -%dir %{_libexecdir}/ipsec -%dir %{strongswan_plugins} -%{strongswan_plugins}/libstrongswan-nm.so -%endif %files doc %defattr(-,root,root) @@ -465,7 +475,7 @@ fi %{strongswan_plugins}/libstrongswan-eap-sim.so %{strongswan_plugins}/libstrongswan-farp.so %{strongswan_plugins}/libstrongswan-fips-prf.so -%if 0%{suse_version} >= 1110 +%if %with_gcrypt %{strongswan_plugins}/libstrongswan-gcrypt.so %endif %{strongswan_plugins}/libstrongswan-gmp.so @@ -492,23 +502,34 @@ fi %{strongswan_plugins}/libstrongswan-xcbc.so %dir %ghost %{_localstatedir}/run/strongswan +%if %with_nm +%files nm +%defattr(-,root,root) +%dir %{_libexecdir}/ipsec +%dir %{strongswan_plugins} +%{strongswan_plugins}/libstrongswan-nm.so +%endif + +%if %with_mysql %files mysql %defattr(-,root,root) %dir %{strongswan_plugins} %{strongswan_plugins}/libstrongswan-mysql.so +%endif -%if 0%{suse_version} >= 1110 - +%if %with_sqlite %files sqlite %defattr(-,root,root) %dir %{strongswan_plugins} %{strongswan_plugins}/libstrongswan-sqlite.so %endif +%if %with_tests %files tests %defattr(-,root,root) %dir %{strongswan_plugins} %{strongswan_plugins}/libstrongswan-load-tester.so %{strongswan_plugins}/libstrongswan-test-vectors.so +%endif %changelog