4 %define x509ver x509patch-0.9.11
6 Summary: Free IPSEC implemetation
7 Summary(pl): Publicznie dostêpna implementacja IPSEC
12 Group: Networking/Daemons
13 Source0: ftp://ftp.xs4all.nl/pub/crypto/%{name}/%{name}-%{version}.tar.gz
14 Source1: http://www.mif.pg.gda.pl/homepages/ankry/man-PLD/%{name}-pl-man-pages.tar.bz2
15 Source2: http://www.strongsec.com/%{name}/%{x509ver}-%{name}-%{version}.tar.gz
16 Patch0: %{name}-Makefile.patch
17 Patch1: %{name}-manlink.patch
18 Patch2: %{name}-config.patch
19 Patch3: %{name}-init.patch
20 Patch4: %{name}-keygen.patch
21 Patch5: x509-config.patch
22 URL: http://www.freeswan.org/
23 Prereq: /sbin/chkconfig
25 BuildRequires: gmp-devel
26 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
29 %{?_without_x509:%define x509 0}
32 The basic idea of IPSEC is to provide security functions
33 (authentication and encryption) at the IP (Internet Protocol) level.
34 It will be required in IP version 6 (better known as IPng, the next
35 generation) and is optional for the current IP, version 4.
37 FreeS/WAN is a freely-distributable implementation of IPSEC protocol.
38 FreeS/WAN utilities%{?!_without_x509: compiled with X.509 certificate support}.
41 Podstawowa idea IPSEC to zapewnienie funkcji bezpieczeñstwa
42 (autentykacji i szyfrowania) na poziomie IP. Bêdzie wymagany do IP w
43 wersji 6 (znanego tak¿e jako IPng, IP nastêpnej generacji) i jest
44 opcjonalny dla aktualnego IP, w wersji 4.
46 FreeS/WAN jest darmow± implementacj± protoko³u IPSEC.
57 %{?!_without_x509:patch -p1 <%{x509ver}-%{name}-%{version}/freeswan.diff}
60 OPT_FLAGS="%{rpmcflags}"; export OPT_FLAGS
64 rm -rf $RPM_BUILD_ROOT
65 install -d $RPM_BUILD_ROOT{%{_sysconfdir}/ipsec,/etc/rc.d/init.d,/var/run/pluto}
68 DESTDIR="$RPM_BUILD_ROOT"
71 install -d $RPM_BUILD_ROOT%{_sysconfdir}/ipsec.d
72 for i in crls cacerts private; do
73 install -d $RPM_BUILD_ROOT%{_sysconfdir}/ipsec.d/$i
75 for i in CHANGES README; do
76 install %{x509ver}-%{name}-%{version}/$i $i.x509 ;
82 bzip2 -dc %{SOURCE1} | tar xf - -C $RPM_BUILD_ROOT%{_mandir}
84 gzip -9nf README CREDITS CHANGES BUGS \
85 doc/{kernel.notes,impl.notes,examples,prob.report,standards}
89 rm -rf $RPM_BUILD_ROOT
92 # generate RSA private key... if, and only if, /etc/ipsec/ipsec.secrets does
94 if [ ! -f %{_sysconfdir}/ipsec/ipsec.secrets ];
96 echo generate RSA private key...
97 /usr/sbin/ipsec newhostkey --output %{_sysconfdir}/ipsec/ipsec.secrets
98 chmod 600 %{_sysconfdir}/ipsec/ipsec.secrets
101 /sbin/chkconfig --add ipsec
102 if [ -f /var/lock/subsys/ipsec ]; then
103 /etc/rc.d/init.d/ipsec restart >&2
105 echo "Run '/etc/rc.d/init.d/ipsec start' to start IPSEC services." >&2
109 if [ "$1" = "0" ]; then
110 if [ -f /var/lock/subsys/ipsec ]; then
111 /etc/rc.d/init.d/ipsec stop >&2
113 /sbin/chkconfig --del ipsec >&2
117 %defattr(644,root,root,755)
118 %doc *.gz doc/*.gz doc/*.html
119 %{?!_without_x509:%doc CHANGES.x509.gz README.x509.gz}
121 %lang(pl) %{_mandir}/pl/man*/*
122 %attr(755,root,root) %{_sbindir}/*
123 %attr(754,root,root) /etc/rc.d/init.d/*
124 %dir %{_libdir}/ipsec
125 %attr(755,root,root) %{_libdir}/ipsec/*
126 %attr(751,root,root) %dir %{_sysconfdir}/ipsec
127 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/ipsec/*
129 %attr(0700,root,root) %dir %{_sysconfdir}/ipsec.d
130 %attr(0700,root,root) %dir %{_sysconfdir}/ipsec.d/crls
131 %attr(0700,root,root) %dir %{_sysconfdir}/ipsec.d/cacerts
132 %attr(0700,root,root) %dir %{_sysconfdir}/ipsec.d/private