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