]> git.pld-linux.org Git - packages/ipset.git/blame - ipset.spec
- release 23
[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
f55bf1b8 19%define rel 23
5b36c760 20%define pname ipset
bc9c8d01 21Summary: IP sets utility
cb832b79 22Summary(pl.UTF-8): Narzędzie do zarządzania zbiorami IP
4d9c906c 23Name: %{pname}%{_alt_kernel}
24183616 24Version: 4.4
3bc59268 25Release: %{rel}
bc9c8d01
JK
26License: GPL
27Group: Networking/Admin
5b36c760 28Source0: http://ipset.netfilter.org/%{pname}-%{version}.tar.bz2
24183616 29# Source0-md5: e21e9d9dfb8a01fc0122323ff1d6cbdb
5b36c760 30Source1: %{pname}.init
dd8c53e6 31Patch0: shadow-args.patch
bc9c8d01 32URL: http://ipset.netfilter.org/
3bc59268
PS
33%{?with_dist_kernel:BuildRequires: kernel%{_alt_kernel}-module-build >= 3:2.6.20.2}
34%{?with_userspace:BuildRequires: linux-libc-headers >= 7:2.6.22.1-2}
3bc59268 35BuildRequires: rpmbuild(macros) >= 1.379
2a7f4757 36Suggests: kernel-net-ipset
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}
3bc59268
PS
82Group: Base/Kernel
83%{?with_dist_kernel:%requires_releq_kernel}
84Requires(post,postun): /sbin/depmod
85
86%description -n kernel%{_alt_kernel}-net-ipset
87IP sets are a framework inside the Linux 2.4.x and 2.6.x kernel, which
88can be administered by the ipset utility. Depending on the type,
89currently an IP set may store IP addresses, (TCP/UDP) port numbers or
90IP addresses with MAC addresses in a way, which ensures lightning
91speed when matching an entry against a set.
92
93This package contains kernel modules.
94
95%description -n kernel%{_alt_kernel}-net-ipset -l pl.UTF-8
96Zbiory IP to szkielet w jądrze Linuksa 2.4.x i 2.6.x, którym można
97administrować przy użyciu narzędzia ipset. W zależności od rodzaju
98aktualnie zbiór IP może przechowywać adresy IP, numery portów
99(TCP/UDP) lub adresy IP z adresami MAC - w sposób zapewniający
100maksymalną szybkość przy dopasowywaniu elementu do zbioru.
101
102Ten pakiet zawiera moduły jądra oferujące wsparcie dla zbiorów IP.
12667538 103
bc9c8d01 104%prep
5b36c760 105%setup -q -n %{pname}-%{version}
fffbab59 106%patch0 -p1
3bc59268
PS
107mv kernel/{Kbuild,Makefile}
108
c18bf40e 109# these options can be overriden by module parameters.
3bc59268
PS
110# maximum number of ipsets.
111%{__sed} -i 's:$(IP_NF_SET_MAX):256:' kernel/Makefile
112# hash size for bindings of IP sets.
113%{__sed} -i 's:$(IP_NF_SET_HASHSIZE):1024:' kernel/Makefile
bc9c8d01 114
fffbab59
ER
115%if "%{cc_version}" < "3.4"
116%{__sed} -i -e 's/-Wextra//' Makefile
117%{__sed} -i -e 's/-Winit-self//' Makefile
118%{__sed} -i -e 's/-Wold-style-definition//' Makefile
119%{__sed} -i -e 's/-Wno-missing-field-initializers//' Makefile
120%endif
121
bc9c8d01 122%build
3bc59268 123%if %{with userspace}
bfe86908 124%{__make} binaries \
125 CC="%{__cc}" \
bc9c8d01
JK
126 PREFIX="%{_prefix}" \
127 LIBDIR="%{_libdir}" \
128 MANDIR="%{_mandir}" \
129 BINDIR="%{_sbindir}" \
bc9c8d01 130 COPT_FLAGS:="%{rpmcflags}"
3bc59268
PS
131%endif
132
133%if %{with kernel}
c18bf40e 134# ugly hack for satisfy rpm build macro. in fact all modules will be built.
3bc59268
PS
135%build_kernel_modules -C kernel -m ip_set
136%endif
bc9c8d01
JK
137
138%install
139rm -rf $RPM_BUILD_ROOT
3bc59268
PS
140
141%if %{with userspace}
12667538 142install -d $RPM_BUILD_ROOT{/etc/rc.d/init.d,%{_includedir}}
bc9c8d01 143
bfe86908 144%{__make} binaries_install \
bc9c8d01
JK
145 DESTDIR="$RPM_BUILD_ROOT" \
146 PREFIX="%{_prefix}" \
147 LIBDIR="%{_libdir}" \
148 MANDIR="%{_mandir}" \
eeafeb5f 149 BINDIR="%{_sbindir}"
e791bf9d 150
fffbab59
ER
151cp -a *.h $RPM_BUILD_ROOT%{_includedir}
152install -p %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{pname}
3bc59268
PS
153%endif
154
155%if %{with kernel}
156cd kernel
157%install_kernel_modules -m ip_set -d kernel/net/ipv4/netfilter
fffbab59
ER
158install -p ip_set_*.ko $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}/kernel/net/ipv4/netfilter
159install -p ipt_*.ko $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}/kernel/net/ipv4/netfilter
3bc59268
PS
160cd -
161%endif
12667538 162
bc9c8d01
JK
163%clean
164rm -rf $RPM_BUILD_ROOT
165
12667538 166%post init
5b36c760 167/sbin/chkconfig --add %{pname}
12667538
PS
168
169%preun init
170if [ "$1" = "0" ]; then
5b36c760 171 /sbin/chkconfig --del %{pname}
12667538
PS
172fi
173
3bc59268
PS
174%post -n kernel%{_alt_kernel}-net-ipset
175%depmod %{_kernel_ver}
176
177%postun -n kernel%{_alt_kernel}-net-ipset
178%depmod %{_kernel_ver}
179
180%if %{with userspace}
bc9c8d01
JK
181%files
182%defattr(644,root,root,755)
183%doc ChangeLog ChangeLog.ippool TODO
de6c94a7 184%attr(755,root,root) %{_sbindir}/ipset
bc9c8d01 185%dir %{_libdir}/ipset
de6c94a7
ER
186%attr(755,root,root) %{_libdir}/ipset/libipset_*.so
187%{_mandir}/man8/ipset.8*
40d655f1 188
189%files devel
190%defattr(644,root,root,755)
de6c94a7
ER
191%{_includedir}/ipset.h
192%{_includedir}/libipt_set.h
12667538
PS
193
194%files init
195%defattr(644,root,root,755)
a264566a 196%attr(754,root,root) /etc/rc.d/init.d/ipset
3bc59268
PS
197%endif
198
199%if %{with kernel}
200%files -n kernel%{_alt_kernel}-net-ipset
201%defattr(644,root,root,755)
de6c94a7
ER
202/lib/modules/%{_kernel_ver}/kernel/net/ipv4/netfilter/ip_set*.ko*
203/lib/modules/%{_kernel_ver}/kernel/net/ipv4/netfilter/ipt_set*.ko*
204/lib/modules/%{_kernel_ver}/kernel/net/ipv4/netfilter/ipt_SET*.ko*
3bc59268 205%endif
This page took 0.492684 seconds and 4 git commands to generate.