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