]> git.pld-linux.org Git - packages/ipset.git/blame - ipset.spec
- release 5
[packages/ipset.git] / ipset.spec
CommitLineData
bc9c8d01 1#
3bc59268
PS
2# Conditional build:
3%bcond_without dist_kernel # allow non-distribution kernel
4%bcond_without kernel # don't build kernel modules
5%bcond_without userspace # don't build userspace tools
6%bcond_with verbose # verbose build (V=1)
7
d33761e1 8%if %{without kernel}
3bc59268
PS
9%undefine with_dist_kernel
10%endif
3bc59268
PS
11%if "%{_alt_kernel}" != "%{nil}"
12%undefine with_userspace
13%endif
d33761e1
ER
14%if %{without userspace}
15# nothing to be placed to debuginfo package
16%define _enable_debug_packages 0
17%endif
3bc59268 18
aff3c92c 19%define rel 5
5b36c760 20%define pname ipset
bc9c8d01 21Summary: IP sets utility
cb832b79 22Summary(pl.UTF-8): Narzędzie do zarządzania zbiorami IP
bc9c8d01 23Name: ipset
3ade5d3e 24Version: 2.4.5
3bc59268 25Release: %{rel}
bc9c8d01
JK
26License: GPL
27Group: Networking/Admin
5b36c760 28Source0: http://ipset.netfilter.org/%{pname}-%{version}.tar.bz2
3ade5d3e 29# Source0-md5: 9cd51ed1a901d8616bb0485b3f23fbe3
5b36c760 30Source1: %{pname}.init
bc9c8d01 31URL: http://ipset.netfilter.org/
3bc59268
PS
32%{?with_dist_kernel:BuildRequires: kernel%{_alt_kernel}-module-build >= 3:2.6.20.2}
33%{?with_userspace:BuildRequires: linux-libc-headers >= 7:2.6.22.1-2}
34BuildRequires: perl-base
35BuildRequires: rpmbuild(macros) >= 1.379
36Requires(post,postun): /sbin/depmod
bc9c8d01
JK
37BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
38
bc9c8d01
JK
39%description
40IP sets are a framework inside the Linux 2.4.x and 2.6.x kernel, which
41can be administered by the ipset utility. Depending on the type,
42currently an IP set may store IP addresses, (TCP/UDP) port numbers or
43IP addresses with MAC addresses in a way, which ensures lightning
44speed when matching an entry against a set.
45
00760b7e
JR
46%description -l pl.UTF-8
47Zbiory IP to szkielet w jądrze Linuksa 2.4.x i 2.6.x, którym można
48administrować przy użyciu narzędzia ipset. W zależności od rodzaju
49aktualnie zbiór IP może przechowywać adresy IP, numery portów
50(TCP/UDP) lub adresy IP z adresami MAC - w sposób zapewniający
51maksymalną szybkość przy dopasowywaniu elementu do zbioru.
9e9bc01b 52
40d655f1 53%package devel
e791bf9d 54Summary: Header files for ipset interface
cb832b79 55Summary(pl.UTF-8): Pliki nagłówkowe do interfejsu ipset
f62f2152 56Group: Development/Libraries
40d655f1 57
58%description devel
3bc59268 59Header files for IPset interface.
40d655f1 60
00760b7e 61%description devel -l pl.UTF-8
3bc59268 62Pliki nagłówkowe do interfejsu IPset.
40d655f1 63
12667538 64%package init
a264566a
JB
65Summary: IPset init script
66Summary(pl.UTF-8): Skrypt startowy IPset
12667538 67Group: Networking/Admin
12667538 68Requires(post,preun): /sbin/chkconfig
a264566a 69Requires: %{pname} = %{version}-%{release}
af1d549a 70Requires: rc-scripts
12667538
PS
71
72%description init
3bc59268
PS
73IPset initialization script.
74
a264566a
JB
75%description init -l pl.UTF-8
76Skrypt startowy IPset.
77
3bc59268
PS
78%package -n kernel%{_alt_kernel}-net-ipset
79Summary: IPset kernel modules
80Summary(pl.UTF-8): Moduły jądra oferujące wsparcie dla zbiorów IP
81Release: %{rel}@%{_kernel_ver_str}
82License: GPL
83Group: Base/Kernel
84%{?with_dist_kernel:%requires_releq_kernel}
85Requires(post,postun): /sbin/depmod
86
87%description -n kernel%{_alt_kernel}-net-ipset
88IP sets are a framework inside the Linux 2.4.x and 2.6.x kernel, which
89can be administered by the ipset utility. Depending on the type,
90currently an IP set may store IP addresses, (TCP/UDP) port numbers or
91IP addresses with MAC addresses in a way, which ensures lightning
92speed when matching an entry against a set.
93
94This package contains kernel modules.
95
96%description -n kernel%{_alt_kernel}-net-ipset -l pl.UTF-8
97Zbiory IP to szkielet w jądrze Linuksa 2.4.x i 2.6.x, którym można
98administrować przy użyciu narzędzia ipset. W zależności od rodzaju
99aktualnie zbiór IP może przechowywać adresy IP, numery portów
100(TCP/UDP) lub adresy IP z adresami MAC - w sposób zapewniający
101maksymalną szybkość przy dopasowywaniu elementu do zbioru.
102
103Ten pakiet zawiera moduły jądra oferujące wsparcie dla zbiorów IP.
12667538 104
bc9c8d01 105%prep
5b36c760 106%setup -q -n %{pname}-%{version}
3bc59268
PS
107mv kernel/{Kbuild,Makefile}
108
109# maximum number of ipsets.
110%{__sed} -i 's:$(IP_NF_SET_MAX):256:' kernel/Makefile
111# hash size for bindings of IP sets.
112%{__sed} -i 's:$(IP_NF_SET_HASHSIZE):1024:' kernel/Makefile
113# these options can be overriden by module parameters.
bc9c8d01
JK
114
115%build
3bc59268 116%if %{with userspace}
bfe86908 117%{__make} binaries \
118 CC="%{__cc}" \
bc9c8d01
JK
119 PREFIX="%{_prefix}" \
120 LIBDIR="%{_libdir}" \
121 MANDIR="%{_mandir}" \
122 BINDIR="%{_sbindir}" \
bc9c8d01 123 COPT_FLAGS:="%{rpmcflags}"
3bc59268
PS
124%endif
125
126%if %{with kernel}
127# ugly hack for satisfy rpm build macro. in fact all modules will be build.
128%build_kernel_modules -C kernel -m ip_set
129%endif
bc9c8d01
JK
130
131%install
132rm -rf $RPM_BUILD_ROOT
3bc59268
PS
133
134%if %{with userspace}
12667538 135install -d $RPM_BUILD_ROOT{/etc/rc.d/init.d,%{_includedir}}
bc9c8d01 136
bfe86908 137%{__make} binaries_install \
bc9c8d01
JK
138 DESTDIR="$RPM_BUILD_ROOT" \
139 PREFIX="%{_prefix}" \
140 LIBDIR="%{_libdir}" \
141 MANDIR="%{_mandir}" \
eeafeb5f 142 BINDIR="%{_sbindir}"
e791bf9d
JB
143
144install *.h $RPM_BUILD_ROOT%{_includedir}
5b36c760 145install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{pname}
3bc59268
PS
146%endif
147
148%if %{with kernel}
149cd kernel
150%install_kernel_modules -m ip_set -d kernel/net/ipv4/netfilter
151install ip_set_*.ko $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}/kernel/net/ipv4/netfilter
152install ipt_*.ko $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}/kernel/net/ipv4/netfilter
153cd -
154%endif
12667538 155
bc9c8d01
JK
156%clean
157rm -rf $RPM_BUILD_ROOT
158
12667538 159%post init
5b36c760 160/sbin/chkconfig --add %{pname}
12667538
PS
161
162%preun init
163if [ "$1" = "0" ]; then
5b36c760 164 /sbin/chkconfig --del %{pname}
12667538
PS
165fi
166
3bc59268
PS
167%post -n kernel%{_alt_kernel}-net-ipset
168%depmod %{_kernel_ver}
169
170%postun -n kernel%{_alt_kernel}-net-ipset
171%depmod %{_kernel_ver}
172
173%if %{with userspace}
bc9c8d01
JK
174%files
175%defattr(644,root,root,755)
176%doc ChangeLog ChangeLog.ippool TODO
177%attr(755,root,root) %{_sbindir}/*
178%dir %{_libdir}/ipset
179%attr(755,root,root) %{_libdir}/ipset/*.so
180%{_mandir}/man8/*
40d655f1 181
182%files devel
183%defattr(644,root,root,755)
184%{_includedir}/*.h
12667538
PS
185
186%files init
187%defattr(644,root,root,755)
a264566a 188%attr(754,root,root) /etc/rc.d/init.d/ipset
3bc59268
PS
189%endif
190
191%if %{with kernel}
192%files -n kernel%{_alt_kernel}-net-ipset
193%defattr(644,root,root,755)
194/lib/modules/%{_kernel_ver}/kernel/net/ipv4/netfilter/*.ko*
195%endif
This page took 0.095429 seconds and 4 git commands to generate.