[packages/xtables-addons/XTADDONS_1] - updated kernel modules build system

baggins baggins at pld-linux.org
Tue Jan 27 20:14:32 CET 2015


commit 935ce4616e60736b0480bd63ca75cb78f559db67
Author: Jan Rękorajski <baggins at pld-linux.org>
Date:   Tue Jan 27 20:14:02 2015 +0100

    - updated kernel modules build system

 xtables-addons.spec | 22 ++++------------------
 1 file changed, 4 insertions(+), 18 deletions(-)
---
diff --git a/xtables-addons.spec b/xtables-addons.spec
index ef2d10d..f4be693 100644
--- a/xtables-addons.spec
+++ b/xtables-addons.spec
@@ -16,25 +16,11 @@
 exit 1
 %endif
 
-%if "%{_alt_kernel}" != "%{nil}"
-%if 0%{?build_kernels:1}
-%{error:alt_kernel and build_kernels are mutually exclusive}
-exit 1
-%endif
-%global		_build_kernels		%{alt_kernel}
-%else
-%global		_build_kernels		%{?build_kernels:,%{?build_kernels}}
-%endif
-
 %if %{without userspace}
 # nothing to be placed to debuginfo package
 %define		_enable_debug_packages	0
 %endif
 
-%define		kbrs	%(echo %{_build_kernels} | tr , '\\n' | while read n ; do echo %%undefine alt_kernel ; [ -z "$n" ] || echo %%define alt_kernel $n ; echo "BuildRequires:kernel%%{_alt_kernel}-module-build >= 3:2.6.20.2" ; done)
-%define		kpkg	%(echo %{_build_kernels} | tr , '\\n' | while read n ; do echo %%undefine alt_kernel ; [ -z "$n" ] || echo %%define alt_kernel $n ; echo %%kernel_pkg ; done)
-%define		bkpkg	%(echo %{_build_kernels} | tr , '\\n' | while read n ; do echo %%undefine alt_kernel ; [ -z "$n" ] || echo %%define alt_kernel $n ; echo %%build_kernel_pkg ; done)
-
 %define		rel	42
 %define		pname	xtables-addons
 Summary:	Additional extensions for xtables packet filtering system
@@ -53,8 +39,8 @@ BuildRequires:	automake >= 1:1.11
 BuildRequires:	iptables-devel >= 1.4.5
 BuildRequires:	libtool
 BuildRequires:	pkgconfig >= 0.9.0
-BuildRequires:	rpmbuild(macros) >= 1.678
-%{?with_kernel:%{expand:%kbrs}}
+BuildRequires:	rpmbuild(macros) >= 1.701
+%{?with_kernel:%{expand:%buildrequires_kernel kernel%%{_alt_kernel}-module-build >= 3:2.6.20.2}}
 BuildRequires:	tar >= 1.22
 BuildRequires:	xz
 Requires:	iptables >= 1.4.5
@@ -123,7 +109,7 @@ for drv in extensions/compat_xtables.ko extensions/{ACCOUNT/,pknock/,}xt_*.ko ;
 done\
 %{nil}
 
-%{?with_kernel:%{expand:%kpkg}}
+%{?with_kernel:%{expand:%create_kernel_packages}}
 
 %prep
 %setup -q -n %{pname}-%{version}
@@ -138,7 +124,7 @@ done\
 	V=1
 %endif
 
-%{?with_kernel:%{expand:%bkpkg}}
+%{?with_kernel:%{expand:%build_kernel_packages}}
 
 %install
 rm -rf $RPM_BUILD_ROOT
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/xtables-addons.git/commitdiff/9c8de23f3845f732cfcf3f3be743294c7a2d4586



More information about the pld-cvs-commit mailing list