]> git.pld-linux.org Git - packages/spl.git/blobdiff - spl.spec
- fix building with linux 3.19
[packages/spl.git] / spl.spec
index ab3dab0445cdd2933ca7035016e30d2363d7cbe4..abd9b7c4244f5e5a40fdd6cb84d6b478b8dd672f 100644 (file)
--- a/spl.spec
+++ b/spl.spec
@@ -1,14 +1,9 @@
 #
 # 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 programs
 %bcond_with    verbose         # verbose build (V=1)
 #
-%if %{without kernel}
-%undefine      with_dist_kernel
-%endif
-
 # The goal here is to have main, userspace, package built once with
 # simple release number, and only rebuild kernel packages with kernel
 # version as part of release number, without the need to bump release
 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
@@ -36,12 +20,8 @@ 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" ; 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   spl
-%define                rel     2
+%define                rel     7
 Summary:       Solaris Porting Layer
 Summary(pl.UTF-8):     Solaris Porting Layer - warstwa do portowania kodu z Solarisa
 Name:          %{pname}%{?_pld_builder:%{?with_kernel:-kernel}}%{_alt_kernel}
@@ -52,9 +32,11 @@ Group:               Applications/System
 Source0:       http://archive.zfsonlinux.org/downloads/zfsonlinux/spl/%{pname}-%{version}.tar.gz
 # Source0-md5: 8df6ce3c8f1d9af6526b36f5079cba59
 Patch0:                linux-3.17.patch
+Patch1:                linux-3.18.patch
+Patch2:                linux-3.19.patch
 URL:           http://zfsonlinux.org/
-BuildRequires: rpmbuild(macros) >= 1.678
-%{?with_dist_kernel:%{expand:%kbrs}}
+BuildRequires: rpmbuild(macros) >= 1.701
+%{?with_kernel:%{expand:%buildrequires_kernel kernel%%{_alt_kernel}-module-build >= 3:2.6.20.2}}
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
@@ -63,6 +45,19 @@ Solaris Porting Layer.
 %description -l pl.UTF-8
 Solaris Porting Layer - warstwa do portowania kodu z Solarisa.
 
+%package -n kernel-spl-common-devel
+Summary:       Solaris Porting Layer - Linux kernel headers
+Summary(pl.UTF-8):     Solaris Porting Layer - pliki nagłówkowe jądra Linuksa
+Group:         Development/Building
+
+%description -n kernel-spl-common-devel
+Solaris Porting Layer - Linux kernel headers common for all PLD
+kernel versions.
+
+%description -n kernel-spl-common-devel -l pl.UTF-8
+Solaris Porting Layer - pliki nagłówkowe jądra Linuksa wspólne
+dla wszystkich wersji jądrer PLD.
+
 %define        kernel_pkg()\
 %package -n kernel%{_alt_kernel}-spl\
 Summary:       Solaris Porting Layer - Linux kernel modules\
@@ -70,10 +65,8 @@ Summary(pl.UTF-8):   Solaris Porting Layer - moduły jądra Linuksa\
 Release:       %{rel}@%{_kernel_ver_str}\
 Group:         Base/Kernel\
 Requires(post,postun): /sbin/depmod\
-%if %{with dist_kernel}\
 %requires_releq_kernel\
 Requires(postun):      %releq_kernel\
-%endif\
 \
 %description -n kernel%{_alt_kernel}-spl\
 Solaris Porting Layer - Linux kernel modules.\
@@ -86,7 +79,8 @@ Summary:      Solaris Porting Layer - Linux kernel headers\
 Summary(pl.UTF-8):     Solaris Porting Layer - pliki nagłówkowe jądra Linuksa\
 Release:       %{rel}@%{_kernel_ver_str}\
 Group:         Development/Building\
-%{?with_dist_kernel:Requires:  kernel%{_alt_kernel}-headers}\
+Requires:      kernel%{_alt_kernel}-headers\
+Requires:      kernel-spl-common-devel\
 \
 %description -n kernel%{_alt_kernel}-spl-devel\
 Solaris Porting Layer - Linux kernel headers configured for PLD\
@@ -105,9 +99,6 @@ dla jądra PLD z pakietu kernel%{_alt_kernel} w wersji %{_kernel_ver}.\
 \
 %files -n kernel%{_alt_kernel}-spl-devel\
 %defattr(644,root,root,755)\
-%dir /usr/src/spl-%{version}\
-/usr/src/spl-%{version}/spl*.in\
-/usr/src/spl-%{version}/include\
 /usr/src/spl-%{version}/%{_kernel_ver}\
 \
 %post  -n kernel%{_alt_kernel}-spl\
@@ -129,18 +120,20 @@ 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}
 %patch0 -p1
+%patch1 -p1
+%patch2 -p1
 
 %build
 %{__aclocal} -I config
 %{__autoconf}
 %{__autoheader}
 %{__automake}
-%{?with_kernel:%{expand:%bkpkg}}
+%{?with_kernel:%{expand:%build_kernel_packages}}
 
 %if %{with userspace}
 %configure \
@@ -175,3 +168,11 @@ rm -rf $RPM_BUILD_ROOT
 %{_mandir}/man1/splat.1*
 %{_mandir}/man5/spl-module-parameters.5.gz
 %endif
+
+%if %{with kernel}
+%files -n kernel-spl-common-devel
+%defattr(644,root,root,755)
+%dir /usr/src/spl-%{version}
+/usr/src/spl-%{version}/spl*.in
+/usr/src/spl-%{version}/include
+%endif
This page took 0.044678 seconds and 4 git commands to generate.