]> git.pld-linux.org Git - packages/freeswan.git/blob - freeswan.spec
- there where errors in rsa keys generation proces in %post; my mistake
[packages/freeswan.git] / freeswan.spec
1 Summary:        Free IPSEC implemetation
2 Summary(pl):    Publicznie dostêpna implementacja IPSEC
3 Name:           freeswan
4 Version:        1.96
5 Release:        1
6 License:        GPL
7 Group:          Networking/Daemons
8 Source0:        ftp://ftp.xs4all.nl/pub/crypto/freeswan/%{name}-%{version}.tar.gz
9 Source1:        http://www.mif.pg.gda.pl/homepages/ankry/man-PLD/%{name}-pl-man-pages.tar.bz2
10 Patch0:         %{name}-Makefile.patch
11 Patch1:         %{name}-manlink.patch
12 Patch2:         %{name}-config.patch
13 Patch3:         %{name}-init.patch
14 Patch4:         %{name}-keygen.patch
15 URL:            http://www.freeswan.org/
16 Prereq:         /sbin/chkconfig
17 Prereq:         rc-scripts
18 BuildRequires:  gmp-devel
19 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
20
21 %description
22 The basic idea of IPSEC is to provide security functions
23 (authentication and encryption) at the IP (Internet Protocol) level.
24 It will be required in IP version 6 (better known as IPng, the next
25 generation) and is optional for the current IP, version 4.
26
27 FreeS/WAN is a freely-distributable implementation of IPSEC protocol.
28
29 %description -l pl
30 Podstawowa idea IPSEC to zapewnienie funkcji bezpieczeñstwa
31 (autentykacji i szyfrowania) na poziomie IP. Bêdzie wymagany do IP w
32 wersji 6 (znanego tak¿e jako IPng, IP nastêpnej generacji) i jest
33 opcjonalny dla aktualnego IP, w wersji 4.
34
35 FreeS/WAN jest darmow± implementacj± protoko³u IPSEC.
36
37 %prep
38 %setup  -q
39 %patch0 -p1
40 %patch1 -p1
41 %patch2 -p1
42 %patch3 -p1
43 %patch4 -p1
44
45 %build
46 OPT_FLAGS="%{rpmcflags}"; export OPT_FLAGS
47 %{__make} programs
48
49 %install
50 rm -rf $RPM_BUILD_ROOT
51 install -d $RPM_BUILD_ROOT{%{_sysconfdir}/ipsec,/etc/rc.d/init.d,/var/run/pluto}
52
53 %{__make} install \
54         DESTDIR="$RPM_BUILD_ROOT"
55
56 bzip2 -dc %{SOURCE1} | tar xf - -C $RPM_BUILD_ROOT%{_mandir}
57
58 gzip -9nf README CREDITS CHANGES BUGS \
59           doc/{kernel.notes,impl.notes,examples,prob.report,standards}
60
61 %clean
62 rm -rf $RPM_BUILD_ROOT
63
64 %post
65 # generate RSA private key... if, and only if, /etc/ipsec/ipsec.secrets does
66 # not already exist
67 if [ ! -f %{_sysconfdir}/ipsec/ipsec.secrets ];
68 then
69     echo generate RSA private key...
70     /usr/sbin/ipsec newhostkey --output %{_sysconfdir}/ipsec/ipsec.secrets
71     chmod 600 %{_sysconfdir}/ipsec/ipsec.secrets
72 fi
73
74 /sbin/chkconfig --add ipsec
75 if [ -f /var/lock/subsys/ipsec ]; then
76         /etc/rc.d/init.d/ipsec restart >&2
77 else
78         echo "Run '/etc/rc.d/init.d/ipsec start' to start IPSEC services." >&2
79 fi
80
81 %preun
82 if [ "$1" = "0" ]; then
83         if [ -f /var/lock/subsys/ipsec ]; then
84                 /etc/rc.d/init.d/ipsec stop >&2
85         fi
86         /sbin/chkconfig --del ipsec >&2
87 fi
88
89 %files
90 %defattr(644,root,root,755)
91 %doc *.gz doc/*.gz doc/*.html
92 %{_mandir}/man*/*
93 %lang(pl) %{_mandir}/pl/man*/*
94 %attr(755,root,root) %{_sbindir}/*
95 %attr(754,root,root) /etc/rc.d/init.d/*
96 %dir %{_libdir}/ipsec
97 %attr(755,root,root) %{_libdir}/ipsec/*
98 %attr(751,root,root) %dir %{_sysconfdir}/ipsec
99 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/ipsec/*
This page took 0.080246 seconds and 3 git commands to generate.