]> git.pld-linux.org Git - packages/xtables-addons.git/blob - xtables-addons.spec
- added URL and updated Source0
[packages/xtables-addons.git] / xtables-addons.spec
1 #
2 # TODO
3 # - kernel modules package (or not, 2 packages with mutual R?)
4 # - descriptions
5 #
6 # Conditional build:
7 %bcond_without  dist_kernel     # without distribution kernel
8 %bcond_without  kernel
9 %bcond_without  userspace
10 #
11 %define         rel 1
12 Summary:        Extensible packet filtering system && extensible NAT system
13 Summary(pl.UTF-8):      System filtrowania pakietów oraz system translacji adresów (NAT)
14 Summary(pt_BR.UTF-8):   Ferramenta para controlar a filtragem de pacotes no kernel-2.6.x
15 Summary(ru.UTF-8):      Утилиты для управления пакетными фильтрами ядра Linux
16 Summary(uk.UTF-8):      Утиліти для керування пакетними фільтрами ядра Linux
17 Summary(zh_CN.UTF-8):   Linux内核包过滤管理工具
18 Name:           xtables-addons
19 Version:        1.5.7
20 Release:        %{rel}@%{_kernel_ver_str}
21 License:        GPL
22 Group:          Networking/Daemons
23 Source0:        http://dev.medozas.de/files/xtables/%{name}-%{version}.tar.bz2
24 # Source0-md5:  cfd0a0997efd4084d0505f93ff28c4cf
25 URL:            http://jengelh.medozas.de/projects/xtables/
26 Source1:        ipset.init
27 Patch0:         %{name}-libs.patch
28 Patch1:         %{name}-geoip-dbpath.patch
29 Patch2:         %{name}-help.patch
30 BuildRequires:  autoconf
31 BuildRequires:  automake
32 BuildRequires:  iptables-devel >= 1.4.1
33 %{?with_dist_kernel:BuildRequires:      kernel%{_alt_kernel}-module-build >= 3:2.6.25}
34 BuildRequires:  libtool
35 BuildRequires:  rpmbuild(macros) >= 1.379
36 %{?with_dist_kernel:%requires_releq_kernel}
37 Requires(post,postun):  /sbin/depmod
38 Requires:       iptables >= 1.4.1
39 Obsoletes:      ipset
40 Obsoletes:      ipset-init
41 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
42
43 %description
44 An extensible NAT system, and an extensible packet filtering system.
45 Replacement of ipchains in 2.6 and higher kernels.
46
47 %description -l pl.UTF-8
48 Wydajny system translacji adresów (NAT) oraz system filtrowania
49 pakietów. Zamiennik ipchains w jądrach 2.6 i nowszych.
50
51 %description -l pt_BR.UTF-8
52 Esta é a ferramenta que controla o código de filtragem de pacotes do
53 kernel 2.6, obsoletando ipchains. Com esta ferramenta você pode
54 configurar filtros de pacotes, NAT, mascaramento (masquerading),
55 regras dinâmicas (stateful inspection), etc.
56
57 %description -l ru.UTF-8
58 xtables-addons управляют кодом фильтрации сетевых пакетов в ядре
59 Linux. Они позволяют вам устанавливать межсетевые экраны (firewalls) и
60 IP маскарадинг, и т.п.
61
62 %description -l uk.UTF-8
63 xtables-addons управляють кодом фільтрації пакетів мережі в ядрі
64 Linux. Вони дозволяють вам встановлювати міжмережеві екрани
65 (firewalls) та IP маскарадинг, тощо.
66
67 %prep
68 %setup -q
69 %patch0 -p1
70 %patch1 -p1
71 %patch2 -p1
72
73 %build
74 %{__libtoolize}
75 %{__aclocal}
76 %{__autoconf}
77 %{__automake}
78 %configure \
79         --with-kbuild=%{_kernelsrcdir} \
80         --with-ksource=%{_kernelsrcdir}
81
82 export XA_TOPSRCDIR=$PWD
83
84 %if %{with kernel}
85 %build_kernel_modules -C extensions -m compat_xtables
86 %endif
87
88 %if %{with userspace}
89 %{__make} -C extensions
90 %{__make} -C extensions/ipset
91 %endif
92
93 %install
94 rm -rf $RPM_BUILD_ROOT
95 install -d $RPM_BUILD_ROOT{/etc/rc.d/init.d,/lib/modules/%{_kernel_ver}/kernel/net/ipv4/netfilter,%{_mandir}/man8}
96
97 %if %{with kernel}
98 cd extensions
99 %install_kernel_modules -m compat_xtables -d kernel/net/netfilter
100 install xt_*ko $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}/kernel/net/netfilter
101 install ipset/*.ko $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}/kernel/net/ipv4/netfilter
102 cd ..
103 %endif
104
105 %if %{with userspace}
106 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/ipset
107
108 %{__make} -C extensions install \
109         DESTDIR=$RPM_BUILD_ROOT
110 %{__make} -C extensions/ipset install \
111         DESTDIR=$RPM_BUILD_ROOT
112
113 cd extensions
114 for m in $(cat .manpages.lst); do
115         install libxt_$m.man $RPM_BUILD_ROOT%{_mandir}/man8/libxt_$m.8
116 done
117 cd ..
118 %endif
119
120 %clean
121 rm -rf $RPM_BUILD_ROOT
122
123 %post
124 %depmod %{_kernel_ver}
125 %if %{with userspace}
126 /sbin/chkconfig --add ipset
127 %endif
128
129 %postun
130 %depmod %{_kernel_ver}
131 %if %{with userspace}
132 if [ "$1" = "0" ]; then
133         /sbin/chkconfig --del ipset
134 fi
135 %endif
136
137 %files
138 %defattr(644,root,root,755)
139 %if %{with userspace}
140 # ipset
141 %attr(754,root,root) /etc/rc.d/init.d/ipset
142 %attr(755,root,root) %{_libdir}/xtables/libipset_iphash.so
143 %attr(755,root,root) %{_libdir}/xtables/libipset_ipmap.so
144 %attr(755,root,root) %{_libdir}/xtables/libipset_ipporthash.so
145 %attr(755,root,root) %{_libdir}/xtables/libipset_iptree.so
146 %attr(755,root,root) %{_libdir}/xtables/libipset_iptreemap.so
147 %attr(755,root,root) %{_libdir}/xtables/libipset_macipmap.so
148 %attr(755,root,root) %{_libdir}/xtables/libipset_nethash.so
149 %attr(755,root,root) %{_libdir}/xtables/libipset_portmap.so
150 %attr(755,root,root) %{_sbindir}/ipset
151 %{_mandir}/man8/ipset.*
152 #
153 %attr(755,root,root) %{_libdir}/xtables/libxt_CHAOS.so
154 %attr(755,root,root) %{_libdir}/xtables/libxt_DELUDE.so
155 %attr(755,root,root) %{_libdir}/xtables/libxt_DHCPADDR.so
156 %attr(755,root,root) %{_libdir}/xtables/libxt_IPMARK.so
157 %attr(755,root,root) %{_libdir}/xtables/libxt_LOGMARK.so
158 %attr(755,root,root) %{_libdir}/xtables/libxt_SYSRQ.so
159 %attr(755,root,root) %{_libdir}/xtables/libxt_TARPIT.so
160 %attr(755,root,root) %{_libdir}/xtables/libxt_TEE.so
161 %attr(755,root,root) %{_libdir}/xtables/libxt_condition.so
162 %attr(755,root,root) %{_libdir}/xtables/libxt_dhcpaddr.so
163 %attr(755,root,root) %{_libdir}/xtables/libxt_fuzzy.so
164 %attr(755,root,root) %{_libdir}/xtables/libxt_geoip.so
165 %attr(755,root,root) %{_libdir}/xtables/libxt_ipp2p.so
166 %attr(755,root,root) %{_libdir}/xtables/libxt_portscan.so
167 %attr(755,root,root) %{_libdir}/xtables/libxt_quota2.so
168 %{_mandir}/man8/libxt_CHAOS.*
169 %{_mandir}/man8/libxt_DELUDE.*
170 %{_mandir}/man8/libxt_DHCPADDR.*
171 %{_mandir}/man8/libxt_IPMARK.*
172 %{_mandir}/man8/libxt_LOGMARK.*
173 %{_mandir}/man8/libxt_SYSRQ.*
174 %{_mandir}/man8/libxt_TARPIT.*
175 %{_mandir}/man8/libxt_condition.*
176 %{_mandir}/man8/libxt_dhcpaddr.*
177 %{_mandir}/man8/libxt_fuzzy.*
178 %{_mandir}/man8/libxt_geoip.*
179 %{_mandir}/man8/libxt_ipp2p.*
180 %{_mandir}/man8/libxt_portscan.*
181 %{_mandir}/man8/libxt_quota2.*
182 %endif
183 %if %{with kernel}
184 # ipset
185 /lib/modules/%{_kernel_ver}/kernel/net/ipv4/netfilter/ip_set.ko.gz
186 /lib/modules/%{_kernel_ver}/kernel/net/ipv4/netfilter/ip_set_iphash.ko.gz
187 /lib/modules/%{_kernel_ver}/kernel/net/ipv4/netfilter/ip_set_ipmap.ko.gz
188 /lib/modules/%{_kernel_ver}/kernel/net/ipv4/netfilter/ip_set_ipporthash.ko.gz
189 /lib/modules/%{_kernel_ver}/kernel/net/ipv4/netfilter/ip_set_iptree.ko.gz
190 /lib/modules/%{_kernel_ver}/kernel/net/ipv4/netfilter/ip_set_iptreemap.ko.gz
191 /lib/modules/%{_kernel_ver}/kernel/net/ipv4/netfilter/ip_set_macipmap.ko.gz
192 /lib/modules/%{_kernel_ver}/kernel/net/ipv4/netfilter/ip_set_nethash.ko.gz
193 /lib/modules/%{_kernel_ver}/kernel/net/ipv4/netfilter/ip_set_portmap.ko.gz
194 /lib/modules/%{_kernel_ver}/kernel/net/ipv4/netfilter/ipt_SET.ko.gz
195 /lib/modules/%{_kernel_ver}/kernel/net/ipv4/netfilter/ipt_set.ko.gz
196 #
197 /lib/modules/%{_kernel_ver}/kernel/net/netfilter/compat_xtables.ko.gz
198 /lib/modules/%{_kernel_ver}/kernel/net/netfilter/xt_CHAOS.ko.gz
199 /lib/modules/%{_kernel_ver}/kernel/net/netfilter/xt_DELUDE.ko.gz
200 /lib/modules/%{_kernel_ver}/kernel/net/netfilter/xt_DHCPADDR.ko.gz
201 /lib/modules/%{_kernel_ver}/kernel/net/netfilter/xt_IPMARK.ko.gz
202 /lib/modules/%{_kernel_ver}/kernel/net/netfilter/xt_LOGMARK.ko.gz
203 /lib/modules/%{_kernel_ver}/kernel/net/netfilter/xt_SYSRQ.ko.gz
204 /lib/modules/%{_kernel_ver}/kernel/net/netfilter/xt_TARPIT.ko.gz
205 /lib/modules/%{_kernel_ver}/kernel/net/netfilter/xt_TEE.ko.gz
206 /lib/modules/%{_kernel_ver}/kernel/net/netfilter/xt_condition.ko.gz
207 /lib/modules/%{_kernel_ver}/kernel/net/netfilter/xt_fuzzy.ko.gz
208 /lib/modules/%{_kernel_ver}/kernel/net/netfilter/xt_geoip.ko.gz
209 /lib/modules/%{_kernel_ver}/kernel/net/netfilter/xt_ipp2p.ko.gz
210 /lib/modules/%{_kernel_ver}/kernel/net/netfilter/xt_portscan.ko.gz
211 /lib/modules/%{_kernel_ver}/kernel/net/netfilter/xt_quota2.ko.gz
212 %endif
This page took 0.061993 seconds and 4 git commands to generate.