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