File novell-ipsec-tools.spec of Package novell-ipsec-tools

#
# spec file for package novell-ipsec-tools (Version 0.7.3)
#
# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# 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.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#

# norootforbuild


Name:           novell-ipsec-tools
BuildRequires:  bison flex openssl-devel
Version:        0.7.3
Release:        1
License:        BSD3c(or similar)
Group:          Productivity/Networking/Security
PreReq:         %insserv_prereq %fillup_prereq
AutoReqProv:    on
Summary:        IPsec Utilities with turnpike plugin enabled
Source:         ipsec-tools-%{version}.tar.bz2
Source1:        racoon.init
Source2:        sysconfig.racoon
Source3:        setkey.conf.sample
Source4:        racoon.conf.turnpike
Patch0:         %{name}_plugins-support-configure.patch
Patch1:         %{name}_plugins-support-racoon.conf.patch
Patch2:         %{name}_plugins-support-core.patch
Patch3:         %{name}_plugins-support-nortel.patch
Patch4:         %{name}_plugins-cfparse.patch
Patch5:         no_werror.patch
Patch6:         novell-ipsec-tools_plugins-am111.patch
Patch7:         novell-ipsec-tools_nit-includes.patch
Url:            http://forge.novell.com/modules/xfmod/project/?turnpike
Prefix:         /usr
Conflicts:      ipsec-tools
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
%define _sysconfdir     /etc/racoon
%define _sharedstatedir /var/run
%define _localstatedir  /var/run
%define sysconfdir      /etc

%description
This is the patched IPsec-Tools package, that contains patches for the
plugin framework to make vendor plugins make use of these tools to
provide IPSec based solutions like VPN client.

This package is needed to make use of the IPsec functionality in the
version 2.5 and 2.6 Linux kernels. This package builds:

* libipsec, a PFKeyV2 library

* setkey, a program to directly manipulate policies and SAs

* racoon, an IKEv1 keying daemon

These sources can be found at the IPsec-Tools home page at:
http://ipsec-tools.sourceforge.net/

The source and details about the framework can be found at
http://forge.novell.com/modules/xfmod/project/?turnpike

novell-ipsec-tools is a preview package to be used along with the
Novell VPN client. This package will be merged with the main stream
ipsec-tools in future.



%package devel
License:        BSD3c(or similar)
Provides:       libipsec libracoon
Requires:       novell-ipsec-tools = %{version} flex glibc-devel
Summary:        IPsec Utilities with turnpike plugin enabled
Provides:       ipsec-tools-devel
Group:          Development/Libraries/Other
AutoReqProv:    on
PreReq:         %install_info_prereq
PreReq:         %install_info_prereq %insserv_prereq  %fillup_prereq

%description devel
This is the IPsec-Tools package. This package is needed to really make
use of the IPsec functionality in the version 2.5 and 2.6 Linux
kernels. This package builds:

* libipsec, a PFKeyV2 library

* setkey, a program to directly manipulate policies and SAs

* racoon, an IKEv1 keying daemon

These sources can be found at the IPsec-Tools home page at:
http://ipsec-tools.sourceforge.net/

This package additionally contain the plugin framework to make vendor
plugins make use of these tools to provide IPSec based solutions like
VPN client.

The source and details about the framework can be found at
http://forge.novell.com/modules/xfmod/project/?turnpike



%prep
%setup -q -n ipsec-tools-%{version}
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1
%patch6 -p1
%patch7 -p1
ln -sf acracoon.m4 acinclude.m4

%build
%{suse_update_config -f . src/racoon}
#autoreconf -fi
./bootstrap
export CFLAGS="%optflags -fno-strict-aliasing"
%configure --disable-shared \
	--with-readline=no \
	--enable-plugins-support \
	--mandir=%{_mandir} --infodir=%{_infodir} --libdir=%{_libdir} \
	--libexecdir=%{_prefix}/lib --sysconfdir=%{_sysconfdir} \
	--sharedstatedir=%{_sharedstatedir} --localstatedir=%{_localstatedir} \
	--enable-adminport --enable-natt \
	--enable-natt-versions=00,01,02,03,rfc \
	--enable-apclient \
	--enable-dpd --enable-hybrid --enable-frag \
	--enable-security-context=no
make 

%check
make check

%install
make install DESTDIR=$RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT/etc/init.d
install -m 0755 %{S:1} $RPM_BUILD_ROOT/etc/init.d/racoond
ln -sf /etc/init.d/racoond $RPM_BUILD_ROOT%{_sbindir}/rcracoond
mkdir -p $RPM_BUILD_ROOT/var/adm/fillup-templates
install -m 644 %{S:2} $RPM_BUILD_ROOT/var/adm/fillup-templates/
mkdir -p $RPM_BUILD_ROOT/%{_defaultdocdir}/%{name}/
cp -rv src/racoon/samples $RPM_BUILD_ROOT/%{_defaultdocdir}/%{name}/
cp -v src/setkey/sample* $RPM_BUILD_ROOT/%{_defaultdocdir}/%{name}/
mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}
#mkdir -p -m 0755 $RPM_BUILD_ROOT/%{_sharedstatedir}/%{name}
install -m 0600 src/racoon/samples/psk.txt $RPM_BUILD_ROOT/%{_sysconfdir}
#install -m 0644 src/racoon/samples/racoon.conf $RPM_BUILD_ROOT/{_sysconfdir}
cp -v %{S:3} $RPM_BUILD_ROOT/%{_sysconfdir}/setkey.conf
cp -v %{S:4} $RPM_BUILD_ROOT/%{_sysconfdir}/racoon.conf
cp -v %{S:4} $RPM_BUILD_ROOT/%{_defaultdocdir}/%{name}/

%post
%{fillup_and_insserv racoond}

%preun
%stop_on_removal racoond

%postun
%restart_on_update racoond
%{insserv_cleanup}

%clean

%files
%defattr(-,root,root)
%dir %{_sysconfdir}
%config(noreplace) %{_sysconfdir}/psk.txt
%config(noreplace) %{_sysconfdir}/racoon.conf
%config(noreplace) %{_sysconfdir}/setkey.conf
%config /etc/init.d/racoond
%{_sbindir}/rcracoond
%doc %{_defaultdocdir}/%{name}/
/var/adm/fillup-templates/sysconfig.racoon
%{_sbindir}/racoon
%{_sbindir}/racoonctl
%{_sbindir}/setkey
%{_sbindir}/plainrsa-gen
%dir %{_localstatedir}/racoon
%doc %{_mandir}/man*/*

%files devel
%defattr(-,root,root)
%dir %{_includedir}/plugin_frame/
%dir %{_includedir}/libipsec/
%dir %{_includedir}/racoon/
%{_includedir}/plugin_frame/*
%{_includedir}/libipsec/*
%{_includedir}/racoon/*
%{_libdir}/libipsec.a
%{_libdir}/libipsec.la
%{_libdir}/libracoon.a
%{_libdir}/libracoon.la

%changelog
openSUSE Build Service is sponsored by