/[packages]/updates/5/ipsec-tools/current/SPECS/ipsec-tools.spec
ViewVC logotype

Contents of /updates/5/ipsec-tools/current/SPECS/ipsec-tools.spec

Parent Directory Parent Directory | Revision Log Revision Log


Revision 496340 - (show annotations) (download)
Sun Oct 13 17:30:43 2013 UTC (6 years ago) by tmb
Original Path: cauldron/ipsec-tools/current/SPECS/ipsec-tools.spec
File size: 5470 byte(s)
- update to 0.8.1
- rediff p1
- drop p4 (automake fix, merged)

1 %define LIBMAJ 0
2 %define libname %mklibname ipsec %LIBMAJ
3 %define libnamedev %mklibname -d ipsec
4
5 Name: ipsec-tools
6 Version: 0.8.1
7 Release: %mkrel 1
8 Summary: Tools for configuring and using IPSEC
9 License: BSD
10 Group: Networking/Other
11 URL: http://ipsec-tools.sourceforge.net/
12 Source: http://prdownloads.sourceforge.net/ipsec-tools/ipsec-tools-%{version}.tar.bz2
13 Source3: racoon.conf
14 Source4: psk.txt
15 Source6: ipsec-setkey-initscript
16 Source7: racoon-initscript
17 Source8: racoon.sysconfig
18 Patch0: ipsec-tools-0.8.0-manfix.patch
19 Patch1: ipsec-tools-0.8.1-includes.patch
20 Patch3: ipsec-tools-0.8.0-link.patch
21 # Fedora patches
22 Patch103: ipsec-tools-0.8.0-acquires.patch
23 Patch104: ipsec-tools-0.8.0-loopback.patch
24 Patch105: ipsec-tools-0.8.0-build.patch
25 # the following patches were also submitted upstream:
26 Patch111: ipsec-tools-0.8.0-pie.patch
27 BuildRequires: openssl-devel krb5-devel flex bison
28 BuildRequires: libpam-devel
29 Requires: %{libname} = %{version}
30 Requires(pre): rpm-helper
31 Requires: rpm-helper
32 Provides: kvpnc-backend
33
34 %description
35 This is the IPsec-Tools package. You need this package in order to
36 really use the IPsec functionality in the linux-2.6 and above kernels.
37 This package builds:
38
39 - libipsec, a PFKeyV2 library
40 - setkey, a program to directly manipulate policies and SAs
41 - racoon, an IKEv1 keying daemon
42
43 %define old_libname %mklibname ipsec-tools 0
44 %define old_libname_devel %mklibname -d ipsec 0
45
46 %package -n %{libname}
47 Summary: The shared libraries used by ipsec-tools
48 Group: System/Libraries
49 Requires(post): grep, coreutils
50 Requires(preun): grep, coreutils
51 Requires: grep, coreutils
52 Provides: libipsec = %{version}-%{release}
53 Provides: libipsec-tools = %{version}-%{release}
54 Obsoletes: libipsec-tools
55 Provides: %old_libname = %{version}-%{release}
56 Obsoletes: %old_libname
57
58 %description -n %{libname}
59 These are the shared libraries for the IPsec-Tools package.
60
61 %package -n %{libnamedev}
62 Summary: Headers for programs for %libname
63 Group: Development/C
64 Requires: %{libname} = %{version}
65 Provides: libipsec-tools-devel = %{version}-%{release}
66 Provides: libipsec-devel = %{version}-%{release}
67 Obsoletes: libipsec-tools-devel
68 Provides: %{old_libname}-devel = %{version}-%{release}
69 Obsoletes: %{old_libname}-devel
70 Obsoletes: %{old_libname_devel} < 0.7
71
72
73 %description -n %{libnamedev}
74 These are development headers for libipsec
75
76 %prep
77 %setup -q
78 %patch0 -p1 -b .manfix
79 %patch1 -p1 -b .includes
80 %patch3 -p1 -b .link
81 %patch103 -p1 -b .acquires
82 %patch104 -p1 -b .loopback
83 %patch105 -p1 -b .build
84 %patch111 -p1 -b .pie
85
86 sed -i 's|-Werror||g' configure*
87
88
89 %build
90 ./bootstrap
91 %configure2_5x \
92 --prefix=%{_prefix} \
93 --mandir=%{_mandir} \
94 --libdir=/%{_lib} \
95 --sbindir=/sbin \
96 --localstatedir=%{_localstatedir}/lib \
97 --sysconfdir=%{_sysconfdir}/racoon \
98 --with-kernel-headers=%{_includedir} \
99 --enable-shared \
100 --disable-rpath \
101 --enable-hybrid \
102 --enable-frag \
103 --enable-dpd \
104 --enable-adminport \
105 --enable-gssapi \
106 --enable-natt \
107 --with-libpam \
108 --enable-security-context=no \
109 --disable-audit
110 make
111
112 %install
113 rm -rf $RPM_BUILD_ROOT
114 %makeinstall_std
115
116 mkdir -p $RPM_BUILD_ROOT/etc/racoon/
117
118 install -m 0600 %{SOURCE3} $RPM_BUILD_ROOT/etc/racoon/racoon.conf
119 install -m 0600 %{SOURCE4} $RPM_BUILD_ROOT/etc/racoon/psk.txt
120 mkdir -m 0700 -p $RPM_BUILD_ROOT/etc/racoon/certs
121
122 mkdir -p $RPM_BUILD_ROOT/%{_initrddir}
123 install -m 0755 %{SOURCE6} $RPM_BUILD_ROOT/%{_initrddir}/ipsec-setkey
124 install -m 0755 %{SOURCE7} $RPM_BUILD_ROOT/%{_initrddir}/racoon
125
126 mkdir -p %{buildroot}%{_sysconfdir}/sysconfig
127 # racoon.sysconfig
128 install -m 0644 %{SOURCE8} %{buildroot}%{_sysconfdir}/sysconfig/racoon
129
130 # pam file
131 mkdir -p %{buildroot}%{_sysconfdir}/pam.d
132 cat > %{buildroot}%{_sysconfdir}/pam.d/racoon <<EOF
133 #%PAM-1.0
134 auth required pam_nologin.so
135 auth include system-auth
136 account include system-auth
137 EOF
138
139 # default ipsec.conf file
140 cat > %{buildroot}%{_sysconfdir}/ipsec.conf <<EOF
141 #!/usr/sbin/setkey -f
142 #
143 # File /etc/ipsec.conf
144
145 # delete the SAD and SPD
146 flush;
147 spdflush;
148
149 # Define here your security policies
150
151 # Example
152 # ipsec between two machines: 192.168.1.10 and 192.168.1.20
153 #
154 # spdadd 192.168.1.10 192.168.1.20 any -P in ipsec
155 # esp/transport//require
156 # ah/transport//require;
157 #
158 # spdadd 192.168.1.20 192.168.1.10 any -P out ipsec
159 # esp/transport//require
160 # ah/transport//require;
161
162 EOF
163
164 # remove some files from the sample dir so we can include it
165 # in %%doc. Also fix their permissions
166 rm -f src/racoon/samples/*.in
167 find src/racoon/samples -type f -exec chmod 0644 {} \;
168
169 %clean
170 rm -rf $RPM_BUILD_ROOT
171
172 %post
173 %_post_service ipsec-setkey
174 %_post_service racoon
175
176 %preun
177 %_preun_service ipsec-setkey
178 %_preun_service racoon
179
180 %files
181 %doc ChangeLog NEWS README
182 %doc src/racoon/samples
183 %doc src/racoon/doc/*
184 /sbin/*
185 %{_mandir}/man*/*
186 %dir %{_sysconfdir}/racoon
187 %dir %{_sysconfdir}/racoon/certs
188 %config(noreplace) %{_sysconfdir}/sysconfig/racoon
189 %config(noreplace) %{_sysconfdir}/racoon/psk.txt
190 %config(noreplace) %{_sysconfdir}/racoon/racoon.conf
191 %config(noreplace) %attr(0600,root,root) %{_sysconfdir}/ipsec.conf
192 %config(noreplace) %{_sysconfdir}/pam.d/racoon
193 %attr (0755,root,root) %{_initrddir}/ipsec-setkey
194 %attr (0755,root,root) %{_initrddir}/racoon
195 %dir /var/lib/racoon
196
197 %files -n %{libname}
198 %doc ChangeLog NEWS README
199 /%{_lib}/*.so.*
200
201 %files -n %{libnamedev}
202 /%{_lib}/libipsec.la
203 /%{_lib}/libipsec.a
204 /%{_lib}/libipsec.so
205 /%{_lib}/libracoon.la
206 /%{_lib}/libracoon.a
207 /%{_lib}/libracoon.so
208 %{_includedir}/*

  ViewVC Help
Powered by ViewVC 1.1.26