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