117 lines · 3.9 KB · Text
RawDownload
# _arch is undefined if /usr/lib/rpm/platform/*/macros was not included.%{!?_arch: %define _arch dummy}%{!?make: %define make make}%define makeflags %{?_smp_mflags} ARCH=%{ARCH}%define __spec_install_post /usr/lib/rpm/brp-compress || :%define debug_package %{nil} Name: kernelSummary: The Linux KernelVersion: %(echo %{KERNELRELEASE} | sed -e 's/-/_/g')Release: %{pkg_release}License: GPLGroup: System Environment/KernelVendor: The Linux CommunityURL: https://www.kernel.orgSource0: linux.tar.gzSource1: configSource2: diff.patchProvides: kernel-%{KERNELRELEASE}BuildRequires: bc binutils bison dwarvesBuildRequires: (elfutils-libelf-devel or libelf-devel) flexBuildRequires: gcc make openssl openssl-devel perl python3 rsync %descriptionThe Linux Kernel, the operating system core itself %package headersSummary: Header files for the Linux kernel for use by glibcGroup: Development/SystemObsoletes: kernel-headersProvides: kernel-headers = %{version}%description headersKernel-headers includes the C header files that specify the interfacebetween the Linux kernel and userspace libraries and programs.  Theheader files define structures and constants that are needed forbuilding most standard programs and are also needed for rebuilding theglibc package. %if %{with_devel}%package develSummary: Development package for building kernel modules to match the %{version} kernelGroup: System Environment/KernelAutoReqProv: no%description -n kernel-develThis package provides kernel headers and makefiles sufficient to build modulesagainst the %{version} kernel package.%endif %prep%setup -q -n linuxcp %{SOURCE1} .configpatch -p1 < %{SOURCE2} %build%{make} %{makeflags} KERNELRELEASE=%{KERNELRELEASE} KBUILD_BUILD_VERSION=%{release} %installmkdir -p %{buildroot}/boot%ifarch ia64mkdir -p %{buildroot}/boot/eficp $(%{make} %{makeflags} -s image_name) %{buildroot}/boot/efi/vmlinuz-%{KERNELRELEASE}ln -s efi/vmlinuz-%{KERNELRELEASE} %{buildroot}/boot/%elsecp $(%{make} %{makeflags} -s image_name) %{buildroot}/boot/vmlinuz-%{KERNELRELEASE}%endif%{make} %{makeflags} INSTALL_MOD_PATH=%{buildroot} modules_install%{make} %{makeflags} INSTALL_HDR_PATH=%{buildroot}/usr headers_installcp System.map %{buildroot}/boot/System.map-%{KERNELRELEASE}cp .config %{buildroot}/boot/config-%{KERNELRELEASE}ln -fns /usr/src/kernels/%{KERNELRELEASE} %{buildroot}/lib/modules/%{KERNELRELEASE}/buildln -fns /usr/src/kernels/%{KERNELRELEASE} %{buildroot}/lib/modules/%{KERNELRELEASE}/source%if %{with_devel}%{make} %{makeflags} run-command KBUILD_RUN_COMMAND='${srctree}/scripts/package/install-extmod-build %{buildroot}/usr/src/kernels/%{KERNELRELEASE}'%endif %cleanrm -rf %{buildroot} %postif [ -x /sbin/installkernel -a -r /boot/vmlinuz-%{KERNELRELEASE} -a -r /boot/System.map-%{KERNELRELEASE} ]; thencp /boot/vmlinuz-%{KERNELRELEASE} /boot/.vmlinuz-%{KERNELRELEASE}-rpmcp /boot/System.map-%{KERNELRELEASE} /boot/.System.map-%{KERNELRELEASE}-rpmrm -f /boot/vmlinuz-%{KERNELRELEASE} /boot/System.map-%{KERNELRELEASE}/sbin/installkernel %{KERNELRELEASE} /boot/.vmlinuz-%{KERNELRELEASE}-rpm /boot/.System.map-%{KERNELRELEASE}-rpmrm -f /boot/.vmlinuz-%{KERNELRELEASE}-rpm /boot/.System.map-%{KERNELRELEASE}-rpmfi %preunif [ -x /sbin/new-kernel-pkg ]; thennew-kernel-pkg --remove %{KERNELRELEASE} --rminitrd --initrdfile=/boot/initramfs-%{KERNELRELEASE}.imgelif [ -x /usr/bin/kernel-install ]; thenkernel-install remove %{KERNELRELEASE}fi %postunif [ -x /sbin/update-bootloader ]; then/sbin/update-bootloader --remove %{KERNELRELEASE}fi %files%defattr (-, root, root)/lib/modules/%{KERNELRELEASE}%exclude /lib/modules/%{KERNELRELEASE}/build%exclude /lib/modules/%{KERNELRELEASE}/source/boot/* %files headers%defattr (-, root, root)/usr/include %if %{with_devel}%files devel%defattr (-, root, root)/usr/src/kernels/%{KERNELRELEASE}/lib/modules/%{KERNELRELEASE}/build/lib/modules/%{KERNELRELEASE}/source%endif

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t