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