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