Author: pluto                        Date: Mon Oct 27 10:00:22 2008 GMT
Module: SPECS                         Tag: HEAD
---- Log message:
- updated to 2.4.3, add kernel modules w/ 2.6.27 support.

---- Files affected:
SPECS:
   ipset.spec (1.15 -> 1.16) 

---- Diffs:

================================================================
Index: SPECS/ipset.spec
diff -u SPECS/ipset.spec:1.15 SPECS/ipset.spec:1.16
--- SPECS/ipset.spec:1.15       Wed Aug 13 17:40:59 2008
+++ SPECS/ipset.spec    Mon Oct 27 11:00:16 2008
@@ -1,20 +1,36 @@
 # $Revision$, $Date$
 #
-# TODO:
-#      - Requires and BuildRequires with proper versions
-#
+# Conditional build:
+%bcond_without dist_kernel     # allow non-distribution kernel
+%bcond_without kernel          # don't build kernel modules
+%bcond_without userspace       # don't build userspace tools
+%bcond_with    verbose         # verbose build (V=1)
+
+%if !%{with kernel}
+%undefine      with_dist_kernel
+%endif
+
+%if "%{_alt_kernel}" != "%{nil}"
+%undefine      with_userspace
+%endif
+
 Summary:       IP sets utility
 Summary(pl.UTF-8):     Narzędzie do zarządzania zbiorami IP
 Name:          ipset
-Version:       2.3.3a
-Release:       1
+Version:       2.4.3
+%define                rel     1
+Release:       %{rel}
 License:       GPL
 Group:         Networking/Admin
 Source0:       http://ipset.netfilter.org/%{name}-%{version}.tar.bz2
-# Source0-md5: c7d2f165242edaef5581db0f7d5af520
+# Source0-md5: 3c97324d04562a8bc25b0177100673ee
 Source1:       %{name}.init
 URL:           http://ipset.netfilter.org/
-BuildRequires: linux-libc-headers >= 7:2.6.22.1-2
+%{?with_dist_kernel:BuildRequires:     kernel%{_alt_kernel}-module-build >= 
3:2.6.20.2}
+%{?with_userspace:BuildRequires:       linux-libc-headers >= 7:2.6.22.1-2}
+BuildRequires: perl-base
+BuildRequires: rpmbuild(macros) >= 1.379
+Requires(post,postun): /sbin/depmod
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
@@ -37,25 +53,60 @@
 Group:         Development/Libraries
 
 %description devel
-Header files for ipset interface.
+Header files for IPset interface.
 
 %description devel -l pl.UTF-8
-Pliki nagłówkowe do interfejsu ipset.
+Pliki nagłówkowe do interfejsu IPset.
 
 %package init
-Summary:       Ipset init (RedHat style)
+Summary:       IPset init (RedHat style)
 Group:         Networking/Admin
 Requires(post,preun):  /sbin/chkconfig
 Requires:      %{name}
 Requires:      rc-scripts
 
 %description init
-Ipset initialization script.
+IPset initialization script.
+
+%package -n kernel%{_alt_kernel}-net-ipset
+Summary:       IPset kernel modules
+Summary(pl.UTF-8):     Moduły jądra oferujące wsparcie dla zbiorów IP
+Release:       [EMAIL PROTECTED]
+License:       GPL
+Group:         Base/Kernel
+%{?with_dist_kernel:%requires_releq_kernel}
+Requires(post,postun): /sbin/depmod
+
+%description -n kernel%{_alt_kernel}-net-ipset
+IP sets are a framework inside the Linux 2.4.x and 2.6.x kernel, which
+can be administered by the ipset utility. Depending on the type,
+currently an IP set may store IP addresses, (TCP/UDP) port numbers or
+IP addresses with MAC addresses in a way, which ensures lightning
+speed when matching an entry against a set.
+
+This package contains kernel modules.
+
+%description -n kernel%{_alt_kernel}-net-ipset -l pl.UTF-8
+Zbiory IP to szkielet w jądrze Linuksa 2.4.x i 2.6.x, którym można
+administrować przy użyciu narzędzia ipset. W zależności od rodzaju
+aktualnie zbiór IP może przechowywać adresy IP, numery portów
+(TCP/UDP) lub adresy IP z adresami MAC - w sposób zapewniający
+maksymalną szybkość przy dopasowywaniu elementu do zbioru.
+
+Ten pakiet zawiera moduły jądra oferujące wsparcie dla zbiorów IP.
 
 %prep
 %setup -q
+mv kernel/{Kbuild,Makefile}
+
+# maximum number of ipsets.
+%{__sed} -i 's:$(IP_NF_SET_MAX):256:' kernel/Makefile
+# hash size for bindings of IP sets.
+%{__sed} -i 's:$(IP_NF_SET_HASHSIZE):1024:' kernel/Makefile
+# these options can be overriden by module parameters.
 
 %build
+%if %{with userspace}
 %{__make} binaries \
        CC="%{__cc}" \
        PREFIX="%{_prefix}" \
@@ -63,9 +114,17 @@
        MANDIR="%{_mandir}" \
        BINDIR="%{_sbindir}" \
        COPT_FLAGS:="%{rpmcflags}"
+%endif
+
+%if %{with kernel}
+# ugly hack for satisfy rpm build macro. in fact all modules will be build.
+%build_kernel_modules -C kernel -m ip_set
+%endif
 
 %install
 rm -rf $RPM_BUILD_ROOT
+
+%if %{with userspace}
 install -d $RPM_BUILD_ROOT{/etc/rc.d/init.d,%{_includedir}}
 
 %{__make} binaries_install \
@@ -76,8 +135,16 @@
        BINDIR="%{_sbindir}"
 
 install *.h $RPM_BUILD_ROOT%{_includedir}
-
 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
+%endif
+
+%if %{with kernel}
+cd kernel
+%install_kernel_modules -m ip_set -d kernel/net/ipv4/netfilter
+install ip_set_*.ko 
$RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}/kernel/net/ipv4/netfilter
+install ipt_*.ko 
$RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}/kernel/net/ipv4/netfilter
+cd -
+%endif
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -90,6 +157,13 @@
        /sbin/chkconfig --del %{name}
 fi
 
+%post  -n kernel%{_alt_kernel}-net-ipset
+%depmod %{_kernel_ver}
+
+%postun        -n kernel%{_alt_kernel}-net-ipset
+%depmod %{_kernel_ver}
+
+%if %{with userspace}
 %files
 %defattr(644,root,root,755)
 %doc ChangeLog ChangeLog.ippool TODO
@@ -105,6 +179,13 @@
 %files init
 %defattr(644,root,root,755)
 %attr(754,root,root) /etc/rc.d/init.d/*
+%endif
+
+%if %{with kernel}
+%files -n kernel%{_alt_kernel}-net-ipset
+%defattr(644,root,root,755)
+/lib/modules/%{_kernel_ver}/kernel/net/ipv4/netfilter/*.ko*
+%endif
 
 %define date   %(echo `LC_ALL="C" date +"%a %b %d %Y"`)
 %changelog
@@ -112,6 +193,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.16  2008/10/27 10:00:16  pluto
+- updated to 2.4.3, add kernel modules w/ 2.6.27 support.
+
 Revision 1.15  2008/08/13 15:40:59  kosmo
 - updated to 2.3.3a
 
================================================================

---- CVS-web:
    
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SPECS/ipset.spec?r1=1.15&r2=1.16&f=u

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to