Name: kernel Summary: The Linux Kernel Version: 6.1.12 Release: 1.kupo License: GPL Group: System Environment/Kernel Vendor: The Linux Community URL: http://www.kernel.org Source0: https://cdn.kernel.org/pub/linux/kernel/v6.x/linux-%{version}.tar.xz Source1: config Provides: kernel-%{version} BuildRequires: gcc openssl-devel elfutils-libelf-devel bc hostname perl flex bison openssl BuildRequires: kmod rsync %define __spec_install_post /usr/lib/rpm/brp-compress || : %define debug_package %{nil} %description The Linux Kernel, the operating system core itself %package headers Summary: Header files for the Linux kernel for use by glibc Group: Development/System #Obsoletes: kernel-headers Provides: kernel-headers = %{version} %description headers Kernel-headers includes the C header files that specify the interface between the Linux kernel and userspace libraries and programs. The header files define structures and constants that are needed for building most standard programs and are also needed for rebuilding the glibc package. %package devel Summary: Development package for building kernel modules to match the 5.5.1 kernel Group: System Environment/Kernel AutoReqProv: no %description -n kernel-devel This package provides kernel headers and makefiles sufficient to build modules against the %{version} kernel package. %prep %setup -q -n linux-%{version} cp %{SOURCE1} .config %build make %{?_smp_mflags} KBUILD_BUILD_VERSION=%{release} %install mkdir -p %{buildroot}/boot %ifarch ia64 mkdir -p %{buildroot}/boot/efi cp $(make image_name) %{buildroot}/boot/efi/vmlinuz-%{version} ln -s efi/vmlinuz-%{version} %{buildroot}/boot/ %else cp $(make image_name) %{buildroot}/boot/vmlinuz-%{version} %endif make %{?_smp_mflags} INSTALL_MOD_PATH=%{buildroot} modules_install make %{?_smp_mflags} INSTALL_HDR_PATH=%{buildroot}/usr headers_install cp System.map %{buildroot}/boot/System.map-%{version} cp .config %{buildroot}/boot/config-%{version} bzip2 -9 --keep vmlinux mv vmlinux.bz2 %{buildroot}/boot/vmlinux-%{version}.bz2 rm -f %{buildroot}/lib/modules/%{version}/build rm -f %{buildroot}/lib/modules/%{version}/source mkdir -p %{buildroot}/usr/src/kernels/%{version} tar cf - --exclude SCCS --exclude BitKeeper --exclude .svn --exclude CVS --exclude .pc --exclude .hg --exclude .git --exclude=*vmlinux* --exclude=*.mod --exclude=*.o --exclude=*.ko --exclude=*.cmd --exclude=Documentation --exclude=.config.old --exclude=.missing-syscalls.d --exclude=*.s . | tar xf - -C %{buildroot}/usr/src/kernels/%{version} cd %{buildroot}/lib/modules/%{version} ln -sf /usr/src/kernels/%{version} build ln -sf /usr/src/kernels/%{version} source %clean rm -rf %{buildroot} %post if [ -x /sbin/installkernel -a -r /boot/vmlinuz-%{version} -a -r /boot/System.map-%{version} ]; then cp /boot/vmlinuz-%{version} /boot/.vmlinuz-%{version}-rpm cp /boot/System.map-%{version} /boot/.System.map-%{version}-rpm rm -f /boot/vmlinuz-%{version} /boot/System.map-%{version} /sbin/installkernel %{version} /boot/.vmlinuz-%{version}-rpm /boot/.System.map-%{version}-rpm rm -f /boot/.vmlinuz-%{version}-rpm /boot/.System.map-%{version}-rpm fi %preun if [ -x /sbin/new-kernel-pkg ]; then new-kernel-pkg --remove %{version} --rminitrd --initrdfile=/boot/initramfs-%{version}.img elif [ -x /usr/bin/kernel-install ]; then kernel-install remove %{version} fi %postun if [ -x /sbin/update-bootloader ]; then /sbin/update-bootloader --remove %{version} fi %files %defattr (-, root, root) /lib/modules/%{version} %exclude /lib/modules/%{version}/build %exclude /lib/modules/%{version}/source /boot/* %files headers %defattr (-, root, root) /usr/include %files devel %defattr (-, root, root) /usr/src/kernels/%{version} /lib/modules/%{version}/build /lib/modules/%{version}/source