]> 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
ca3c10e0 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}
be683230 28Version: 6.11
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
be683230 34# Source0-md5: bfcc92e30a0fcf10ae6e7c4affa03c84
5b36c760 35Source1: %{pname}.init
71ed84f0
JR
36Patch0: %{pname}-no_kernel.patch
37Patch1: %{pname}-hash-net-if-fix.patch
b04ef6fb 38Patch2: %{pname}-kernel-3.3.patch
0bf5b4fb 39Patch3: %{pname}-kernel-3.0.patch
bc9c8d01 40URL: http://ipset.netfilter.org/
6312651c 41BuildRequires: autoconf >= 2.50
7e0de454 42BuildRequires: automake
6312651c 43%{?with_dist_kernel:BuildRequires: kernel%{_alt_kernel}-module-build >= 3:2.6.38.6}
8aa8458e 44BuildRequires: libmnl-devel >= 1
7e0de454 45BuildRequires: libtool
6312651c 46%{?with_userspace:BuildRequires: linux-libc-headers >= 7:2.6.38.6}
2bf78421 47BuildRequires: pkgconfig
13648ed2 48BuildRequires: rpmbuild(macros) >= 1.583
2a7f4757 49Suggests: kernel-net-ipset
bc9c8d01
JK
50BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
51
13648ed2
JK
52# unresolved ipset_errcode, defined in the ipset binary
53%define skip_post_check_so libipset\.so.*
54
bc9c8d01
JK
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
00760b7e
JR
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
13648ed2
JK
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.
9e9bc01b 69
40d655f1 70%package devel
e791bf9d 71Summary: Header files for ipset interface
cb832b79 72Summary(pl.UTF-8): Pliki nagłówkowe do interfejsu ipset
f62f2152 73Group: Development/Libraries
6312651c 74Requires: %{name} = %{version}-%{release}
8aa8458e 75Requires: libmnl-devel >= 1
40d655f1 76
77%description devel
3bc59268 78Header files for IPset interface.
40d655f1 79
00760b7e 80%description devel -l pl.UTF-8
3bc59268 81Pliki nagłówkowe do interfejsu IPset.
40d655f1 82
13648ed2
JK
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
12667538 95%package init
a264566a
JB
96Summary: IPset init script
97Summary(pl.UTF-8): Skrypt startowy IPset
12667538 98Group: Networking/Admin
12667538 99Requires(post,preun): /sbin/chkconfig
a264566a 100Requires: %{pname} = %{version}-%{release}
af1d549a 101Requires: rc-scripts
12667538
PS
102
103%description init
3bc59268
PS
104IPset initialization script.
105
a264566a
JB
106%description init -l pl.UTF-8
107Skrypt startowy IPset.
108
3bc59268
PS
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}
3bc59268
PS
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
13648ed2
JK
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.
3bc59268
PS
133
134Ten pakiet zawiera moduły jądra oferujące wsparcie dla zbiorów IP.
12667538 135
bc9c8d01 136%prep
5b36c760 137%setup -q -n %{pname}-%{version}
71ed84f0 138%{!?with_kernel:%patch0 -p1}
13648ed2 139%patch1 -p1
b04ef6fb 140%patch2 -p1
0bf5b4fb 141%patch3 -p1
fffbab59 142
bc9c8d01 143%build
7e0de454 144%{__libtoolize}
13648ed2 145%{__aclocal} -I m4
7e0de454
JK
146%{__autoconf}
147%{__autoheader}
148%{__automake}
149%configure \
150 --with-kbuild=%{_kernelsrcdir}
151
3bc59268 152%if %{with userspace}
13648ed2 153%{__make}
3bc59268
PS
154%endif
155
156%if %{with kernel}
13648ed2
JK
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/../..
3bc59268 159%endif
bc9c8d01
JK
160
161%install
162rm -rf $RPM_BUILD_ROOT
3bc59268
PS
163
164%if %{with userspace}
13648ed2 165install -d $RPM_BUILD_ROOT{/etc/rc.d/init.d,%{_includedir}/libipset}
bc9c8d01 166
13648ed2
JK
167%{__make} install \
168 DESTDIR=$RPM_BUILD_ROOT
169cp include/libipset/*.h $RPM_BUILD_ROOT%{_includedir}/libipset
e791bf9d 170
fffbab59 171install -p %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{pname}
3bc59268
PS
172%endif
173
174%if %{with kernel}
13648ed2
JK
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
3bc59268
PS
179cd -
180%endif
12667538 181
bc9c8d01
JK
182%clean
183rm -rf $RPM_BUILD_ROOT
184
12667538 185%post init
5b36c760 186/sbin/chkconfig --add %{pname}
12667538
PS
187
188%preun init
189if [ "$1" = "0" ]; then
5b36c760 190 /sbin/chkconfig --del %{pname}
12667538
PS
191fi
192
3bc59268
PS
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}
bc9c8d01
JK
200%files
201%defattr(644,root,root,755)
13648ed2 202%doc ChangeLog ChangeLog.ippool README UPGRADE
de6c94a7 203%attr(755,root,root) %{_sbindir}/ipset
6312651c 204%attr(755,root,root) %{_libdir}/libipset.so.*.*.*
b04ef6fb 205%attr(755,root,root) %ghost %{_libdir}/libipset.so.2
de6c94a7 206%{_mandir}/man8/ipset.8*
40d655f1 207
208%files devel
209%defattr(644,root,root,755)
13648ed2 210%attr(755,root,root) %{_libdir}/libipset.so
6312651c
JB
211%{_libdir}/libipset.la
212%{_includedir}/libipset
13648ed2
JK
213
214%files static
215%defattr(644,root,root,755)
216%{_libdir}/libipset.a
12667538
PS
217
218%files init
219%defattr(644,root,root,755)
a264566a 220%attr(754,root,root) /etc/rc.d/init.d/ipset
3bc59268
PS
221%endif
222
223%if %{with kernel}
224%files -n kernel%{_alt_kernel}-net-ipset
225%defattr(644,root,root,755)
13648ed2 226/lib/modules/%{_kernel_ver}/kernel/net/ipv4/netfilter/xt_*.ko*
f6c45fde 227%dir /lib/modules/%{_kernel_ver}/kernel/net/ipv4/netfilter/ipset
13648ed2
JK
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*
3bc59268 230%endif
This page took 0.064158 seconds and 4 git commands to generate.