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