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