6 Release: @RELEASE@
%{?dist}
8 Summary: Kernel module
(s
)
9 Group: System Environment
/Kernel
10 License: @ZFS_META_LICENSE@
11 URL: https
://github.com
/openzfs
/zfs
12 BuildRequires
: %kernel_module_package_buildreqs
13 Source0: @PACKAGE@
-%{version}.tar.gz
14 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n
)
16 # Additional dependency information for the kmod sub-package must be specified
17 # by generating a preamble text file which kmodtool can append to the spec file.
19 Requires: @PACKAGE@
= %{version}\n\
20 Conflicts: @PACKAGE@
-dkms\n\n"
> %{_sourcedir}/kmod
-preamble\n\
23 # LDFLAGS are not sanitized by arch/*/Makefile for these architectures.
24 %ifarch ppc ppc64 ppc64le aarch64
25 %global __global_ldflags
%{nil}
29 This package contains the ZFS kernel modules.
31 %define kmod_name @PACKAGE@
33 %kernel_module_package -n
%{kmod_name} -p %{_sourcedir}/kmod
-preamble
35 %define ksrc
%{_usrsrc}/kernels/%{kverrel}
38 %package -n kmod
-%{kmod_name}-devel
39 Summary: ZFS kernel module
(s
) devel common
40 Group: System Environment
/Kernel
41 Provides: kmod
-spl
-devel
= %{version}
43 %description -n kmod
-%{kmod_name}-devel
44 This package provides the header files and objects to build kernel modules.
47 if ! [ -d "
%{ksrc}"
]; then
48 echo "Kernel build directory isn't
set properly
, cannot
continue"
53 %define debug
--enable-debug
55 %define debug
--disable
-debug
59 %define debuginfo
--enable-debuginfo
61 %define debuginfo
--disable
-debuginfo
64 %setup -n
%{kmod_name}-%{version}
67 --with
-config
=kernel \
68 --with
-linux
=%{ksrc} \
69 --with
-linux
-obj
=%{kobj} \
76 DESTDIR
=$
{RPM_BUILD_ROOT
} \
77 INSTALL_MOD_DIR
=extra
/%{kmod_name}
78 %{__rm} -f %{buildroot}/lib/modules/%{kverrel}/modules.
*
80 # find-debuginfo.sh only considers executables
81 %{__chmod} u+x %{buildroot}/lib/modules/%{kverrel}/extra
/*/*/*
84 rm -rf $RPM_BUILD_ROOT
86 %files -n kmod
-%{kmod_name}-devel
87 %{_usrsrc}/%{kmod_name}-%{version}
88 %{_usrsrc}/spl-%{version}