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