]> git.pld-linux.org Git - packages/ipset.git/blame_incremental - ipset.spec
- fix build with linux 3.3
[packages/ipset.git] / ipset.spec
... / ...
CommitLineData
1#
2# TODO:
3# - patch our kernel to provide the needed API and update
4# the dependencies here
5#
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
12%if %{without kernel}
13%undefine with_dist_kernel
14%endif
15%if "%{_alt_kernel}" != "%{nil}"
16%undefine with_userspace
17%endif
18%if %{without userspace}
19# nothing to be placed to debuginfo package
20%define _enable_debug_packages 0
21%endif
22
23%define rel 0.1
24%define pname ipset
25Summary: IP sets utility
26Summary(pl.UTF-8): Narzędzie do zarządzania zbiorami IP
27Name: %{pname}%{_alt_kernel}
28Version: 6.11
29Release: %{rel}
30License: GPL v2
31Group: Networking/Admin
32#Source0Download: http://ipset.netfilter.org/install.html
33Source0: http://ipset.netfilter.org/%{pname}-%{version}.tar.bz2
34# Source0-md5: bfcc92e30a0fcf10ae6e7c4affa03c84
35Source1: %{pname}.init
36Patch0: %{pname}-no_kernel.patch
37Patch1: %{pname}-hash-net-if-fix.patch
38Patch2: %{pname}-kernel-3.3.patch
39URL: http://ipset.netfilter.org/
40BuildRequires: autoconf >= 2.50
41BuildRequires: automake
42%{?with_dist_kernel:BuildRequires: kernel%{_alt_kernel}-module-build >= 3:2.6.38.6}
43BuildRequires: libmnl-devel
44BuildRequires: libtool
45%{?with_userspace:BuildRequires: linux-libc-headers >= 7:2.6.38.6}
46BuildRequires: pkgconfig
47BuildRequires: rpmbuild(macros) >= 1.583
48Suggests: kernel-net-ipset
49BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
50
51# unresolved ipset_errcode, defined in the ipset binary
52%define skip_post_check_so libipset\.so.*
53
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
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
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.
68
69%package devel
70Summary: Header files for ipset interface
71Summary(pl.UTF-8): Pliki nagłówkowe do interfejsu ipset
72Group: Development/Libraries
73Requires: %{name} = %{version}-%{release}
74Requires: libmnl-devel
75
76%description devel
77Header files for IPset interface.
78
79%description devel -l pl.UTF-8
80Pliki nagłówkowe do interfejsu IPset.
81
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
94%package init
95Summary: IPset init script
96Summary(pl.UTF-8): Skrypt startowy IPset
97Group: Networking/Admin
98Requires(post,preun): /sbin/chkconfig
99Requires: %{pname} = %{version}-%{release}
100Requires: rc-scripts
101
102%description init
103IPset initialization script.
104
105%description init -l pl.UTF-8
106Skrypt startowy IPset.
107
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}
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
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.
132
133Ten pakiet zawiera moduły jądra oferujące wsparcie dla zbiorów IP.
134
135%prep
136%setup -q -n %{pname}-%{version}
137%{!?with_kernel:%patch0 -p1}
138%patch1 -p1
139%patch2 -p1
140
141%build
142%{__libtoolize}
143%{__aclocal} -I m4
144%{__autoconf}
145%{__autoheader}
146%{__automake}
147%configure \
148 --with-kbuild=%{_kernelsrcdir}
149
150%if %{with userspace}
151%{__make}
152%endif
153
154%if %{with kernel}
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/../..
157%endif
158
159%install
160rm -rf $RPM_BUILD_ROOT
161
162%if %{with userspace}
163install -d $RPM_BUILD_ROOT{/etc/rc.d/init.d,%{_includedir}/libipset}
164
165%{__make} install \
166 DESTDIR=$RPM_BUILD_ROOT
167cp include/libipset/*.h $RPM_BUILD_ROOT%{_includedir}/libipset
168
169install -p %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{pname}
170%endif
171
172%if %{with kernel}
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
177cd -
178%endif
179
180%clean
181rm -rf $RPM_BUILD_ROOT
182
183%post init
184/sbin/chkconfig --add %{pname}
185
186%preun init
187if [ "$1" = "0" ]; then
188 /sbin/chkconfig --del %{pname}
189fi
190
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}
198%files
199%defattr(644,root,root,755)
200%doc ChangeLog ChangeLog.ippool README UPGRADE
201%attr(755,root,root) %{_sbindir}/ipset
202%attr(755,root,root) %{_libdir}/libipset.so.*.*.*
203%attr(755,root,root) %ghost %{_libdir}/libipset.so.2
204%{_mandir}/man8/ipset.8*
205
206%files devel
207%defattr(644,root,root,755)
208%attr(755,root,root) %{_libdir}/libipset.so
209%{_libdir}/libipset.la
210%{_includedir}/libipset
211
212%files static
213%defattr(644,root,root,755)
214%{_libdir}/libipset.a
215
216%files init
217%defattr(644,root,root,755)
218%attr(754,root,root) /etc/rc.d/init.d/ipset
219%endif
220
221%if %{with kernel}
222%files -n kernel%{_alt_kernel}-net-ipset
223%defattr(644,root,root,755)
224/lib/modules/%{_kernel_ver}/kernel/net/ipv4/netfilter/xt_*.ko*
225%dir /lib/modules/%{_kernel_ver}/kernel/net/ipv4/netfilter/ipset
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*
228%endif
This page took 0.046092 seconds and 4 git commands to generate.