]> git.pld-linux.org Git - packages/zfs.git/commitdiff
- updated kernel modules build system
authorJan Rękorajski <baggins@pld-linux.org>
Tue, 27 Jan 2015 19:11:59 +0000 (20:11 +0100)
committerJan Rękorajski <baggins@pld-linux.org>
Tue, 27 Jan 2015 19:11:59 +0000 (20:11 +0100)
zfs.spec

index a90980c49b2087e83d18f63c1308cd38dbb4b25e..9f01db04b108cc8895d5014d215d0abdb2300b5b 100644 (file)
--- a/zfs.spec
+++ b/zfs.spec
 exit 1
 %endif
 
-%if "%{_alt_kernel}" != "%{nil}"
-%if 0%{?build_kernels:1}
-%{error:alt_kernel and build_kernels are mutually exclusive}
-exit 1
-%endif
-%undefine      with_userspace
-%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
@@ -32,10 +21,6 @@ exit 1
 
 %define                _duplicate_files_terminate_build        0
 
-%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,kernel%%{_alt_kernel}-spl-devel >= 0.6.3" ; 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        pname   zfs
 %define        rel     4
 Summary:       Native Linux port of the ZFS filesystem
@@ -54,7 +39,10 @@ BuildRequires:       autoconf >= 2.50
 BuildRequires: automake
 BuildRequires: libtool
 BuildRequires: rpmbuild(macros) >= 1.701
-%{?with_kernel:%{expand:%kbrs}}
+%if %{with kernel}
+%{expand:%buildrequires_kernel kernel%%{_alt_kernel}-module-build >= 3:2.6.20.2}
+%{expand:%buildrequires_kernel kernel%%{_alt_kernel}-spl-devel >= 0.6.3}
+%endif
 %if %{with userspace}
 BuildRequires: libblkid-devel
 BuildRequires: libselinux-devel
@@ -219,7 +207,7 @@ p=`pwd`\
 %{__make} install DESTDIR=$p/installed INSTALL_MOD_DIR=misc\
 %{nil}
 
-%{?with_kernel:%{expand:%kpkg}}
+%{?with_kernel:%{expand:%create_kernel_packages}}
 
 %prep
 %setup -q -n %{pname}-%{version}
@@ -232,7 +220,7 @@ p=`pwd`\
 %{__autoconf}
 %{__autoheader}
 %{__automake}
-%{?with_kernel:%{expand:%bkpkg}}
+%{?with_kernel:%{expand:%build_kernel_packages}}
 
 %if %{with userspace}
 %configure \
This page took 0.153378 seconds and 4 git commands to generate.