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