2021-05-14 12:37:58 +00:00
|
|
|
pkgver=5.12.3
|
2021-01-13 08:34:27 +00:00
|
|
|
pkgname=linux
|
|
|
|
pkgrel=1
|
2021-01-27 11:19:52 +00:00
|
|
|
ext="dev"
|
2021-01-13 08:34:27 +00:00
|
|
|
|
|
|
|
fetch() {
|
2021-03-27 13:23:10 +00:00
|
|
|
curl "https://raw.githubusercontent.com/kisslinux/website/master/site/dist/kernel-no-perl.patch" -o kernel-no-perl.patch
|
2021-01-13 08:34:27 +00:00
|
|
|
curl "https://cdn.kernel.org/pub/linux/kernel/v5.x/$pkgname-$pkgver.tar.xz" -o $pkgname-$pkgver.tar.xz
|
|
|
|
tar -xf $pkgname-$pkgver.tar.xz
|
|
|
|
cd $pkgname-$pkgver
|
2021-05-14 12:37:58 +00:00
|
|
|
|
|
|
|
# use Alpine's kernel config so we don't have to maintain one
|
|
|
|
curl "https://git.alpinelinux.org/aports/plain/testing/linux-edge/config-edge.x86_64" -o .config
|
2021-01-13 08:34:27 +00:00
|
|
|
patch -p1 < ../kernel-no-perl.patch
|
|
|
|
patch -p1 < ../../kernel-byacc.patch
|
|
|
|
}
|
|
|
|
|
|
|
|
build() {
|
|
|
|
cd $pkgname-$pkgver
|
2021-05-14 12:37:58 +00:00
|
|
|
# gmake CC=cc CXX=c++ HOSTCC=cc HOSTCXX=c++ YACC=yacc LLVM_IAS=1 defconfig
|
|
|
|
gmake CC=cc CXX=c++ HOSTCC=cc HOSTCXX=c++ LEX=lex YACC=yacc LLVM_IAS=1 olddefconfig
|
|
|
|
# gmake CC=cc CXX=c++ HOSTCC=cc HOSTCXX=c++ LEX=lex YACC=yacc LLVM_IAS=1 menuconfig
|
|
|
|
# cp .config ../../x86_64.config.new
|
|
|
|
sed -i 's/CONFIG_UNWINDER_ORC=y/# CONFIG_UNWINDER_ORC is not set/g' .config
|
|
|
|
sed -i 's/# CONFIG_UNWINDER_FRAME_POINTER is not set/CONFIG_UNWINDER_FRAME_POINTER=y/g' .config
|
2021-02-03 13:03:52 +00:00
|
|
|
gmake CC=cc CXX=c++ HOSTCC=cc HOSTCXX=c++ LEX=lex YACC=yacc LLVM_IAS=1
|
2021-01-13 08:34:27 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
package() {
|
|
|
|
cd $pkgname-$pkgver
|
|
|
|
install -d $pkgdir/boot
|
|
|
|
gmake CC=cc CXX=c++ HOSTCC=cc HOSTCXX=c++ YACC=yacc LLVM_IAS=1 INSTALL_PATH=$pkgdir/boot install
|
|
|
|
gmake CC=cc CXX=c++ HOSTCC=cc HOSTCXX=c++ YACC=yacc LLVM_IAS=1 INSTALL_MOD_PATH=$pkgdir/ modules_install
|
|
|
|
}
|
|
|
|
|
2021-01-27 11:19:52 +00:00
|
|
|
package_dev() {
|
|
|
|
cd $pkgname-$pkgver
|
2021-02-02 13:47:21 +00:00
|
|
|
if stat /usr/bin/rsync 2>/dev/null /dev/null; then
|
|
|
|
gmake CC=cc CXX=c++ HOSTCC=cc HOSTCXX=c++ YACC=yacc LLVM_IAS=1 INSTALL_HDR_PATH=$pkgdir/usr headers_install
|
|
|
|
else
|
|
|
|
gmake CC=cc CXX=c++ HOSTCC=cc HOSTCXX=c++ YACC=yacc LLVM_IAS=1 headers
|
|
|
|
find -name '.*' -exec rm {} \;
|
|
|
|
rm usr/include/Makefile
|
|
|
|
cp -r usr/include $pkgdir/usr
|
|
|
|
fi
|
2021-01-27 11:19:52 +00:00
|
|
|
}
|
|
|
|
|
2021-01-13 08:34:27 +00:00
|
|
|
license() {
|
|
|
|
cd $pkgname-$pkgver
|
|
|
|
cat COPYING
|
|
|
|
}
|