]> git.pld-linux.org Git - packages/ipset.git/blame - ipset.spec
- release 7
[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
PS
6# Conditional build:
7%bcond_without dist_kernel # allow non-distribution kernel
8%bcond_without kernel # don't build kernel modules
9%bcond_without userspace # don't build userspace tools
10%bcond_with verbose # verbose build (V=1)
11
d33761e1 12%if %{without kernel}
3bc59268
PS
13%undefine with_dist_kernel
14%endif
3bc59268
PS
15%if "%{_alt_kernel}" != "%{nil}"
16%undefine with_userspace
17%endif
d33761e1
ER
18%if %{without userspace}
19# nothing to be placed to debuginfo package
20%define _enable_debug_packages 0
21%endif
3bc59268 22
2dcfef5f 23%define rel 7
5b36c760 24%define pname ipset
bc9c8d01 25Summary: IP sets utility
cb832b79 26Summary(pl.UTF-8): Narzędzie do zarządzania zbiorami IP
4d9c906c 27Name: %{pname}%{_alt_kernel}
f329c6fe 28Version: 6.9.1
3bc59268 29Release: %{rel}
6312651c 30License: GPL v2
bc9c8d01 31Group: Networking/Admin
6312651c 32#Source0Download: http://ipset.netfilter.org/install.html
5b36c760 33Source0: http://ipset.netfilter.org/%{pname}-%{version}.tar.bz2
f329c6fe 34# Source0-md5: 71f4b826e025be5918a52e9843673167
5b36c760 35Source1: %{pname}.init
8244c9e3
JK
36Patch0: %{pname}-config_dist.patch
37Patch1: %{pname}-no_kernel.patch
8c771458 38Patch2: %{pname}-hash-net-if-fix.patch
bc9c8d01 39URL: http://ipset.netfilter.org/
6312651c 40BuildRequires: autoconf >= 2.50
7e0de454 41BuildRequires: automake
6312651c 42%{?with_dist_kernel:BuildRequires: kernel%{_alt_kernel}-module-build >= 3:2.6.38.6}
13648ed2 43BuildRequires: libmnl-devel
7e0de454 44BuildRequires: libtool
6312651c 45%{?with_userspace:BuildRequires: linux-libc-headers >= 7:2.6.38.6}
2bf78421 46BuildRequires: pkgconfig
13648ed2 47BuildRequires: rpmbuild(macros) >= 1.583
2a7f4757 48Suggests: kernel-net-ipset
bc9c8d01
JK
49BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
50
13648ed2
JK
51# unresolved ipset_errcode, defined in the ipset binary
52%define skip_post_check_so libipset\.so.*
53
bc9c8d01
JK
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
00760b7e
JR
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
13648ed2
JK
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.
9e9bc01b 68
40d655f1 69%package devel
e791bf9d 70Summary: Header files for ipset interface
cb832b79 71Summary(pl.UTF-8): Pliki nagłówkowe do interfejsu ipset
f62f2152 72Group: Development/Libraries
6312651c
JB
73Requires: %{name} = %{version}-%{release}
74Requires: libmnl-devel
40d655f1 75
76%description devel
3bc59268 77Header files for IPset interface.
40d655f1 78
00760b7e 79%description devel -l pl.UTF-8
3bc59268 80Pliki nagłówkowe do interfejsu IPset.
40d655f1 81
13648ed2
JK
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
12667538 94%package init
a264566a
JB
95Summary: IPset init script
96Summary(pl.UTF-8): Skrypt startowy IPset
12667538 97Group: Networking/Admin
12667538 98Requires(post,preun): /sbin/chkconfig
a264566a 99Requires: %{pname} = %{version}-%{release}
af1d549a 100Requires: rc-scripts
12667538
PS
101
102%description init
3bc59268
PS
103IPset initialization script.
104
a264566a
JB
105%description init -l pl.UTF-8
106Skrypt startowy IPset.
107
3bc59268
PS
108%package -n kernel%{_alt_kernel}-net-ipset
109Summary: IPset kernel modules
110Summary(pl.UTF-8): Moduły jądra oferujące wsparcie dla zbiorów IP
111Release: %{rel}@%{_kernel_ver_str}
3bc59268
PS
112Group: Base/Kernel
113%{?with_dist_kernel:%requires_releq_kernel}
114Requires(post,postun): /sbin/depmod
115
116%description -n kernel%{_alt_kernel}-net-ipset
117IP sets are a framework inside the Linux 2.4.x and 2.6.x kernel, which
118can be administered by the ipset utility. Depending on the type,
119currently an IP set may store IP addresses, (TCP/UDP) port numbers or
120IP addresses with MAC addresses in a way, which ensures lightning
121speed when matching an entry against a set.
122
123This package contains kernel modules.
124
125%description -n kernel%{_alt_kernel}-net-ipset -l pl.UTF-8
126Zbiory IP to szkielet w jądrze Linuksa 2.4.x i 2.6.x, którym można
13648ed2
JK
127administrować przy użyciu narzędzia ipset. W zależności od
128rodzaju aktualnie zbiór IP może przechowywać adresy IP, numery
129portów (TCP/UDP) lub adresy IP z adresami MAC - w sposób
130zapewniający maksymalną szybkość przy dopasowywaniu elementu do
131zbioru.
3bc59268
PS
132
133Ten pakiet zawiera moduły jądra oferujące wsparcie dla zbiorów IP.
12667538 134
bc9c8d01 135%prep
5b36c760 136%setup -q -n %{pname}-%{version}
13648ed2
JK
137%if %{with kernel}
138%{?with_dist_kernel:%patch0 -p1}
139%else
140%patch1 -p1
141%endif
8c771458 142%patch2 -p1
fffbab59 143
bc9c8d01 144%build
7e0de454 145%{__libtoolize}
13648ed2 146%{__aclocal} -I m4
7e0de454
JK
147%{__autoconf}
148%{__autoheader}
149%{__automake}
150%configure \
151 --with-kbuild=%{_kernelsrcdir}
152
3bc59268 153%if %{with userspace}
13648ed2 154%{__make}
3bc59268
PS
155%endif
156
157%if %{with kernel}
13648ed2
JK
158# a hack not to list all modules: list only ip_set, all other are build anyway
159%build_kernel_modules -C kernel/net/netfilter -m ipset/ip_set IP_SET_MAX=255 KDIR=$PWD/../..
3bc59268 160%endif
bc9c8d01
JK
161
162%install
163rm -rf $RPM_BUILD_ROOT
3bc59268
PS
164
165%if %{with userspace}
13648ed2 166install -d $RPM_BUILD_ROOT{/etc/rc.d/init.d,%{_includedir}/libipset}
bc9c8d01 167
13648ed2
JK
168%{__make} install \
169 DESTDIR=$RPM_BUILD_ROOT
170cp include/libipset/*.h $RPM_BUILD_ROOT%{_includedir}/libipset
e791bf9d 171
fffbab59 172install -p %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{pname}
3bc59268
PS
173%endif
174
175%if %{with kernel}
13648ed2
JK
176cd kernel/net/netfilter
177%install_kernel_modules -m ipset/ip_set -d kernel/net/ipv4/netfilter/ipset
178install -p ipset/ip_set_*.ko $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}/kernel/net/ipv4/netfilter/ipset
179install -p xt_*.ko $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}/kernel/net/ipv4/netfilter
3bc59268
PS
180cd -
181%endif
12667538 182
bc9c8d01
JK
183%clean
184rm -rf $RPM_BUILD_ROOT
185
12667538 186%post init
5b36c760 187/sbin/chkconfig --add %{pname}
12667538
PS
188
189%preun init
190if [ "$1" = "0" ]; then
5b36c760 191 /sbin/chkconfig --del %{pname}
12667538
PS
192fi
193
3bc59268
PS
194%post -n kernel%{_alt_kernel}-net-ipset
195%depmod %{_kernel_ver}
196
197%postun -n kernel%{_alt_kernel}-net-ipset
198%depmod %{_kernel_ver}
199
200%if %{with userspace}
bc9c8d01
JK
201%files
202%defattr(644,root,root,755)
13648ed2 203%doc ChangeLog ChangeLog.ippool README UPGRADE
de6c94a7 204%attr(755,root,root) %{_sbindir}/ipset
6312651c 205%attr(755,root,root) %{_libdir}/libipset.so.*.*.*
13648ed2 206%attr(755,root,root) %ghost %{_libdir}/libipset.so.1
de6c94a7 207%{_mandir}/man8/ipset.8*
40d655f1 208
209%files devel
210%defattr(644,root,root,755)
13648ed2 211%attr(755,root,root) %{_libdir}/libipset.so
6312651c
JB
212%{_libdir}/libipset.la
213%{_includedir}/libipset
13648ed2
JK
214
215%files static
216%defattr(644,root,root,755)
217%{_libdir}/libipset.a
12667538
PS
218
219%files init
220%defattr(644,root,root,755)
a264566a 221%attr(754,root,root) /etc/rc.d/init.d/ipset
3bc59268
PS
222%endif
223
224%if %{with kernel}
225%files -n kernel%{_alt_kernel}-net-ipset
226%defattr(644,root,root,755)
13648ed2 227/lib/modules/%{_kernel_ver}/kernel/net/ipv4/netfilter/xt_*.ko*
f6c45fde 228%dir /lib/modules/%{_kernel_ver}/kernel/net/ipv4/netfilter/ipset
13648ed2
JK
229/lib/modules/%{_kernel_ver}/kernel/net/ipv4/netfilter/ipset/ip_set.ko*
230/lib/modules/%{_kernel_ver}/kernel/net/ipv4/netfilter/ipset/ip_set_*.ko*
3bc59268 231%endif
This page took 0.693573 seconds and 4 git commands to generate.