/[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 590 - (show annotations) (download)
Sat Jan 8 13:46:14 2011 UTC (11 years ago) by blino
File size: 16000 byte(s)
imported package iptables
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: %manbo_mkrel 1
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 %if %mdkversion < 200900
300 %post -n %{libname} -p /sbin/ldconfig
301 %endif
302
303 %if %mdkversion < 200900
304 %postun -n %{libname} -p /sbin/ldconfig
305 %endif
306
307 %clean
308 rm -rf %{buildroot}
309
310 %files
311 %defattr(-,root,root,0755)
312 %doc INSTALL INCOMPATIBILITIES iptables.sample ip6tables.sample
313 %attr(0755,root,root) %{_initrddir}/ip*
314 /sbin/iptables
315 /sbin/iptables-multi
316 /sbin/iptables-restore
317 /sbin/iptables-save
318 /sbin/iptables-xml
319 #/sbin/nfnl_osf
320 # ipv6
321 /sbin/ip6tables
322 /sbin/ip6tables-multi
323 /sbin/ip6tables-restore
324 /sbin/ip6tables-save
325 %dir /%{_lib}/iptables.d
326 %dir /%{_lib}/iptables.d/linux-2.6-main
327 /%{_lib}/iptables.d/linux-2.6-main/libipt_addrtype.so
328 /%{_lib}/iptables.d/linux-2.6-main/libipt_ah.so
329 /%{_lib}/iptables.d/linux-2.6-main/libipt_CLUSTERIP.so
330 /%{_lib}/iptables.d/linux-2.6-main/libipt_DNAT.so
331 /%{_lib}/iptables.d/linux-2.6-main/libipt_ecn.so
332 /%{_lib}/iptables.d/linux-2.6-main/libipt_ECN.so
333 /%{_lib}/iptables.d/linux-2.6-main/libipt_icmp.so
334 /%{_lib}/iptables.d/linux-2.6-main/libipt_IFWLOG.so
335 /%{_lib}/iptables.d/linux-2.6-main/libipt_LOG.so
336 /%{_lib}/iptables.d/linux-2.6-main/libipt_MASQUERADE.so
337 /%{_lib}/iptables.d/linux-2.6-main/libipt_MIRROR.so
338 /%{_lib}/iptables.d/linux-2.6-main/libipt_NETMAP.so
339 /%{_lib}/iptables.d/linux-2.6-main/libipt_psd.so
340 /%{_lib}/iptables.d/linux-2.6-main/libipt_realm.so
341 /%{_lib}/iptables.d/linux-2.6-main/libipt_REDIRECT.so
342 /%{_lib}/iptables.d/linux-2.6-main/libipt_REJECT.so
343 /%{_lib}/iptables.d/linux-2.6-main/libipt_SAME.so
344 /%{_lib}/iptables.d/linux-2.6-main/libipt_SNAT.so
345 /%{_lib}/iptables.d/linux-2.6-main/libipt_ttl.so
346 /%{_lib}/iptables.d/linux-2.6-main/libipt_TTL.so
347 /%{_lib}/iptables.d/linux-2.6-main/libipt_ULOG.so
348 /%{_lib}/iptables.d/linux-2.6-main/libipt_unclean.so
349 /%{_lib}/iptables.d/linux-2.6-main/libxt_CHECKSUM.so
350 /%{_lib}/iptables.d/linux-2.6-main/libxt_CLASSIFY.so
351 /%{_lib}/iptables.d/linux-2.6-main/libxt_cluster.so
352 /%{_lib}/iptables.d/linux-2.6-main/libxt_comment.so
353 /%{_lib}/iptables.d/linux-2.6-main/libxt_connbytes.so
354 /%{_lib}/iptables.d/linux-2.6-main/libxt_connlimit.so
355 /%{_lib}/iptables.d/linux-2.6-main/libxt_connmark.so
356 /%{_lib}/iptables.d/linux-2.6-main/libxt_CONNMARK.so
357 /%{_lib}/iptables.d/linux-2.6-main/libxt_CONNSECMARK.so
358 /%{_lib}/iptables.d/linux-2.6-main/libxt_conntrack.so
359 /%{_lib}/iptables.d/linux-2.6-main/libxt_cpu.so
360 /%{_lib}/iptables.d/linux-2.6-main/libxt_CT.so
361 /%{_lib}/iptables.d/linux-2.6-main/libxt_dccp.so
362 /%{_lib}/iptables.d/linux-2.6-main/libxt_dscp.so
363 /%{_lib}/iptables.d/linux-2.6-main/libxt_DSCP.so
364 /%{_lib}/iptables.d/linux-2.6-main/libxt_esp.so
365 /%{_lib}/iptables.d/linux-2.6-main/libxt_hashlimit.so
366 /%{_lib}/iptables.d/linux-2.6-main/libxt_helper.so
367 /%{_lib}/iptables.d/linux-2.6-main/libxt_IDLETIMER.so
368 /%{_lib}/iptables.d/linux-2.6-main/libxt_iprange.so
369 /%{_lib}/iptables.d/linux-2.6-main/libxt_ipvs.so
370 /%{_lib}/iptables.d/linux-2.6-main/libxt_LED.so
371 /%{_lib}/iptables.d/linux-2.6-main/libxt_length.so
372 /%{_lib}/iptables.d/linux-2.6-main/libxt_limit.so
373 /%{_lib}/iptables.d/linux-2.6-main/libxt_mac.so
374 /%{_lib}/iptables.d/linux-2.6-main/libxt_mark.so
375 /%{_lib}/iptables.d/linux-2.6-main/libxt_MARK.so
376 /%{_lib}/iptables.d/linux-2.6-main/libxt_multiport.so
377 /%{_lib}/iptables.d/linux-2.6-main/libxt_NFLOG.so
378 /%{_lib}/iptables.d/linux-2.6-main/libxt_NFQUEUE.so
379 /%{_lib}/iptables.d/linux-2.6-main/libxt_NOTRACK.so
380 /%{_lib}/iptables.d/linux-2.6-main/libxt_osf.so
381 /%{_lib}/iptables.d/linux-2.6-main/libxt_owner.so
382 /%{_lib}/iptables.d/linux-2.6-main/libxt_physdev.so
383 /%{_lib}/iptables.d/linux-2.6-main/libxt_pkttype.so
384 /%{_lib}/iptables.d/linux-2.6-main/libxt_policy.so
385 /%{_lib}/iptables.d/linux-2.6-main/libxt_quota.so
386 /%{_lib}/iptables.d/linux-2.6-main/libxt_rateest.so
387 /%{_lib}/iptables.d/linux-2.6-main/libxt_RATEEST.so
388 /%{_lib}/iptables.d/linux-2.6-main/libxt_recent.so
389 /%{_lib}/iptables.d/linux-2.6-main/libxt_sctp.so
390 /%{_lib}/iptables.d/linux-2.6-main/libxt_SECMARK.so
391 /%{_lib}/iptables.d/linux-2.6-main/libxt_set.so
392 /%{_lib}/iptables.d/linux-2.6-main/libxt_SET.so
393 /%{_lib}/iptables.d/linux-2.6-main/libxt_socket.so
394 /%{_lib}/iptables.d/linux-2.6-main/libxt_standard.so
395 /%{_lib}/iptables.d/linux-2.6-main/libxt_state.so
396 /%{_lib}/iptables.d/linux-2.6-main/libxt_statistic.so
397 /%{_lib}/iptables.d/linux-2.6-main/libxt_string.so
398 /%{_lib}/iptables.d/linux-2.6-main/libxt_tcpmss.so
399 /%{_lib}/iptables.d/linux-2.6-main/libxt_TCPMSS.so
400 /%{_lib}/iptables.d/linux-2.6-main/libxt_TCPOPTSTRIP.so
401 /%{_lib}/iptables.d/linux-2.6-main/libxt_tcp.so
402 /%{_lib}/iptables.d/linux-2.6-main/libxt_TEE.so
403 /%{_lib}/iptables.d/linux-2.6-main/libxt_time.so
404 /%{_lib}/iptables.d/linux-2.6-main/libxt_tos.so
405 /%{_lib}/iptables.d/linux-2.6-main/libxt_TOS.so
406 /%{_lib}/iptables.d/linux-2.6-main/libxt_TPROXY.so
407 /%{_lib}/iptables.d/linux-2.6-main/libxt_TRACE.so
408 /%{_lib}/iptables.d/linux-2.6-main/libxt_u32.so
409 /%{_lib}/iptables.d/linux-2.6-main/libxt_udp.so
410 %{_mandir}/*/iptables*
411 #%{_datadir}/xtables/pf.os
412 # ipv6
413 /%{_lib}/iptables.d/linux-2.6-main/libip6t_ah.so
414 /%{_lib}/iptables.d/linux-2.6-main/libip6t_dst.so
415 /%{_lib}/iptables.d/linux-2.6-main/libip6t_eui64.so
416 /%{_lib}/iptables.d/linux-2.6-main/libip6t_frag.so
417 /%{_lib}/iptables.d/linux-2.6-main/libip6t_hbh.so
418 /%{_lib}/iptables.d/linux-2.6-main/libip6t_hl.so
419 /%{_lib}/iptables.d/linux-2.6-main/libip6t_HL.so
420 /%{_lib}/iptables.d/linux-2.6-main/libip6t_icmp6.so
421 /%{_lib}/iptables.d/linux-2.6-main/libip6t_ipv6header.so
422 /%{_lib}/iptables.d/linux-2.6-main/libip6t_LOG.so
423 /%{_lib}/iptables.d/linux-2.6-main/libip6t_mh.so
424 /%{_lib}/iptables.d/linux-2.6-main/libip6t_REJECT.so
425 /%{_lib}/iptables.d/linux-2.6-main/libip6t_rt.so
426 %{_mandir}/*/ip6tables*
427
428 %files -n %{libname}
429 %defattr(-,root,root)
430 /%{_lib}/libxtables.so.%{major}*
431
432 %files -n %{develname}
433 %defattr(-, root, root)
434 %{_includedir}/*.h
435 %dir %{_includedir}/libipq
436 %dir %{_includedir}/libipulog
437 %{_includedir}/libipq/*.h
438 %{_includedir}/libipulog/*.h
439 %{_includedir}/iptables/*.h
440 %{_includedir}/net/netfilter/*.h
441 %{_libdir}/libxtables.so
442 %{_libdir}/libxtables.*a
443 %{_libdir}/libipq.*a
444 #%{_libdir}/libiptables.*a
445 #%{_libdir}/libip6tables.*a
446 %{_libdir}/pkgconfig/xtables.pc
447
448 %files -n %{ipq_libname}
449 %defattr(-,root,root)
450 /%{_libdir}/libipq.so.*
451
452 %files -n %{ipq_develname}
453 %defattr(-, root, root)
454 %{_includedir}/libipq/*.h
455 %dir %{_includedir}/libipq
456 %{_libdir}/libipq.so
457 %{_libdir}/libipq.*a
458 %{_mandir}/man3/*ipq*
459
460 %files -n %{iptc_libname}
461 %defattr(-,root,root)
462 /%{_lib}/libiptc.so.*
463
464 %files -n %{iptc_develname}
465 %defattr(-, root, root)
466 %{_includedir}/libiptc/*.h
467 %dir %{_includedir}/libiptc
468 %{_libdir}/libiptc.so
469 %{_libdir}/libiptc.*a
470 %{_libdir}/pkgconfig/libiptc.pc
471
472 %files -n %{ip4tc_libname}
473 %defattr(-,root,root)
474 %{_libdir}/libip4tc.so.*
475
476 %files -n %{ip4tc_develname}
477 %defattr(-, root, root)
478 %{_libdir}/libip4tc.so
479 %{_libdir}/libip4tc.*a
480
481 %files -n %{ip6tc_libname}
482 %defattr(-,root,root)
483 %{_libdir}/libip6tc.so.*
484
485 %files -n %{ip6tc_develname}
486 %defattr(-, root, root)
487 %{_libdir}/libip6tc.so
488 %{_libdir}/libip6tc.*a
489
490

  ViewVC Help
Powered by ViewVC 1.1.28