]> git.pld-linux.org Git - packages/xtables-addons.git/blobdiff - xtables-addons.spec
- release 8
[packages/xtables-addons.git] / xtables-addons.spec
index c96b7696edc7b1ef841824b368db86514a6f50a2..428ffc68fd00d2d99626a416502d383595183607 100644 (file)
@@ -1,4 +1,3 @@
-#
 # TODO
 # - descriptions
 #
@@ -27,34 +26,34 @@ Summary(ru.UTF-8):  Утилиты для управления пакетными
 Summary(uk.UTF-8):     Утиліти для керування пакетними фільтрами ядра Linux
 Summary(zh_CN.UTF-8):  Linux内核包过滤管理工具
 Name:          xtables-addons
-Version:       1.18
+Version:       1.31
 Release:       %{rel}
 License:       GPL
 Group:         Networking/Admin
-Source0:       http://dl.sourceforge.net/xtables-addons/%{name}-%{version}.tar.bz2
-# Source0-md5: 5a8d2edbf5a3470bba58d6a60c350805
+Source0:       http://downloads.sourceforge.net/xtables-addons/%{name}-%{version}.tar.xz
+# Source0-md5: 97ac895a67df67c28def98763023d51b
 URL:           http://xtables-addons.sourceforge.net/
-Patch0:                %{name}-libs.patch
-Patch1:                %{name}-geoip-dbpath.patch
-Patch2:                kernelrelease.patch
+Patch0:                kernelrelease.patch
 BuildRequires: autoconf
-BuildRequires: automake
+BuildRequires: automake >= 1.10.2
 BuildRequires: iptables-devel >= 1.4.3
 %{?with_dist_kernel:BuildRequires:     kernel%{_alt_kernel}-module-build >= 3:2.6.25}
 BuildRequires: libtool
-BuildRequires: pkgconfig
+BuildRequires: pkgconfig >= 0.9.0
 BuildRequires: rpmbuild(macros) >= 1.379
+BuildRequires: tar >= 1.22
+BuildRequires: xz
 Requires:      iptables >= 1.4.3
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 # use macro, so adapter won't try to wrap
-%define                kpackage        kernel%{_alt_kernel}-net-xtables-addons = %{rel}@%{_kernel_ver_str}
+%define                kpackage        kernel%{_alt_kernel}-net-xtables-addons = %{version}-%{rel}@%{_kernel_ver_str}
 
 %description
 An extensible NAT system, and an extensible packet filtering system.
 Replacement of ipchains in 2.6 and higher kernels.
 
-You need %{kpackage} installed for the tools to work.
+You should have %{kpackage} installed for the tools to work.
 
 %description -l pl.UTF-8
 Wydajny system translacji adresów (NAT) oraz system filtrowania
@@ -81,7 +80,11 @@ Summary:     Kernel modules for xtables addons
 Summary(pl.UTF-8):     Moudły jądra dla xtables addons
 Release:       %{rel}@%{_kernel_ver_str}
 Group:         Base/Kernel
-Requires:      %{name} = %{version}-%{rel}
+# VERSION only dependency is intentional, for allowing multiple kernel pkgs and
+# single userspace package installs.
+Requires:      %{name} = %{version}
+Suggests:      xtables-geoip
+Conflicts:     xtables-geoip < 20090901-2
 %{?with_dist_kernel:%requires_releq_kernel}
 Requires(post,postun): /sbin/depmod
 
@@ -94,8 +97,6 @@ Moduły jądra dla xtables addons.
 %prep
 %setup -q
 %patch0 -p1
-%patch1 -p1
-%patch2 -p1
 
 %{__sed} -i -e 's#build_ipset=m#build_ipset=n#' mconfig
 
@@ -105,27 +106,26 @@ Moduły jądra dla xtables addons.
 %{__autoconf}
 %{__automake}
 %configure \
-       --with-kbuild=%{_kernelsrcdir} \
-       --with-ksource=%{_kernelsrcdir}
-
-export XA_TOPSRCDIR=$PWD
+       --with-kbuild=no
 
 %if %{with kernel}
-%build_kernel_modules -C extensions -m compat_xtables
+srcdir=${PWD:-$(pwd)}
+%build_kernel_modules V=1 XA_ABSTOPSRCDIR=$srcdir -C extensions -m compat_xtables
 %endif
 
 %if %{with userspace}
-%{__make} -C extensions
+%{__make}
 %endif
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT{/etc/rc.d/init.d,/lib/modules/%{_kernel_ver}/kernel/net/ipv4/netfilter,%{_mandir}/man8}
+install -d $RPM_BUILD_ROOT{/etc/modprobe.d,/lib/modules/%{_kernel_ver}/kernel/net/ipv4/netfilter,%{_mandir}/man8}
 
 %if %{with kernel}
 cd extensions
+install iptable_rawpost.ko $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}/kernel/net/ipv4/netfilter
 %install_kernel_modules -m compat_xtables -d kernel/net/netfilter
-install -p xt_*ko $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}/kernel/net/netfilter
+install -p {ACCOUNT/,pknock/,}xt_*.ko $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}/kernel/net/netfilter
 cd ..
 %endif
 
@@ -133,16 +133,28 @@ cd ..
 %{__make} -C extensions install \
        DESTDIR=$RPM_BUILD_ROOT
 
-cd extensions
-for m in $(cat .manpages.lst); do
-       cp -a libxt_$m.man $RPM_BUILD_ROOT%{_mandir}/man8/libxt_$m.8
-done
-cd ..
+rm -f $RPM_BUILD_ROOT%{_libdir}/libxt_ACCOUNT_cl.{la,so}
+# provided by iptables
+rm -f $RPM_BUILD_ROOT%{_libdir}/xtables/libxt_TEE.so
+
+cp -a xtables-addons.8 $RPM_BUILD_ROOT%{_mandir}/man8
 %endif
 
+cat <<'EOF' > $RPM_BUILD_ROOT/etc/modprobe.d/xt_sysrq.conf
+# Set password at modprobe time. if this file is secure if properly guarded,
+# i.e only readable by root.
+#options xt_SYSRQ password=cookies
+
+# The hash algorithm can also be specified as a module option, for example, to use SHA-256 instead of the default SHA-1:
+#options xt_SYSRQ hash=sha256
+EOF
+
 %clean
 rm -rf $RPM_BUILD_ROOT
 
+%post   -p /sbin/ldconfig
+%postun -p /sbin/ldconfig
+
 %post -n kernel%{_alt_kernel}-net-xtables-addons
 %depmod %{_kernel_ver}
 
@@ -152,13 +164,17 @@ rm -rf $RPM_BUILD_ROOT
 %if %{with userspace}
 %files
 %defattr(644,root,root,755)
+%attr(755,root,root) %{_sbindir}/iptaccount
 %attr(755,root,root) %{_libdir}/xtables/libxt_*.so
-%{_mandir}/man8/libxt_*.*
+%attr(755,root,root) %{_libdir}/libxt_ACCOUNT_cl.so.*
+%{_mandir}/man8/xtables-addons.8*
 %endif
 
 %if %{with kernel}
 %files -n kernel%{_alt_kernel}-net-xtables-addons
 %defattr(644,root,root,755)
+%config(noreplace) %verify(not md5 mtime size) /etc/modprobe.d/xt_sysrq.conf
+/lib/modules/%{_kernel_ver}/kernel/net/ipv4/netfilter/iptable_rawpost.ko.gz
 /lib/modules/%{_kernel_ver}/kernel/net/netfilter/compat_xtables.ko.gz
 /lib/modules/%{_kernel_ver}/kernel/net/netfilter/xt_*.ko.gz
 %endif
This page took 0.029732 seconds and 4 git commands to generate.