File spl-kmod.spec of Package spl
#
# spec file for package spl-kmod
#
# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
%define pkg_name spl
%bcond_with debug
%bcond_with debug_log
%bcond_with debug_kmem
%bcond_with debug_kmem_tracking
%bcond_with atomic_spinlocks
Name: %{pkg_name}-kmod
Version: 0.6.5.3
Release: 0
Summary: Kernel module(s)
License: GPL-2.0+
Group: System/Base
Url: http://zfsonlinux.org/
Source0: https://github.com/zfsonlinux/spl/archive/%{pkg_name}-%{version}.tar.gz
BuildRequires: %{kernel_module_package_buildreqs}
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: libtool
%if 0%{?suse_version} > 1310
BuildRequires: kmod-compat
%endif
%if 0%{?sles_version} == 11
#!BuildIgnore: post-build-checks
%endif
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%suse_kernel_module_package -n %{pkg_name} -p %{name}.preamble um xen
%description
This package contains the kernel modules required to emulate
several interfaces provided by the Solaris kernel.
%package devel
Summary: Headers and Symbols
Group: Development/Libraries/C and C++
# The developments headers will conflict with the dkms packages.
Conflicts: %{pkg_name}-dkms
%description devel
This package contains the header files and Module{s}.symvers
symbols needed for building additional modules.
%prep
%setup -q -n %{pkg_name}-%{pkg_name}-%{version}
%build
./autogen.sh
mkdir -p ../obj
for flavor in %{flavors_to_build}; do
rm -rf ../obj/$flavor
cp -r ../%{pkg_name}-%{pkg_name}-%{version} ../obj/$flavor
pushd ../obj/$flavor
%configure \
%if %{with debug}
--enable-debug \
%else
--disable-debug \
%endif
%if %{with debug_log}
--enable-debug-log \
%else
--disable-debug-log \
%endif
%if %{with debug_kmem}
--enable-debug-kmem \
%else
--disable-debug-kmem \
%endif
%if %{with debug_kmem_tracking}
--enable-debug-kmem-tracking \
%else
--disable-debug-kmem-tracking \
%endif
%if %{with atomic_spinlocks}
--enable-atomic-spinlocks \
%else
--disable-atomic-spinlocks \
%endif
--with-config=kernel \
--with-linux=%{_usrsrc}/linux \
--with-linux-obj=%{_usrsrc}/linux-obj/%{_target_cpu}/$flavor
make %{?_smp_mflags}
popd
done
%install
for flavor in %{flavors_to_build}; do
pushd ../obj/$flavor
make DESTDIR=%{buildroot} install
popd
done
%files devel
%defattr(-,root,root)
%{_usrsrc}/%{pkg_name}-*
%changelog