]> git.pld-linux.org Git - packages/iptables.git/blob - iptables.spec
- allow build with -O0
[packages/iptables.git] / iptables.spec
1 #
2 # Conditional build:
3 %bcond_without  doc             # without documentation (HOWTOS) which needed TeX
4 %bcond_without  dist_kernel     # without distribution kernel
5 #
6 %define         netfilter_snap          20040629
7 %define         iptables_version        1.2.11
8 %define         llh_version             7:2.6.7.0-2
9 %define         name6                   ip6tables
10 #
11 Summary:        Extensible packet filtering system && extensible NAT system
12 Summary(pl):    System filtrowania pakietów oraz system translacji adresów (NAT)
13 Summary(pt_BR): Ferramenta para controlar a filtragem de pacotes no kernel-2.4.x
14 Summary(ru):    õÔÉÌÉÔÙ ÄÌÑ ÕÐÒÁ×ÌÅÎÉÑ ÐÁËÅÔÎÙÍÉ ÆÉÌØÔÒÁÍÉ ÑÄÒÁ Linux
15 Summary(uk):    õÔÉ̦ÔÉ ÄÌÑ ËÅÒÕ×ÁÎÎÑ ÐÁËÅÔÎÉÍɠƦÌØÔÒÁÍÉ ÑÄÒÁ Linux
16 Summary(zh_CN): LinuxÄں˰ü¹ýÂ˹ÜÀí¹¤¾ß
17 Name:           iptables
18 %if %{netfilter_snap} != 0
19 Version:        %{iptables_version}_%{netfilter_snap}
20 %else
21 Version:        %{iptables_version}
22 %endif
23 %define         _rel    1
24 Release:        %{_rel}@%{_kernel_ver_str}
25 License:        GPL
26 Group:          Networking/Daemons
27 URL:            http://www.netfilter.org/
28 Vendor:         Netfilter mailing list <netfilter@lists.samba.org>
29 %if %{netfilter_snap} != 0
30 Source0:        %{name}-%{iptables_version}_%{netfilter_snap}.tar.bz2
31 %else
32 Source0:        http://www.netfilter.org/files/%{name}-%{version}.tar.bz2
33 %endif
34 Source1:        cvs://cvs.samba.org/netfilter/%{name}-howtos.tar.bz2
35 # Source1-md5:  2ed2b452daefe70ededd75dc0061fd07
36 Source2:        %{name}.init
37 Source3:        %{name6}.init
38 Patch0:         %{name}-netfilter.patch
39 Patch1:         %{name}-Makefile.patch
40 Patch2:         %{name}-1.2.9-ipt_imq.patch
41 Patch3:         %{name}-libipt_time.patch
42 %if %{with doc}
43 BuildRequires:  sgml-tools
44 BuildRequires:  sgmls
45 BuildRequires:  tetex-dvips
46 BuildRequires:  tetex-latex
47 BuildRequires:  tetex-format-latex
48 BuildRequires:  tetex-tex-babel
49 BuildRequires:  sed >= 4.0
50 %endif
51 %if %{with dist_kernel} && %{netfilter_snap} != 0
52 BuildRequires:  kernel-headers(netfilter) = %{netfilter_snap}
53 BuildRequires:  kernel-source
54 Requires:       kernel(netfilter) = %{netfilter_snap}
55 %endif
56 BuildRequires:  linux-libc-headers >= %{llh_version}
57 BuildConflicts: kernel-headers < 2.3.0
58 Provides:       firewall-userspace-tool
59 Obsoletes:      netfilter
60 Obsoletes:      ipchains
61 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
62
63 %description
64 An extensible NAT system, and an extensible packet filtering system.
65 Replacement of ipchains in 2.4 kernels.
66
67 %description -l pl
68 Wydajny system translacji adresów (NAT) oraz system filtrowania
69 pakietów. Zamiennik ipchains w j±drach 2.4
70
71 %description -l pt_BR
72 Esta é a ferramenta que controla o código de filtragem de pacotes do
73 kernel 2.4, obsoletando ipchains. Com esta ferramenta você pode
74 configurar filtros de pacotes, NAT, mascaramento (masquerading),
75 regras dinâmicas (stateful inspection), etc.
76
77 %description -l ru
78 iptables ÕÐÒÁ×ÌÑÀÔ ËÏÄÏÍ ÆÉÌØÔÒÁÃÉÉ ÓÅÔÅ×ÙÈ ÐÁËÅÔÏ× × ÑÄÒÅ Linux. ïÎÉ
79 ÐÏÚ×ÏÌÑÀÔ ×ÁÍ ÕÓÔÁÎÁ×ÌÉ×ÁÔØ ÍÅÖÓÅÔÅ×ÙÅ ÜËÒÁÎÙ (firewalls) É IP
80 ÍÁÓËÁÒÁÄÉÎÇ, É Ô.Ð.
81
82 %description -l uk
83 iptables ÕÐÒÁ×ÌÑÀÔØ ËÏÄÏ͠ƦÌØÔÒÁ槠ÐÁËÅԦנÍÅÒÅÖ¦ × ÑÄÒ¦ Linux. ÷ÏÎÉ
84 ÄÏÚ×ÏÌÑÀÔØ ×ÁÍ ×ÓÔÁÎÏ×ÌÀ×ÁÔɠͦÖÍÅÒÅÖÅצ ÅËÒÁÎÉ (firewalls) ÔÁ IP
85 ÍÁÓËÁÒÁÄÉÎÇ, ÔÏÝÏ.
86
87 %package devel
88 Summary:        Libraries and headers for developing iptables extensions
89 Summary(pl):    Biblioteki i nag³ówki do tworzenia rozszerzeñ iptables
90 Group:          Development/Libraries
91 Requires:       %{name} = %{version}-%{release}
92
93 %description devel
94 Libraries and headers for developing iptables extensions.
95
96 %description devel -l pl
97 Biblioteki i pliki nag³ówkowe niezbêdne do tworzenia rozszerzeñ dla
98 iptables.
99
100 %package init
101 Summary:        Iptables init (RedHat style)
102 Summary(pl):    Iptables init (w stylu RedHata)
103 Group:          Networking/Admin
104 PreReq:         rc-scripts
105 Requires(post,preun):   /sbin/chkconfig
106 Requires:       %{name}
107 Obsoletes:      firewall-init
108 Obsoletes:      firewall-init-ipchains
109
110 %description init
111 Iptables-init is meant to provide an alternate way than firewall-init
112 to start and stop packet filtering through iptables(8).
113
114 %description init -l pl
115 Iptables-init ma na celu udostêpnienie alternatywnego w stosunku do
116 firewall-init sposobu w³±czania i wy³±czania filtrów IP j±dra poprzez
117 iptables(8).
118
119 %prep
120 %setup -q -a1
121 %patch0 -p1
122 %patch1 -p1
123 %patch2 -p1
124 %patch3 -p1
125
126 # removed broken ...
127 #%rm -f extensions/.set-test
128
129 chmod 755 extensions/.*-test*
130
131 %build
132 %{__make} all experimental \
133         CC="%{__cc}" \
134         COPT_FLAGS="%{rpmcflags} -D%{!?debug:N}DEBUG" \
135         KERNEL_DIR="%{_kernelsrcdir}" \
136         LIBDIR="%{_libdir}"
137
138 %if %{with doc}
139 %{__make} -C iptables-howtos
140 sed -i 's:$(HTML_HOWTOS)::g; s:$(PSUS_HOWTOS)::g' iptables-howtos/Makefile
141 %endif
142
143 %install
144 rm -rf $RPM_BUILD_ROOT
145 install -d $RPM_BUILD_ROOT{%{_initrddir},%{_includedir},%{_libdir},%{_mandir}/man3,}
146
147 echo ".so iptables-save.8" > %{name6}-save.8
148 echo ".so iptables-restore.8" > %{name6}-restore.8
149
150 %{__make} install install-experimental \
151         DESTDIR=$RPM_BUILD_ROOT \
152         BINDIR=%{_sbindir} \
153         MANDIR=%{_mandir} \
154         LIBDIR=%{_libdir}
155
156 echo ".so iptables.8" > $RPM_BUILD_ROOT%{_mandir}/man8/%{name6}.8
157
158 # Devel stuff
159 cp -a include/{lib*,ip*} $RPM_BUILD_ROOT%{_includedir}
160 install lib*/lib*.a $RPM_BUILD_ROOT%{_libdir}
161 install libipq/*.3 $RPM_BUILD_ROOT%{_mandir}/man3
162
163 install %{SOURCE2} $RPM_BUILD_ROOT%{_initrddir}/%{name}
164 install %{SOURCE3} $RPM_BUILD_ROOT%{_initrddir}/%{name6}
165
166 %clean
167 rm -rf $RPM_BUILD_ROOT
168
169 %post init
170 /sbin/chkconfig --add %{name}
171 /sbin/chkconfig --add %{name6}
172
173 %preun init
174 if [ "$1" = "0" ]; then
175         /sbin/chkconfig --del %{name}
176         /sbin/chkconfig --del %{name6}
177 fi
178
179 %files
180 %defattr(644,root,root,755)
181 %{?with_doc:%doc iptables-howtos/{NAT,networking-concepts,packet-filtering}-HOWTO*}
182 %attr(755,root,root) %{_sbindir}/*
183 %dir %{_libdir}/iptables
184 %attr(755,root,root) %{_libdir}/iptables/*.so
185 %{_mandir}/man8/*
186
187 %files devel
188 %defattr(644,root,root,755)
189 %{?with_doc:%doc iptables-howtos/netfilter-hacking-HOWTO*}
190 %{_libdir}/lib*.a
191 %{_includedir}/*.h
192 %dir %{_includedir}/libip*
193 %{_includedir}/libip*/*.h
194 %{_mandir}/man3/*
195
196 %files init
197 %defattr(644,root,root,755)
198 %attr(754,root,root) %{_initrddir}/*
This page took 0.037075 seconds and 3 git commands to generate.