]>
Commit | Line | Data |
---|---|---|
bc9c8d01 JK |
1 | # |
2 | # TODO: | |
bc9c8d01 JK |
3 | # - Requires and BuildRequires with proper versions |
4 | # | |
af1d549a PS |
5 | %define version_base 2.3.0 |
6 | %define version_tstamp 20070828 | |
bc9c8d01 | 7 | Summary: IP sets utility |
cb832b79 | 8 | Summary(pl.UTF-8): Narzędzie do zarządzania zbiorami IP |
bc9c8d01 | 9 | Name: ipset |
bc9c8d01 | 10 | Version: %{version_base}_%{version_tstamp} |
eeafeb5f | 11 | Release: 1 |
bc9c8d01 JK |
12 | License: GPL |
13 | Group: Networking/Admin | |
14 | Source0: http://ipset.netfilter.org/%{name}-%{version_base}-%{version_tstamp}.tar.bz2 | |
70a6eeb2 | 15 | # Source0-md5: 9e17798dfd8ed87c63a1f3498f9fe64d |
12667538 | 16 | Source1: %{name}.init |
c6a85438 | 17 | Patch0: %{name}-no_kernel_headers.patch |
bc9c8d01 | 18 | URL: http://ipset.netfilter.org/ |
70a6eeb2 | 19 | BuildRequires: linux-libc-headers >= 7:2.6.22.1-2 |
bc9c8d01 JK |
20 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
21 | ||
bc9c8d01 JK |
22 | %description |
23 | IP sets are a framework inside the Linux 2.4.x and 2.6.x kernel, which | |
24 | can be administered by the ipset utility. Depending on the type, | |
25 | currently an IP set may store IP addresses, (TCP/UDP) port numbers or | |
26 | IP addresses with MAC addresses in a way, which ensures lightning | |
27 | speed when matching an entry against a set. | |
28 | ||
00760b7e JR |
29 | %description -l pl.UTF-8 |
30 | Zbiory IP to szkielet w jądrze Linuksa 2.4.x i 2.6.x, którym można | |
31 | administrować przy użyciu narzędzia ipset. W zależności od rodzaju | |
32 | aktualnie zbiór IP może przechowywać adresy IP, numery portów | |
33 | (TCP/UDP) lub adresy IP z adresami MAC - w sposób zapewniający | |
34 | maksymalną szybkość przy dopasowywaniu elementu do zbioru. | |
9e9bc01b | 35 | |
40d655f1 | 36 | %package devel |
e791bf9d | 37 | Summary: Header files for ipset interface |
cb832b79 | 38 | Summary(pl.UTF-8): Pliki nagłówkowe do interfejsu ipset |
f62f2152 | 39 | Group: Development/Libraries |
40d655f1 | 40 | |
41 | %description devel | |
e791bf9d | 42 | Header files for ipset interface. |
40d655f1 | 43 | |
00760b7e JR |
44 | %description devel -l pl.UTF-8 |
45 | Pliki nagłówkowe do interfejsu ipset. | |
40d655f1 | 46 | |
12667538 PS |
47 | %package init |
48 | Summary: Ipset init (RedHat style) | |
49 | Group: Networking/Admin | |
12667538 PS |
50 | Requires(post,preun): /sbin/chkconfig |
51 | Requires: %{name} | |
af1d549a | 52 | Requires: rc-scripts |
12667538 PS |
53 | |
54 | %description init | |
55 | Ipset initialization script. | |
56 | ||
bc9c8d01 JK |
57 | %prep |
58 | %setup -qn %{name}-%{version_base} | |
c6a85438 | 59 | %patch0 -p1 |
bc9c8d01 JK |
60 | |
61 | %build | |
62 | %{__make} \ | |
63 | PREFIX="%{_prefix}" \ | |
64 | LIBDIR="%{_libdir}" \ | |
65 | MANDIR="%{_mandir}" \ | |
66 | BINDIR="%{_sbindir}" \ | |
bc9c8d01 JK |
67 | COPT_FLAGS:="%{rpmcflags}" |
68 | ||
69 | %install | |
70 | rm -rf $RPM_BUILD_ROOT | |
12667538 | 71 | install -d $RPM_BUILD_ROOT{/etc/rc.d/init.d,%{_includedir}} |
bc9c8d01 JK |
72 | |
73 | %{__make} install \ | |
74 | DESTDIR="$RPM_BUILD_ROOT" \ | |
75 | PREFIX="%{_prefix}" \ | |
76 | LIBDIR="%{_libdir}" \ | |
77 | MANDIR="%{_mandir}" \ | |
eeafeb5f | 78 | BINDIR="%{_sbindir}" |
e791bf9d JB |
79 | |
80 | install *.h $RPM_BUILD_ROOT%{_includedir} | |
bc9c8d01 | 81 | |
12667538 PS |
82 | install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name} |
83 | ||
bc9c8d01 JK |
84 | %clean |
85 | rm -rf $RPM_BUILD_ROOT | |
86 | ||
12667538 PS |
87 | %post init |
88 | /sbin/chkconfig --add %{name} | |
89 | ||
90 | %preun init | |
91 | if [ "$1" = "0" ]; then | |
92 | /sbin/chkconfig --del %{name} | |
93 | fi | |
94 | ||
bc9c8d01 JK |
95 | %files |
96 | %defattr(644,root,root,755) | |
97 | %doc ChangeLog ChangeLog.ippool TODO | |
98 | %attr(755,root,root) %{_sbindir}/* | |
99 | %dir %{_libdir}/ipset | |
100 | %attr(755,root,root) %{_libdir}/ipset/*.so | |
101 | %{_mandir}/man8/* | |
40d655f1 | 102 | |
103 | %files devel | |
104 | %defattr(644,root,root,755) | |
105 | %{_includedir}/*.h | |
12667538 PS |
106 | |
107 | %files init | |
108 | %defattr(644,root,root,755) | |
109 | %attr(754,root,root) /etc/rc.d/init.d/* |