]> git.pld-linux.org Git - packages/ipset.git/blame_incremental - ipset.spec
- up to 6.34
[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: 6.34
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: 51bd03f976a1501fd45e1d71a1e2e6bf
37Source1: %{pname}.init
38URL: http://ipset.netfilter.org/
39BuildRequires: autoconf >= 2.50
40BuildRequires: automake
41BuildRequires: libmnl-devel >= 1
42BuildRequires: libltdl-devel >= 2:2.0
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.20.2}}
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
64rodzaju aktualnie zbiór IP może przechowywać adresy IP, numery
65portów (TCP/UDP) lub adresy IP z adresami MAC - w sposób
66zapewniający maksymalną szybkość przy dopasowywaniu elementu do
67zbioru.
68
69%package devel
70Summary: Header files for ipset interface
71Summary(pl.UTF-8): Pliki nagłówkowe do interfejsu ipset
72Group: Development/Libraries
73Requires: %{name} = %{version}-%{release}
74Requires: libmnl-devel >= 1
75
76%description devel
77Header files for IPset interface.
78
79%description devel -l pl.UTF-8
80Pliki nagłówkowe do interfejsu IPset.
81
82%package static
83Summary: Static ipset interface library
84Summary(pl.UTF-8): Biblioteka statyczna interfejsu ipset
85Group: Development/Libraries
86Requires: %{name}-devel = %{version}-%{release}
87
88%description static
89Static IPset interface library.
90
91%description static -l pl.UTF-8
92Biblioteka statyczna interfejsu IPset.
93
94%package init
95Summary: IPset init script
96Summary(pl.UTF-8): Skrypt startowy IPset
97Group: Networking/Admin
98Requires(post,preun): /sbin/chkconfig
99Requires: %{pname} = %{version}-%{release}
100Requires: rc-scripts
101
102%description init
103IPset initialization script.
104
105%description init -l pl.UTF-8
106Skrypt startowy IPset.
107
108%package -n bash-completion-ipset
109Summary: Bash completion for ipset command
110Summary(pl.UTF-8): Bashowe dopełnianie parametrów polecenia ipset
111Group: Applications/Shells
112Requires: %{pname} = %{version}-%{release}
113Requires: bash-completion >= 2.0
114
115%description -n bash-completion-ipset
116Bash completion for ipset command.
117
118%description -n bash-completion-ipset -l pl.UTF-8
119Bashowe dopełnianie parametrów polecenia ipset.
120
121%define kernel_pkg()\
122%package -n kernel%{_alt_kernel}-net-ipset\
123Summary: IPset kernel modules\
124Summary(pl.UTF-8): Moduły jądra oferujące wsparcie dla zbiorów IP\
125Release: %{rel}@%{_kernel_ver_str}\
126Group: Base/Kernel\
127Requires(post,postun): /sbin/depmod\
128%requires_releq_kernel\
129Requires(postun): %releq_kernel\
130\
131%description -n kernel%{_alt_kernel}-net-ipset\
132IP sets are a framework inside the Linux 2.4.x and 2.6.x kernel, which\
133can be administered by the ipset utility. Depending on the type,\
134currently an IP set may store IP addresses, (TCP/UDP) port numbers or\
135IP addresses with MAC addresses in a way, which ensures lightning\
136speed when matching an entry against a set.\
137\
138This package contains kernel modules.\
139\
140%description -n kernel%{_alt_kernel}-net-ipset -l pl.UTF-8\
141Zbiory IP to szkielet w jądrze Linuksa 2.4.x i 2.6.x, którym można\
142administrować przy użyciu narzędzia ipset. W zależności od\
143rodzaju aktualnie zbiór IP może przechowywać adresy IP, numery\
144portów (TCP/UDP) lub adresy IP z adresami MAC - w sposób\
145zapewniający maksymalną szybkość przy dopasowywaniu elementu do\
146zbioru.\
147\
148Ten pakiet zawiera moduły jądra oferujące wsparcie dla zbiorów IP.\
149\
150%if %{with kernel}\
151%files -n kernel%{_alt_kernel}-net-ipset\
152%defattr(644,root,root,755)\
153/lib/modules/%{_kernel_ver}/kernel/net/ipv4/netfilter/xt_*.ko*\
154%dir /lib/modules/%{_kernel_ver}/kernel/net/ipv4/netfilter/ipset\
155/lib/modules/%{_kernel_ver}/kernel/net/ipv4/netfilter/ipset/ip_set.ko*\
156/lib/modules/%{_kernel_ver}/kernel/net/ipv4/netfilter/ipset/ip_set_*.ko*\
157%endif\
158\
159%post -n kernel%{_alt_kernel}-net-ipset\
160%depmod %{_kernel_ver}\
161\
162%postun -n kernel%{_alt_kernel}-net-ipset\
163%depmod %{_kernel_ver}\
164%{nil}
165
166%define build_kernel_pkg()\
167%configure \\\
168 --disable-silent-rules \\\
169 --with-kmod=yes \\\
170 --with-kbuild=%{_kernelsrcdir} \\\
171 --with-settype-modules-list=all\
172\
173# a hack not to list all modules: list only ip_set, all other are build anyway\
174%build_kernel_modules -C kernel/net/netfilter -m ipset/ip_set IP_SET_MAX=255 KDIR=$PWD/../..\
175\
176for drv in kernel/net/netfilter/ipset/ip_set*.ko ; do\
177%install_kernel_modules -D installed -m ${drv%.ko} -d kernel/net/ipv4/netfilter/ipset\
178done\
179for drv in kernel/net/netfilter/xt_*.ko ; do\
180%install_kernel_modules -D installed -m ${drv%.ko} -d kernel/net/ipv4/netfilter\
181done\
182%{nil}
183
184%{?with_kernel:%{expand:%create_kernel_packages}}
185
186%prep
187%setup -q -n %{pname}-%{version}
188
189%build
190%{__aclocal}
191%{__autoconf}
192%{__autoheader}
193%{__automake}
194%if %{with userspace}
195install -d build-usr
196cd build-usr
197../%configure \
198 bashcompdir=%{bash_compdir} \
199 --enable-bashcompl \
200 --disable-silent-rules \
201 --with-kmod=no \
202 --with-settype-modules-list=all
203
204%{__make}
205cd ..
206%endif
207
208%{?with_kernel:%{expand:%build_kernel_packages}}
209
210%install
211rm -rf $RPM_BUILD_ROOT
212
213%if %{with userspace}
214install -d $RPM_BUILD_ROOT{/etc/rc.d/init.d,%{_includedir}/libipset}
215
216%{__make} -C build-usr install \
217 DESTDIR=$RPM_BUILD_ROOT
218
219install -p %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{pname}
220%endif
221
222%if %{with kernel}
223install -d $RPM_BUILD_ROOT
224cp -a installed/* $RPM_BUILD_ROOT
225%endif
226
227%clean
228rm -rf $RPM_BUILD_ROOT
229
230%post init
231/sbin/chkconfig --add %{pname}
232
233%preun init
234if [ "$1" = "0" ]; then
235 /sbin/chkconfig --del %{pname}
236fi
237
238%if %{with userspace}
239%files
240%defattr(644,root,root,755)
241%doc ChangeLog ChangeLog.ippool README UPGRADE
242%attr(755,root,root) %{_sbindir}/ipset
243%attr(755,root,root) %{_libdir}/libipset.so.*.*.*
244%attr(755,root,root) %ghost %{_libdir}/libipset.so.3
245%{_mandir}/man8/ipset.8*
246
247%files devel
248%defattr(644,root,root,755)
249%attr(755,root,root) %{_libdir}/libipset.so
250%{_libdir}/libipset.la
251%{_includedir}/libipset
252%{_pkgconfigdir}/libipset.pc
253
254%files static
255%defattr(644,root,root,755)
256%{_libdir}/libipset.a
257
258%files init
259%defattr(644,root,root,755)
260%attr(754,root,root) /etc/rc.d/init.d/ipset
261
262%files -n bash-completion-ipset
263%defattr(644,root,root,755)
264%{bash_compdir}/ipset
265%endif
This page took 0.028252 seconds and 4 git commands to generate.