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

Contents of /cauldron/ipsec-tools/current/SPECS/ipsec-tools.spec

Parent Directory Parent Directory | Revision Log Revision Log


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

  ViewVC Help
Powered by ViewVC 1.1.30