]> git.pld-linux.org Git - packages/ipset.git/blobdiff - ipset.spec
- release 5
[packages/ipset.git] / ipset.spec
index e1104fc81c6d3e942811f2656d57f01f7378107a..17a8c812b009d051c9b8278f34a9561a23b78102 100644 (file)
@@ -5,31 +5,35 @@
 %bcond_without userspace       # don't build userspace tools
 %bcond_with    verbose         # verbose build (V=1)
 
-%if !%{with kernel}
+%if %{without kernel}
 %undefine      with_dist_kernel
 %endif
-
 %if "%{_alt_kernel}" != "%{nil}"
 %undefine      with_userspace
 %endif
+%if %{without userspace}
+# nothing to be placed to debuginfo package
+%define                _enable_debug_packages  0
+%endif
 
+%define                rel     5
+%define                pname   ipset
 Summary:       IP sets utility
 Summary(pl.UTF-8):     Narzędzie do zarządzania zbiorami IP
-Name:          ipset
-Version:       2.4.3
-%define                rel     1
+Name:          %{pname}%{_alt_kernel}
+Version:       4.4
 Release:       %{rel}
 License:       GPL
 Group:         Networking/Admin
-Source0:       http://ipset.netfilter.org/%{name}-%{version}.tar.bz2
-# Source0-md5: 3c97324d04562a8bc25b0177100673ee
-Source1:       %{name}.init
+Source0:       http://ipset.netfilter.org/%{pname}-%{version}.tar.bz2
+# Source0-md5: e21e9d9dfb8a01fc0122323ff1d6cbdb
+Source1:       %{pname}.init
+Patch0:                shadow-args.patch
 URL:           http://ipset.netfilter.org/
 %{?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
+Suggests:      kernel-net-ipset
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
@@ -58,20 +62,23 @@ Header files for IPset interface.
 Pliki nagłówkowe do interfejsu IPset.
 
 %package init
-Summary:       IPset init (RedHat style)
+Summary:       IPset init script
+Summary(pl.UTF-8):     Skrypt startowy IPset
 Group:         Networking/Admin
 Requires(post,preun):  /sbin/chkconfig
-Requires:      %{name}
+Requires:      %{pname} = %{version}-%{release}
 Requires:      rc-scripts
 
 %description init
 IPset initialization script.
 
+%description init -l pl.UTF-8
+Skrypt startowy IPset.
+
 %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:       %{rel}@%{_kernel_ver_str}
-License:       GPL
 Group:         Base/Kernel
 %{?with_dist_kernel:%requires_releq_kernel}
 Requires(post,postun): /sbin/depmod
@@ -95,14 +102,22 @@ maksymalną szybkość przy dopasowywaniu elementu do zbioru.
 Ten pakiet zawiera moduły jądra oferujące wsparcie dla zbiorów IP.
 
 %prep
-%setup -q
+%setup -q -n %{pname}-%{version}
+%patch0 -p1
 mv kernel/{Kbuild,Makefile}
 
+# these options can be overriden by module parameters.
 # 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.
+
+%if "%{cc_version}" < "3.4"
+%{__sed} -i -e 's/-Wextra//' Makefile
+%{__sed} -i -e 's/-Winit-self//' Makefile
+%{__sed} -i -e 's/-Wold-style-definition//' Makefile
+%{__sed} -i -e 's/-Wno-missing-field-initializers//' Makefile
+%endif
 
 %build
 %if %{with userspace}
@@ -116,7 +131,7 @@ mv kernel/{Kbuild,Makefile}
 %endif
 
 %if %{with kernel}
-# ugly hack for satisfy rpm build macro. in fact all modules will be build.
+# ugly hack for satisfy rpm build macro. in fact all modules will be built.
 %build_kernel_modules -C kernel -m ip_set
 %endif
 
@@ -133,15 +148,15 @@ install -d $RPM_BUILD_ROOT{/etc/rc.d/init.d,%{_includedir}}
        MANDIR="%{_mandir}" \
        BINDIR="%{_sbindir}"
 
-install *.h $RPM_BUILD_ROOT%{_includedir}
-install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
+cp -a *.h $RPM_BUILD_ROOT%{_includedir}
+install -p %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{pname}
 %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
+install -p ip_set_*.ko $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}/kernel/net/ipv4/netfilter
+install -p ipt_*.ko $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}/kernel/net/ipv4/netfilter
 cd -
 %endif
 
@@ -149,11 +164,11 @@ cd -
 rm -rf $RPM_BUILD_ROOT
 
 %post init
-/sbin/chkconfig --add %{name}
+/sbin/chkconfig --add %{pname}
 
 %preun init
 if [ "$1" = "0" ]; then
-       /sbin/chkconfig --del %{name}
+       /sbin/chkconfig --del %{pname}
 fi
 
 %post  -n kernel%{_alt_kernel}-net-ipset
@@ -166,22 +181,25 @@ fi
 %files
 %defattr(644,root,root,755)
 %doc ChangeLog ChangeLog.ippool TODO
-%attr(755,root,root) %{_sbindir}/*
+%attr(755,root,root) %{_sbindir}/ipset
 %dir %{_libdir}/ipset
-%attr(755,root,root) %{_libdir}/ipset/*.so
-%{_mandir}/man8/*
+%attr(755,root,root) %{_libdir}/ipset/libipset_*.so
+%{_mandir}/man8/ipset.8*
 
 %files devel
 %defattr(644,root,root,755)
-%{_includedir}/*.h
+%{_includedir}/ipset.h
+%{_includedir}/libipt_set.h
 
 %files init
 %defattr(644,root,root,755)
-%attr(754,root,root) /etc/rc.d/init.d/*
+%attr(754,root,root) /etc/rc.d/init.d/ipset
 %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*
+/lib/modules/%{_kernel_ver}/kernel/net/ipv4/netfilter/ip_set*.ko*
+/lib/modules/%{_kernel_ver}/kernel/net/ipv4/netfilter/ipt_set*.ko*
+/lib/modules/%{_kernel_ver}/kernel/net/ipv4/netfilter/ipt_SET*.ko*
 %endif
This page took 0.033737 seconds and 4 git commands to generate.