From 891802a61515fab949dee99ca1d7fe506478cdf8 Mon Sep 17 00:00:00 2001 From: Pratham Patel Date: Tue, 12 Sep 2023 21:28:44 +0530 Subject: [PATCH] more granular building --- master.inc | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/master.inc b/master.inc index 1e3a9d4..111152f 100644 --- a/master.inc +++ b/master.inc @@ -39,6 +39,8 @@ The Linux Kernel, the operating system core itself %package headers Summary: Header files for the Linux kernel for use by glibc +Obsoletes: kernel-headers-tfg +Provides: kernel-headers-tfg = %{KVERREL} %description headers Kernel-headers includes the C header files that specify the interface between the Linux kernel and userspace libraries and programs. The @@ -48,6 +50,8 @@ glibc package %package devel Summary: Development package for building kernel modules to match the kernel +Provides: kernel-devel-tfg = %{KVERREL} +AutoReqProv: no %description devel This package provides kernel headers and makefiles sufficient to build modules against the kernel package. @@ -144,9 +148,11 @@ rm -rf $RPM_BUILD_ROOT/lib/modules/%{KVERREL}/build rm -rf $RPM_BUILD_ROOT/lib/modules/%{KVERREL}/source mkdir -p $RPM_BUILD_ROOT/usr/src/kernels/%{KVERREL} tar cf - $EXCLUDES . | tar xf - -C $RPM_BUILD_ROOT/usr/src/kernels/%{KVERREL} -cd $RPM_BUILD_ROOT/lib/modules/%{KVERREL} +pushd $RPM_BUILD_ROOT/lib/modules/%{KVERREL} ln -fns /usr/src/kernels/%{KVERREL} $RPM_BUILD_ROOT/lib/modules/%{KVERREL}/build ln -fns /usr/src/kernels/%{KVERREL} $RPM_BUILD_ROOT/lib/modules/%{KVERREL}/source +popd +%{make} run-command KBUILD_RUN_COMMAND='${RPM_BUILD_DIR}/%{src_dir}/scripts/package/install-extmod-build $RPM_BUILD_ROOT/usr/src/kernels/%{KVERREL}' %clean rm -rf $RPM_BUILD_ROOT @@ -173,10 +179,14 @@ if [ -x /sbin/update-bootloader ]; then fi %files headers +%defattr (-, root, root) /usr/include %files devel +%defattr (-, root, root) /usr/src/kernels/%{KVERREL} +/lib/modules/%{KVERREL}/build +/lib/modules/%{KVERREL}/source %files %defattr (-, root, root)