]> git.pld-linux.org Git - packages/ipset.git/blame_incremental - ipset.spec
- updated to 7.14
[packages/ipset.git] / ipset.spec
... / ...
CommitLineData
1#
2# TODO:
3# - patch our kernel to provide the needed API and update
4# the dependencies here
5#
6# Conditional build:
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# The goal here is to have main, userspace, package built once with
12# simple release number, and only rebuild kernel packages with kernel
13# version as part of release number, without the need to bump release
14# with every kernel change.
15%if 0%{?_pld_builder:1} && %{with kernel} && %{with userspace}
16%{error:kernel and userspace cannot be built at the same time on PLD builders}
17exit 1
18%endif
19
20%if %{without userspace}
21# nothing to be placed to debuginfo package
22%define _enable_debug_packages 0
23%endif
24
25%define rel 1
26%define pname ipset
27Summary: IP sets utility
28Summary(pl.UTF-8): Narzędzie do zarządzania zbiorami IP
29Name: %{pname}%{?_pld_builder:%{?with_kernel:-kernel}}%{_alt_kernel}
30Version: 7.14
31Release: %{rel}%{?_pld_builder:%{?with_kernel:@%{_kernel_ver_str}}}
32License: GPL v2
33Group: Networking/Admin
34#Source0Download: http://ipset.netfilter.org/install.html
35Source0: http://ipset.netfilter.org/%{pname}-%{version}.tar.bz2
36# Source0-md5: a624b3de000a14b9fd2518a9a806ef1c
37Source1: %{pname}.init
38URL: http://ipset.netfilter.org/
39BuildRequires: autoconf >= 2.63
40BuildRequires: automake
41BuildRequires: libltdl-devel >= 2:2.0
42BuildRequires: libmnl-devel >= 1
43BuildRequires: libtool >= 2:2.0
44%{?with_userspace:BuildRequires: linux-libc-headers >= 7:2.6.38.6}
45BuildRequires: pkgconfig
46BuildRequires: rpmbuild(macros) >= 1.701
47%{?with_kernel:%{expand:%buildrequires_kernel kernel%%{_alt_kernel}-module-build >= 3:2.6.24}}
48Suggests: kernel-net-ipset
49BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
50
51# unresolved ipset_errcode, defined in the ipset binary
52%define skip_post_check_so libipset\.so.*
53
54%description
55IP sets are a framework inside the Linux 2.4.x and 2.6.x kernel, which
56can be administered by the ipset utility. Depending on the type,
57currently an IP set may store IP addresses, (TCP/UDP) port numbers or
58IP addresses with MAC addresses in a way, which ensures lightning
59speed when matching an entry against a set.
60
61%description -l pl.UTF-8
62Zbiory IP to szkielet w jądrze Linuksa 2.4.x i 2.6.x, którym można
63administrować przy użyciu narzędzia ipset. W zależności od rodzaju
64aktualnie zbiór IP może przechowywać adresy IP, numery portów
65(TCP/UDP) lub adresy IP z adresami MAC - w sposób zapewniający
66maksymalną szybkość przy dopasowywaniu elementu do zbioru.
67
68%package devel
69Summary: Header files for ipset interface
70Summary(pl.UTF-8): Pliki nagłówkowe do interfejsu ipset
71Group: Development/Libraries
72Requires: %{name} = %{version}-%{release}
73Requires: libmnl-devel >= 1
74
75%description devel
76Header files for IPset interface.
77
78%description devel -l pl.UTF-8
79Pliki nagłówkowe do interfejsu IPset.
80
81%package static
82Summary: Static ipset interface library
83Summary(pl.UTF-8): Biblioteka statyczna interfejsu ipset
84Group: Development/Libraries
85Requires: %{name}-devel = %{version}-%{release}
86
87%description static
88Static IPset interface library.
89
90%description static -l pl.UTF-8
91Biblioteka statyczna interfejsu IPset.
92
93%package init
94Summary: IPset init script
95Summary(pl.UTF-8): Skrypt startowy IPset
96Group: Networking/Admin
97Requires(post,preun): /sbin/chkconfig
98Requires: %{pname} = %{version}-%{release}
99Requires: rc-scripts
100
101%description init
102IPset initialization script.
103
104%description init -l pl.UTF-8
105Skrypt startowy IPset.
106
107%package -n bash-completion-ipset
108Summary: Bash completion for ipset command
109Summary(pl.UTF-8): Bashowe dopełnianie parametrów polecenia ipset
110Group: Applications/Shells
111Requires: %{pname} = %{version}-%{release}
112Requires: bash-completion >= 2.0
113
114%description -n bash-completion-ipset
115Bash completion for ipset command.
116
117%description -n bash-completion-ipset -l pl.UTF-8
118Bashowe dopełnianie parametrów polecenia ipset.
119
120%define kernel_pkg()\
121%package -n kernel%{_alt_kernel}-net-ipset\
122Summary: IPset kernel modules\
123Summary(pl.UTF-8): Moduły jądra oferujące wsparcie dla zbiorów IP\
124Release: %{rel}@%{_kernel_ver_str}\
125Group: Base/Kernel\
126Requires(post,postun): /sbin/depmod\
127%requires_releq_kernel\
128Requires(postun): %releq_kernel\
129\
130%description -n kernel%{_alt_kernel}-net-ipset\
131IP sets are a framework inside the Linux 2.4.x and 2.6.x kernel, which\
132can be administered by the ipset utility. Depending on the type,\
133currently an IP set may store IP addresses, (TCP/UDP) port numbers or\
134IP addresses with MAC addresses in a way, which ensures lightning\
135speed when matching an entry against a set.\
136\
137This package contains kernel modules.\
138\
139%description -n kernel%{_alt_kernel}-net-ipset -l pl.UTF-8\
140Zbiory IP to szkielet w jądrze Linuksa 2.4.x i 2.6.x, którym można\
141administrować przy użyciu narzędzia ipset. W zależności od\
142rodzaju aktualnie zbiór IP może przechowywać adresy IP, numery\
143portów (TCP/UDP) lub adresy IP z adresami MAC - w sposób\
144zapewniający maksymalną szybkość przy dopasowywaniu elementu do\
145zbioru.\
146\
147Ten pakiet zawiera moduły jądra oferujące wsparcie dla zbiorów IP.\
148\
149%if %{with kernel}\
150%files -n kernel%{_alt_kernel}-net-ipset\
151%defattr(644,root,root,755)\
152/lib/modules/%{_kernel_ver}/kernel/net/ipv4/netfilter/xt_*.ko*\
153%dir /lib/modules/%{_kernel_ver}/kernel/net/ipv4/netfilter/ipset\
154/lib/modules/%{_kernel_ver}/kernel/net/ipv4/netfilter/ipset/ip_set.ko*\
155/lib/modules/%{_kernel_ver}/kernel/net/ipv4/netfilter/ipset/ip_set_*.ko*\
156%endif\
157\
158%post -n kernel%{_alt_kernel}-net-ipset\
159%depmod %{_kernel_ver}\
160\
161%postun -n kernel%{_alt_kernel}-net-ipset\
162%depmod %{_kernel_ver}\
163%{nil}
164
165%define build_kernel_pkg()\
166%configure \\\
167 --disable-silent-rules \\\
168 --with-kmod=yes \\\
169 --with-kbuild=%{_kernelsrcdir} \\\
170 --with-settype-modules-list=all\
171\
172# a hack not to list all modules: list only ip_set, all other are build anyway\
173%build_kernel_modules -C kernel/net/netfilter -m ipset/ip_set IP_SET_MAX=255 KDIR=$PWD/../..\
174\
175for drv in kernel/net/netfilter/ipset/ip_set*.ko ; do\
176%install_kernel_modules -D installed -m ${drv%.ko} -d kernel/net/ipv4/netfilter/ipset\
177done\
178for drv in kernel/net/netfilter/xt_*.ko ; do\
179%install_kernel_modules -D installed -m ${drv%.ko} -d kernel/net/ipv4/netfilter\
180done\
181%{nil}
182
183%{?with_kernel:%{expand:%create_kernel_packages}}
184
185%prep
186%setup -q -n %{pname}-%{version}
187
188%build
189%{__aclocal}
190%{__autoconf}
191%{__autoheader}
192%{__automake}
193%if %{with userspace}
194install -d build-usr
195cd build-usr
196../%configure \
197 bashcompdir=%{bash_compdir} \
198 --enable-bashcompl \
199 --disable-silent-rules \
200 --with-kmod=no \
201 --with-settype-modules-list=all
202
203%{__make}
204cd ..
205%endif
206
207%{?with_kernel:%{expand:%build_kernel_packages}}
208
209%install
210rm -rf $RPM_BUILD_ROOT
211
212%if %{with userspace}
213install -d $RPM_BUILD_ROOT{/etc/rc.d/init.d,%{_includedir}/libipset}
214
215%{__make} -C build-usr install \
216 DESTDIR=$RPM_BUILD_ROOT
217
218install -p %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{pname}
219%endif
220
221%if %{with kernel}
222install -d $RPM_BUILD_ROOT
223cp -a installed/* $RPM_BUILD_ROOT
224%endif
225
226%clean
227rm -rf $RPM_BUILD_ROOT
228
229%post init
230/sbin/chkconfig --add %{pname}
231
232%preun init
233if [ "$1" = "0" ]; then
234 /sbin/chkconfig --del %{pname}
235fi
236
237%if %{with userspace}
238%files
239%defattr(644,root,root,755)
240%doc ChangeLog ChangeLog.ippool README UPGRADE
241%attr(755,root,root) %{_sbindir}/ipset
242%attr(755,root,root) %{_sbindir}/ipset-translate
243%attr(755,root,root) %{_libdir}/libipset.so.*.*.*
244%attr(755,root,root) %ghost %{_libdir}/libipset.so.13
245%{_mandir}/man8/ipset.8*
246%{_mandir}/man8/ipset-translate.8*
247
248
249%files devel
250%defattr(644,root,root,755)
251%attr(755,root,root) %{_libdir}/libipset.so
252%{_libdir}/libipset.la
253%{_includedir}/libipset
254%{_pkgconfigdir}/libipset.pc
255%{_mandir}/man3/libipset.3*
256
257%files static
258%defattr(644,root,root,755)
259%{_libdir}/libipset.a
260
261%files init
262%defattr(644,root,root,755)
263%attr(754,root,root) /etc/rc.d/init.d/ipset
264
265%files -n bash-completion-ipset
266%defattr(644,root,root,755)
267%{bash_compdir}/ipset
268%endif
This page took 0.077588 seconds and 4 git commands to generate.