Sophie

Sophie

distrib > Mandriva > 10.2 > i586 > by-pkgid > 576f68089157277140f357c5cad9cb37 > files > 3

openswan-2.2.0-2mdk.src.rpm

%define their_version 2.2.0
%define debug_package %{nil}
%define name openswan

Summary: An implementation of IPSEC & IKE for Linux.
Name: %name
Version: 2.2.0
Release: 2mdk
Url: http://www.openswan.org/
License: GPL
Group: System/Servers
Source0: http://www.openswan.org/code/openswan-%{their_version}.tar.gz
Source1: http://www.openswan.org/code/openswan-%{their_version}.tar.gz.asc
BuildRoot: %{_tmppath}/%{name}-buildroot
BuildRequires: bison, gmp-devel, pam-devel
BuildRequires: /usr/bin/man2html, htmldoc
Provides: ipsec-userland
Requires: iproute2 ipsec-tools
Prereq: /sbin/chkconfig rpm-helper

%description
Openswan is a free implementation of IPSEC & IKE for Linux, a fork of the 
FreeS/WAN project.

IPSEC is Internet Protocol Security and uses strong cryptography to 
provide both authentication and encryption services.  These services 
allow you to build secure tunnels through untrusted networks.  
Everything passing through the untrusted net is encrypted by the ipsec 
gateway machine and decrypted by the gateway at the other end of the 
tunnel.  The resulting tunnel is a virtual private network or VPN.

This package contains the daemons and userland tools for setting up
Openswan on a kernel with either the 2.6 native IPsec code, or 
FreeS/WAN's KLIPS.

%prep
%setup -q -n openswan-%{their_version}

%build
%serverbuild

find . -name "Makefile*" | xargs perl -pi -e "s|libexec|lib|g"

# the %make macro doesn't seem to work
make \
  USERCOMPILE="-g %{optflags}" \
  INC_USRLOCAL=%{_prefix} \
  MANTREE=%{_mandir} \
  INC_RCDEFAULT=%{_initrddir} \
	CONFDIR=%{_sysconfdir}/%name \
	FINALCONFDIR=%{_sysconfdir}/%name \
	FINALCONFFILE=%{_sysconfdir}/%name/ipsec.conf \
	FINALLIBEXECDIR=%{_libdir}/ipsec \
	FINALLIBDIR=%{_libdir}/ipsec \
  programs

FS=$(pwd)
mkdir -p BUILD.%{_target_cpu}
mkdir -p BUILD.%{_target_cpu}-smp

%install
rm -rf $RPM_BUILD_ROOT

%{make} \
  DESTDIR=%{buildroot} \
  INC_USRLOCAL=%{_prefix} \
  MANTREE=%{buildroot}%{_mandir} \
  INC_RCDEFAULT=%{_initrddir} \
	INC_USRLOCAL=%{_prefix} \
  INC_RCDEFAULT=%{_initrddir} \
  FINALCONFDIR=%{_sysconfdir}/%name \
	FINALLIBEXECDIR=%{_libdir}/ipsec \
  FINALLIBDIR=%{_libdir}/ipsec \
  install

install -d -m700 %{buildroot}%{_localstatedir}/run/pluto
install -d %{buildroot}%{_sbindir}
# Remove old documentation for the time being.
rm -rf %{buildroot}%{_defaultdocdir}/freeswan

%clean
rm -rf ${RPM_BUILD_ROOT}

%files
%defattr(-,root,root)
%doc BUGS CHANGES COPYING
%doc CREDITS README 
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/%{name}/ipsec.conf
%attr(0700,root,root) %dir %{_sysconfdir}/%{name}/ipsec.d
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/%{name}/ipsec.d/*/*
%config(noreplace) %{_initrddir}/ipsec
%config(noreplace) %{_sysconfdir}/rc.d/rc*.d/*ipsec
%{_libdir}/ipsec
%{_sbindir}/ipsec
%doc %{_mandir}/*/*
%doc %{_docdir}/*/*
%{_localstatedir}/run/pluto


%preun
%_preun_service ipsec

%post
%_post_service ipsec

%changelog
* Mon Oct  4 2004 Robert Vojta <robert.vojta@mandrake.org> 2.2.0-2mdk
- missing BuildRequires for bison

* Tue Sep 28 2004 Florin <florin@mandrakesoft.com> 2.2.0-1mdk
- 2.2.0
- build with -j2 doesn't seem to work (use make instead of %make)
- remove the no longer existing INSTALL file
- add the docs files
- add the missing htmldoc in BuildRequires

* Tue May 18 2004 Florin <florin@mandrakesoft.com> 2.1.2-0.rc3.3mdk
- sysconfdir is now /etc/openswan

* Wed Apr 21 2004 Florin <florin@mandrakesoft.com> 2.1.2-0.rc3.2mdk
- add the signature file

* Wed Apr 21 2004 Florin <florin@mandrakesoft.com> 2.1.2-0.rc3.1mdk
- first Mandrake release