2019-08-03 12:06:11 +02:00
|
|
|
name: linux
|
2021-02-22 14:58:40 +01:00
|
|
|
version: 5.11
|
2019-08-23 14:10:58 +02:00
|
|
|
sources:
|
|
|
|
- https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-%{version}.tar.xz
|
|
|
|
- config
|
2019-09-08 18:54:28 +02:00
|
|
|
build-dependances:
|
|
|
|
- flex
|
2019-08-22 19:17:57 +02:00
|
|
|
|
2021-02-22 14:58:40 +01:00
|
|
|
options:
|
|
|
|
# WARNING: this has to be the same environment variables used
|
|
|
|
# during the creation of the config file
|
|
|
|
- make: -j5 CC=clang LD=ld.lld AR=llvm-ar NM=llvm-nm STRIP=llvm-strip OBJCOPY=llvm-objcopy OBJDUMP=llvm-objdump READELF=llvm-readelf HOSTCC=clang HOSTCXX=clang++ HOSTAR=llvm-ar HOSTLD=ld.lld
|
|
|
|
|
2019-09-08 18:54:28 +02:00
|
|
|
@configure
|
|
|
|
cd '%{name}-%{version}'
|
2021-02-22 14:58:40 +01:00
|
|
|
make mrproper
|
2019-08-23 14:10:58 +02:00
|
|
|
cp ../config .config
|
2019-08-03 12:06:11 +02:00
|
|
|
|
|
|
|
@install
|
2019-08-22 19:17:57 +02:00
|
|
|
cd 'linux-%{version}'
|
|
|
|
mkdir -p '%{pkg}/usr' '%{pkg}/boot' '%{pkg}/usr/src'
|
|
|
|
|
|
|
|
cp arch/x86/boot/bzImage '%{pkg}/boot/bzImage-%{version}'
|
|
|
|
make headers_install ARCH=x86_64 INSTALL_HDR_PATH='%{pkg}/usr'
|
|
|
|
|
|
|
|
# Installing sources for linux-src.
|
|
|
|
make distclean
|
|
|
|
cd ..
|
|
|
|
# FIXME: Maybe a new extraction would be better?
|
|
|
|
mv 'linux-%{version}' '%{pkg}/usr/src'
|
|
|
|
|
|
|
|
%split linux-src
|
|
|
|
files:
|
|
|
|
- /usr/src
|
2019-08-03 12:06:11 +02:00
|
|
|
|