]>
Commit | Line | Data |
---|---|---|
f331b9bf JK |
1 | Summary: Free IPSEC implemetation |
2 | Name: freeswan | |
3 | Version: 1.3 | |
4 | Release: 0 | |
5 | License: GPL | |
6 | Group: Networking/Daemons | |
7 | Group(pl): Sieciowe/Serwery | |
8 | Source0: ftp://ftp.xs4all.nl/pub/crypto/freeswan/%{name}-%{version}.tar.gz | |
9 | Patch0: %{name}-Makefiles.patch | |
10 | Patch1: %{name}-manlink.patch | |
11 | Patch2: %{name}-config.patch | |
12 | Patch3: %{name}-init.patch | |
13 | URL: http://www.freeswan.org | |
14 | Prereq: /sbin/chkconfig | |
15 | Requires: rc-scripts | |
5da9ef72 | 16 | BuildRequires: gmp-devel |
17 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
f331b9bf JK |
18 | |
19 | %description | |
5da9ef72 | 20 | The basic idea of IPSEC is to provide security functions |
21 | ([60]authentication and [61]encryption) at the IP (Internet Protocol) | |
22 | level. It will be required in [62]IP version 6 (better known as IPng, | |
f331b9bf JK |
23 | the next generation) and is optional for the current IP, version 4. |
24 | ||
25 | FreeS/WAN is a freely-distributable implementation of IPSEC protocol/ | |
26 | ||
27 | %prep | |
28 | %setup -q | |
29 | %patch0 -p1 | |
30 | %patch1 -p1 | |
31 | %patch2 -p1 | |
32 | %patch3 -p1 | |
33 | ||
34 | %build | |
35 | OPT_FLAGS="$RPM_OPT_FLAGS"; export OPT_FLAGS | |
36 | LDFLAGS="-s"; export LDFLAGS | |
37 | make programs | |
38 | ||
39 | %install | |
40 | rm -rf $RPM_BUILD_ROOT | |
41 | ||
5da9ef72 | 42 | install -d $RPM_BUILD_ROOT{%{_sysconfdir}/freeswan,/etc/rc.d/init.d,/var/run/pluto} |
43 | make install \ | |
44 | DESTDIR="$RPM_BUILD_ROOT" | |
f331b9bf JK |
45 | |
46 | gzip -9nf README CREDITS CHANGES BUGS \ | |
47 | doc/{kernel.notes,impl.notes,examples,prob.report,standards} \ | |
48 | $RPM_BUILD_ROOT%{_mandir}/man*/* | |
49 | ||
50 | %post | |
51 | /sbin/chkconfig --add ipsec | |
52 | ||
53 | if [ -f /var/lock/subsys/ipsec ]; then | |
54 | /etc/rc.d/init.d/ipsec restart >&2 | |
55 | else | |
56 | echo "Run '/etc/rc.d/init.d/ipsec start' to start IPSEC services." >&2 | |
57 | fi | |
58 | ||
59 | %preun | |
60 | if [ "$1" = "0" ]; then | |
61 | if [ -f /var/lock/subsys/ipsec ]; then | |
62 | /etc/rc.d/init.d/ipsec stop >&2 | |
63 | fi | |
64 | /sbin/chkconfig --del ipsec >&2 | |
65 | fi | |
66 | ||
67 | %clean | |
68 | rm -rf $RPM_BUILD_ROOT | |
69 | ||
70 | %files | |
71 | %defattr(644,root,root,755) | |
72 | %doc *.gz doc/*.gz doc/*.html | |
73 | %{_mandir}/man*/* | |
74 | %attr(755,root,root) %{_sbindir}/* | |
75 | %attr(754,root,root) /etc/rc.d/init.d/* | |
5da9ef72 | 76 | %dir %{_libdir}/ipsec |
77 | %attr(755,root,root) %{_libdir}/ipsec/* | |
78 | %attr(751,root,root) %dir %{_sysconfdir}/freeswan | |
79 | %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/freeswan/* |