/[packages]/cauldron/iptables/current/SPECS/iptables.spec
ViewVC logotype

Contents of /cauldron/iptables/current/SPECS/iptables.spec

Parent Directory Parent Directory | Revision Log Revision Log


Revision 598 - (show annotations) (download)
Sat Jan 8 13:48:50 2011 UTC (13 years, 10 months ago) by blino
File size: 15850 byte(s)
do not use manbo tag anymore

1 %define _disable_ld_no_undefined 1
2
3 %define major 5
4 %define libname %mklibname iptables %{major}
5 %define develname %mklibname -d iptables
6
7 %define iptc_major 0
8 %define iptc_libname %mklibname iptc %{iptc_major}
9 %define iptc_develname %mklibname -d iptc
10
11 %define ipq_major 0
12 %define ipq_libname %mklibname ipq %{ipq_major}
13 %define ipq_develname %mklibname -d ipq
14
15 %define ip4tc_major 0
16 %define ip4tc_libname %mklibname ip4tc %{ip4tc_major}
17 %define ip4tc_develname %mklibname -d ip4tc
18
19 %define ip6tc_major 0
20 %define ip6tc_libname %mklibname ip6tc %{ip6tc_major}
21 %define ip6tc_develname %mklibname -d ip6tc
22
23 Summary: Tools for managing Linux kernel packet filtering capabilities
24 Name: iptables
25 Version: 1.4.10
26 Release: %mkrel 2
27 License: GPLv2+
28 Group: System/Kernel and hardware
29 URL: http://netfilter.org/
30 Source0: http://netfilter.org/projects/iptables/files/%{name}-%{version}.tar.bz2
31 Source1: iptables.init
32 Source2: ip6tables.init
33 Source3: iptables.config
34 Source4: ip6tables.config
35 # S100 and up used to be in the added patches
36 Source100: libipt_IMQ.c
37 Source101: libipt_IFWLOG.c
38 # (oe) psd comes from iptables-1.3.7, was removed in iptables-1.3.8
39 Source102: libipt_psd.c
40 Source103: libipt_psd.man
41 Patch0: iptables-1.2.8-libiptc.h.patch
42 Patch100: iptables-imq.diff
43 Patch101: iptables-IFWLOG_extension.diff
44 Patch102: iptables-psd.diff
45 Provides: userspace-ipfilter
46 #BuildRequires: nfnetlink-devel
47 Requires(post): rpm-helper
48 Requires(preun): rpm-helper
49 Obsoletes: %{name} < 1.4.3.2
50 Obsoletes: %{name}-ipv6 < 1.4.1.1-0.5
51 Provides: %{name}-ipv6
52 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
53
54 %description
55 iptables controls the Linux kernel network packet filtering code. It allows you
56 to set up firewalls and IP masquerading, etc.
57
58 Install iptables if you need to set up firewalling for your network.
59
60 %package -n %{libname}
61 Summary: Shared iptables library
62 Group: System/Libraries
63 Conflicts: %mklibname %{name} 1
64
65 %description -n %{libname}
66 iptables controls the Linux kernel network packet filtering code. It allows you
67 to set up firewalls and IP masquerading, etc.
68
69 This package contains the shared iptables library.
70
71 %package -n %{develname}
72 Summary: Static library and header files for the iptables library
73 Group: Development/C
74 Requires: kernel-headers
75 Requires: %{libname} = %{version}-%{release}
76 Provides: iptables-devel = %{version}
77 Obsoletes: iptables-devel < 1.4.2
78
79 %description -n %{develname}
80 iptables controls the Linux kernel network packet filtering code. It allows you
81 to set up firewalls and IP masquerading, etc.
82
83 This package contains the static iptables library.
84
85
86 # ipq
87 %package -n %{ipq_libname}
88 Summary: Shared iptables library
89 Group: System/Libraries
90 Obsoletes: %{mklibname iptables 1} < 1.4.3.2
91
92 %description -n %{ipq_libname}
93 iptables controls the Linux kernel network packet filtering code. It allows you
94 to set up firewalls and IP masquerading, etc.
95
96 This package contains the ipq library.
97
98 %package -n %{ipq_develname}
99 Summary: Static library and header files for the iptables library
100 Group: Development/C
101 Requires: kernel-headers
102 Requires: %{ipq_libname} = %{version}-%{release}
103 Requires: %{ipq_develname} = %{version}-%{release}
104 Provides: iptables-ipq-devel = %{version}
105
106 %description -n %{ipq_develname}
107 iptables controls the Linux kernel network packet filtering code. It allows you
108 to set up firewalls and IP masquerading, etc.
109
110 This package contains the ipq library.
111
112 # iptc
113 %package -n %{iptc_libname}
114 Summary: Shared iptables library
115 Group: System/Libraries
116 Obsoletes: %{mklibname iptables 1} < 1.4.3.2
117
118 %description -n %{iptc_libname}
119 iptables controls the Linux kernel network packet filtering code. It allows you
120 to set up firewalls and IP masquerading, etc.
121
122 This package contains the IPTC library.
123
124 %package -n %{iptc_develname}
125 Summary: Static library and header files for the iptables library
126 Group: Development/C
127 Requires: kernel-headers
128 Requires: %{iptc_libname} = %{version}-%{release}
129 Requires: %{iptc_develname} = %{version}-%{release}
130 Provides: iptables-iptc-devel = %{version}
131
132 %description -n %{iptc_develname}
133 iptables controls the Linux kernel network packet filtering code. It allows you
134 to set up firewalls and IP masquerading, etc.
135
136 This package contains the IPTC library.
137
138 # ip4tc
139 %package -n %{ip4tc_libname}
140 Summary: Shared iptables library
141 Group: System/Libraries
142 Obsoletes: %{mklibname iptables 1} < 1.4.3.2
143
144 %description -n %{ip4tc_libname}
145 iptables controls the Linux kernel network packet filtering code. It allows you
146 to set up firewalls and IP masquerading, etc.
147
148 This package contains the IP4TC library.
149
150 %package -n %{ip4tc_develname}
151 Summary: Static library and header files for the iptables library
152 Group: Development/C
153 Requires: kernel-headers
154 Requires: %{ip4tc_libname} = %{version}-%{release}
155 Requires: %{iptc_develname} = %{version}-%{release}
156 Provides: iptables-ip6tc-devel = %{version}
157
158 %description -n %{ip4tc_develname}
159 iptables controls the Linux kernel network packet filtering code. It allows you
160 to set up firewalls and IP masquerading, etc.
161
162 This package contains the development files for IPTC library.
163
164 # ip6tc
165 %package -n %{ip6tc_libname}
166 Summary: Shared iptables library
167 Group: System/Libraries
168 Obsoletes: %{mklibname iptables 1} < 1.4.3.2
169
170 %description -n %{ip6tc_libname}
171 iptables controls the Linux kernel network packet filtering code. It allows you
172 to set up firewalls and IP masquerading, etc.
173
174 This package contains the IP6TC library.
175
176 %package -n %{ip6tc_develname}
177 Summary: Static library and header files for the iptables library
178 Group: Development/C
179 Requires: kernel-headers
180 Requires: %{ip6tc_libname} = %{version}-%{release}
181 Provides: iptables-ip6tc-devel = %{version}
182
183 %description -n %{ip6tc_develname}
184 iptables controls the Linux kernel network packet filtering code. It allows you
185 to set up firewalls and IP masquerading, etc.
186
187 This package contains the development files for IP6TC library.
188
189 %prep
190
191 %setup -q
192
193 cp %{SOURCE1} iptables.init
194 cp %{SOURCE2} ip6tables.init
195 cp %{SOURCE3} iptables.sample
196 cp %{SOURCE4} ip6tables.sample
197
198 # fix libdir
199 perl -pi -e "s|\@lib\@|%{_lib}|g" iptables.init
200
201 #%patch0 -p0 -b .libiptc
202
203 # extensions
204 #install -m0644 %{SOURCE100} extensions/ <- it needs ipt_IMQ.h and we don't have it anymore ?!
205 install -m0644 %{SOURCE101} extensions/
206 # (oe) psd comes from iptables-1.3.7, was removed in iptables-1.3.8
207 install -m0644 %{SOURCE102} extensions/
208 install -m0644 %{SOURCE103} extensions/
209
210 %patch100 -p0
211 %patch101 -p0
212 %patch102 -p0
213
214 find . -type f | xargs perl -pi -e "s,/usr/local,%{_prefix},g"
215
216 # don't run /sbin/ldconfig
217 perl -pi -e "s|/sbin/ldconfig|/bin/true|g" Makefile*
218
219 %build
220 export LIBS="-ldl"
221
222 %serverbuild
223
224 autoreconf -fis
225
226 export CFLAGS="$CFLAGS -fPIC"
227 export CXXFLAGS="$CXXFLAGS -fPIC"
228 export FFLAGS="$FFLAGS -fPIC"
229
230 %configure2_5x \
231 --bindir=/sbin \
232 --sbindir=/sbin \
233 --enable-devel \
234 --enable-libipq \
235 --enable-ipv4 \
236 --enable-ipv6 \
237 --with-ksource=%{_prefix}/src/linux \
238 --with-xtlibdir=/%{_lib}/iptables
239
240 make
241
242 ## make more devel libs (debian)
243 #ar rcs libiptables.a iptables.o
244 #ar rcs libip6tables.a ip6tables.o
245
246 # hmm...
247 ar rcs libiptc/libiptc.a libiptc/.libs/libip4tc.o libiptc/.libs/libip6tc.o
248
249 %install
250 rm -rf %{buildroot}
251
252 %makeinstall_std
253
254 # (oe) this in conjunction with the mandriva initscript will make it possible
255 # to use development versions of the netfilter modules and with different
256 # api:s. (according to blino)
257 install -d %{buildroot}/%{_lib}/iptables.d
258 mv %{buildroot}/%{_lib}/iptables %{buildroot}/%{_lib}/iptables.d/linux-2.6-main
259
260 # move the shared libs
261 mv %{buildroot}%{_libdir}/libxtables.so.%{major}* %{buildroot}/%{_lib}/
262 ln -snf /%{_lib}/libxtables.so.%{major} %{buildroot}%{_libdir}/libxtables.so
263
264 mv %{buildroot}%{_libdir}/libiptc.so.* %{buildroot}/%{_lib}/
265 ln -snf /%{_lib}/libiptc.so.0 %{buildroot}%{_libdir}/libiptc.so
266
267 # static development files
268 install -d %{buildroot}%{_libdir}
269 install -m0644 libiptc/libiptc.a %{buildroot}%{_libdir}/libiptc.a
270 #install -m0644 libiptables.a %{buildroot}%{_libdir}/
271 #install -m0644 libip6tables.a %{buildroot}%{_libdir}/
272
273 # header development files
274 install -d %{buildroot}%{_includedir}/{libipq,libiptc,libipulog}
275 install -m0644 include/libipq/*.h %{buildroot}%{_includedir}/libipq/
276 install -m0644 include/libiptc/*.h %{buildroot}%{_includedir}/libiptc/
277 install -m0644 include/libipulog/*.h %{buildroot}%{_includedir}/libipulog/
278
279 # iptables and netfilter development files
280 install -d %{buildroot}%{_includedir}/net/netfilter/
281 install -d %{buildroot}%{_includedir}/iptables
282 install -m0644 include/net/netfilter/*.h %{buildroot}%{_includedir}/net/netfilter/
283 install -m0644 include/ip*tables.h %{buildroot}%{_includedir}/
284 install -m0644 include/iptables/internal.h %{buildroot}%{_includedir}/iptables
285
286 install -d %{buildroot}%{_initrddir}
287 install -m0755 iptables.init %{buildroot}%{_initrddir}/iptables
288 install -m0755 ip6tables.init %{buildroot}%{_initrddir}/ip6tables
289
290 %post
291 %_post_service iptables
292 %_post_service ip6tables
293 /sbin/service iptables check
294
295 %preun
296 %_preun_service iptables
297 %_preun_service ip6tables
298
299 %clean
300 rm -rf %{buildroot}
301
302 %files
303 %defattr(-,root,root,0755)
304 %doc INSTALL INCOMPATIBILITIES iptables.sample ip6tables.sample
305 %attr(0755,root,root) %{_initrddir}/ip*
306 /sbin/iptables
307 /sbin/iptables-multi
308 /sbin/iptables-restore
309 /sbin/iptables-save
310 /sbin/iptables-xml
311 #/sbin/nfnl_osf
312 # ipv6
313 /sbin/ip6tables
314 /sbin/ip6tables-multi
315 /sbin/ip6tables-restore
316 /sbin/ip6tables-save
317 %dir /%{_lib}/iptables.d
318 %dir /%{_lib}/iptables.d/linux-2.6-main
319 /%{_lib}/iptables.d/linux-2.6-main/libipt_addrtype.so
320 /%{_lib}/iptables.d/linux-2.6-main/libipt_ah.so
321 /%{_lib}/iptables.d/linux-2.6-main/libipt_CLUSTERIP.so
322 /%{_lib}/iptables.d/linux-2.6-main/libipt_DNAT.so
323 /%{_lib}/iptables.d/linux-2.6-main/libipt_ecn.so
324 /%{_lib}/iptables.d/linux-2.6-main/libipt_ECN.so
325 /%{_lib}/iptables.d/linux-2.6-main/libipt_icmp.so
326 /%{_lib}/iptables.d/linux-2.6-main/libipt_IFWLOG.so
327 /%{_lib}/iptables.d/linux-2.6-main/libipt_LOG.so
328 /%{_lib}/iptables.d/linux-2.6-main/libipt_MASQUERADE.so
329 /%{_lib}/iptables.d/linux-2.6-main/libipt_MIRROR.so
330 /%{_lib}/iptables.d/linux-2.6-main/libipt_NETMAP.so
331 /%{_lib}/iptables.d/linux-2.6-main/libipt_psd.so
332 /%{_lib}/iptables.d/linux-2.6-main/libipt_realm.so
333 /%{_lib}/iptables.d/linux-2.6-main/libipt_REDIRECT.so
334 /%{_lib}/iptables.d/linux-2.6-main/libipt_REJECT.so
335 /%{_lib}/iptables.d/linux-2.6-main/libipt_SAME.so
336 /%{_lib}/iptables.d/linux-2.6-main/libipt_SNAT.so
337 /%{_lib}/iptables.d/linux-2.6-main/libipt_ttl.so
338 /%{_lib}/iptables.d/linux-2.6-main/libipt_TTL.so
339 /%{_lib}/iptables.d/linux-2.6-main/libipt_ULOG.so
340 /%{_lib}/iptables.d/linux-2.6-main/libipt_unclean.so
341 /%{_lib}/iptables.d/linux-2.6-main/libxt_CHECKSUM.so
342 /%{_lib}/iptables.d/linux-2.6-main/libxt_CLASSIFY.so
343 /%{_lib}/iptables.d/linux-2.6-main/libxt_cluster.so
344 /%{_lib}/iptables.d/linux-2.6-main/libxt_comment.so
345 /%{_lib}/iptables.d/linux-2.6-main/libxt_connbytes.so
346 /%{_lib}/iptables.d/linux-2.6-main/libxt_connlimit.so
347 /%{_lib}/iptables.d/linux-2.6-main/libxt_connmark.so
348 /%{_lib}/iptables.d/linux-2.6-main/libxt_CONNMARK.so
349 /%{_lib}/iptables.d/linux-2.6-main/libxt_CONNSECMARK.so
350 /%{_lib}/iptables.d/linux-2.6-main/libxt_conntrack.so
351 /%{_lib}/iptables.d/linux-2.6-main/libxt_cpu.so
352 /%{_lib}/iptables.d/linux-2.6-main/libxt_CT.so
353 /%{_lib}/iptables.d/linux-2.6-main/libxt_dccp.so
354 /%{_lib}/iptables.d/linux-2.6-main/libxt_dscp.so
355 /%{_lib}/iptables.d/linux-2.6-main/libxt_DSCP.so
356 /%{_lib}/iptables.d/linux-2.6-main/libxt_esp.so
357 /%{_lib}/iptables.d/linux-2.6-main/libxt_hashlimit.so
358 /%{_lib}/iptables.d/linux-2.6-main/libxt_helper.so
359 /%{_lib}/iptables.d/linux-2.6-main/libxt_IDLETIMER.so
360 /%{_lib}/iptables.d/linux-2.6-main/libxt_iprange.so
361 /%{_lib}/iptables.d/linux-2.6-main/libxt_ipvs.so
362 /%{_lib}/iptables.d/linux-2.6-main/libxt_LED.so
363 /%{_lib}/iptables.d/linux-2.6-main/libxt_length.so
364 /%{_lib}/iptables.d/linux-2.6-main/libxt_limit.so
365 /%{_lib}/iptables.d/linux-2.6-main/libxt_mac.so
366 /%{_lib}/iptables.d/linux-2.6-main/libxt_mark.so
367 /%{_lib}/iptables.d/linux-2.6-main/libxt_MARK.so
368 /%{_lib}/iptables.d/linux-2.6-main/libxt_multiport.so
369 /%{_lib}/iptables.d/linux-2.6-main/libxt_NFLOG.so
370 /%{_lib}/iptables.d/linux-2.6-main/libxt_NFQUEUE.so
371 /%{_lib}/iptables.d/linux-2.6-main/libxt_NOTRACK.so
372 /%{_lib}/iptables.d/linux-2.6-main/libxt_osf.so
373 /%{_lib}/iptables.d/linux-2.6-main/libxt_owner.so
374 /%{_lib}/iptables.d/linux-2.6-main/libxt_physdev.so
375 /%{_lib}/iptables.d/linux-2.6-main/libxt_pkttype.so
376 /%{_lib}/iptables.d/linux-2.6-main/libxt_policy.so
377 /%{_lib}/iptables.d/linux-2.6-main/libxt_quota.so
378 /%{_lib}/iptables.d/linux-2.6-main/libxt_rateest.so
379 /%{_lib}/iptables.d/linux-2.6-main/libxt_RATEEST.so
380 /%{_lib}/iptables.d/linux-2.6-main/libxt_recent.so
381 /%{_lib}/iptables.d/linux-2.6-main/libxt_sctp.so
382 /%{_lib}/iptables.d/linux-2.6-main/libxt_SECMARK.so
383 /%{_lib}/iptables.d/linux-2.6-main/libxt_set.so
384 /%{_lib}/iptables.d/linux-2.6-main/libxt_SET.so
385 /%{_lib}/iptables.d/linux-2.6-main/libxt_socket.so
386 /%{_lib}/iptables.d/linux-2.6-main/libxt_standard.so
387 /%{_lib}/iptables.d/linux-2.6-main/libxt_state.so
388 /%{_lib}/iptables.d/linux-2.6-main/libxt_statistic.so
389 /%{_lib}/iptables.d/linux-2.6-main/libxt_string.so
390 /%{_lib}/iptables.d/linux-2.6-main/libxt_tcpmss.so
391 /%{_lib}/iptables.d/linux-2.6-main/libxt_TCPMSS.so
392 /%{_lib}/iptables.d/linux-2.6-main/libxt_TCPOPTSTRIP.so
393 /%{_lib}/iptables.d/linux-2.6-main/libxt_tcp.so
394 /%{_lib}/iptables.d/linux-2.6-main/libxt_TEE.so
395 /%{_lib}/iptables.d/linux-2.6-main/libxt_time.so
396 /%{_lib}/iptables.d/linux-2.6-main/libxt_tos.so
397 /%{_lib}/iptables.d/linux-2.6-main/libxt_TOS.so
398 /%{_lib}/iptables.d/linux-2.6-main/libxt_TPROXY.so
399 /%{_lib}/iptables.d/linux-2.6-main/libxt_TRACE.so
400 /%{_lib}/iptables.d/linux-2.6-main/libxt_u32.so
401 /%{_lib}/iptables.d/linux-2.6-main/libxt_udp.so
402 %{_mandir}/*/iptables*
403 #%{_datadir}/xtables/pf.os
404 # ipv6
405 /%{_lib}/iptables.d/linux-2.6-main/libip6t_ah.so
406 /%{_lib}/iptables.d/linux-2.6-main/libip6t_dst.so
407 /%{_lib}/iptables.d/linux-2.6-main/libip6t_eui64.so
408 /%{_lib}/iptables.d/linux-2.6-main/libip6t_frag.so
409 /%{_lib}/iptables.d/linux-2.6-main/libip6t_hbh.so
410 /%{_lib}/iptables.d/linux-2.6-main/libip6t_hl.so
411 /%{_lib}/iptables.d/linux-2.6-main/libip6t_HL.so
412 /%{_lib}/iptables.d/linux-2.6-main/libip6t_icmp6.so
413 /%{_lib}/iptables.d/linux-2.6-main/libip6t_ipv6header.so
414 /%{_lib}/iptables.d/linux-2.6-main/libip6t_LOG.so
415 /%{_lib}/iptables.d/linux-2.6-main/libip6t_mh.so
416 /%{_lib}/iptables.d/linux-2.6-main/libip6t_REJECT.so
417 /%{_lib}/iptables.d/linux-2.6-main/libip6t_rt.so
418 %{_mandir}/*/ip6tables*
419
420 %files -n %{libname}
421 %defattr(-,root,root)
422 /%{_lib}/libxtables.so.%{major}*
423
424 %files -n %{develname}
425 %defattr(-, root, root)
426 %{_includedir}/*.h
427 %dir %{_includedir}/libipq
428 %dir %{_includedir}/libipulog
429 %{_includedir}/libipq/*.h
430 %{_includedir}/libipulog/*.h
431 %{_includedir}/iptables/*.h
432 %{_includedir}/net/netfilter/*.h
433 %{_libdir}/libxtables.so
434 %{_libdir}/libxtables.*a
435 %{_libdir}/libipq.*a
436 #%{_libdir}/libiptables.*a
437 #%{_libdir}/libip6tables.*a
438 %{_libdir}/pkgconfig/xtables.pc
439
440 %files -n %{ipq_libname}
441 %defattr(-,root,root)
442 /%{_libdir}/libipq.so.*
443
444 %files -n %{ipq_develname}
445 %defattr(-, root, root)
446 %{_includedir}/libipq/*.h
447 %dir %{_includedir}/libipq
448 %{_libdir}/libipq.so
449 %{_libdir}/libipq.*a
450 %{_mandir}/man3/*ipq*
451
452 %files -n %{iptc_libname}
453 %defattr(-,root,root)
454 /%{_lib}/libiptc.so.*
455
456 %files -n %{iptc_develname}
457 %defattr(-, root, root)
458 %{_includedir}/libiptc/*.h
459 %dir %{_includedir}/libiptc
460 %{_libdir}/libiptc.so
461 %{_libdir}/libiptc.*a
462 %{_libdir}/pkgconfig/libiptc.pc
463
464 %files -n %{ip4tc_libname}
465 %defattr(-,root,root)
466 %{_libdir}/libip4tc.so.*
467
468 %files -n %{ip4tc_develname}
469 %defattr(-, root, root)
470 %{_libdir}/libip4tc.so
471 %{_libdir}/libip4tc.*a
472
473 %files -n %{ip6tc_libname}
474 %defattr(-,root,root)
475 %{_libdir}/libip6tc.so.*
476
477 %files -n %{ip6tc_develname}
478 %defattr(-, root, root)
479 %{_libdir}/libip6tc.so
480 %{_libdir}/libip6tc.*a
481
482

  ViewVC Help
Powered by ViewVC 1.1.30