blob: 3c01675a4977ae0a73b86abadf74fc6b31f49641 (
plain) (
tree)
|
|
# Contributor: A. Wilcox <awilfox@adelielinux.org>
# Maintainer: Adelie Platform Group <adelie-devel@lists.adelielinux.org>
_pkgname=easy-kernel-power8
pkgver=4.14.56
pkgrel=9
pkgname=$_pkgname-$pkgver-mc$pkgrel
pkgdesc="The Linux kernel, packaged for POWER8 and POWER9 computers"
url="https://kernel.org/"
arch="ppc64"
options="!check !dbg !strip !tracedeps"
license="GPL-2.0-only"
depends=""
makedepends="bc gzip lzop openssl-dev xz"
install=""
provides="easy-kernel=$pkgver-r$pkgrel"
subpackages="$_pkgname-modules-$pkgver-mc$pkgrel:modules
$_pkgname-src-$pkgver-mc$pkgrel:src"
source="https://cdn.kernel.org/pub/linux/kernel/v4.x/linux-4.14.tar.xz
https://distfiles.adelielinux.org/source/linux-4.14-mc$pkgrel.patch.xz
ast-endianness.patch
config-ppc64"
builddir="$srcdir/linux-4.14"
prepare() {
default_prepare
cd "$srcdir"
cat linux-4.14-mc$pkgrel.patch.xz | unxz -> linux-4.14-mc$pkgrel.patch
cd "$builddir"
patch -Np1 <../linux-4.14-mc$pkgrel.patch
cd "$srcdir"
cp config-$CARCH linux-4.14/.config
cp -pr linux-4.14 linux-src
}
build() {
cd "$builddir"
make LDFLAGS=""
}
package() {
cd "$builddir"
mkdir -p "$pkgdir"/boot
make INSTALL_PATH="$pkgdir"/boot \
INSTALL_MOD_PATH="$pkgdir" \
install modules_install
if [ -f "$pkgdir"/boot/vmlinuz ]; then
mv "$pkgdir"/boot/vmlinuz \
"$pkgdir"/boot/vmlinuz-$pkgver-mc$pkgrel-easy
fi
if [ -f "$pkgdir"/boot/vmlinux ]; then
mv "$pkgdir"/boot/vmlinux \
"$pkgdir"/boot/vmlinux-$pkgver-mc$pkgrel-easy
fi
install -D "$builddir"/include/config/kernel.release \
"$pkgdir"/usr/share/kernel/easy-$pkgver-mc$pkgrel/kernel.release
}
modules() {
pkgdesc="Modules / device drivers for easy-kernel"
provides="easy-kernel-modules=$pkgver-r$pkgrel"
autodeps=0 # modules should not depend on src just for symlink
mkdir -p "$subpkgdir"/lib
mv "$pkgdir"/lib/modules "$subpkgdir"/lib/
rm "$subpkgdir"/lib/modules/$pkgver-mc$pkgrel-easy/build
rm "$subpkgdir"/lib/modules/$pkgver-mc$pkgrel-easy/source
ln -s "../../../usr/src/linux-$pkgver-mc$pkgrel" \
"$subpkgdir"/lib/modules/$pkgver-mc$pkgrel-easy/build
ln -s "../../../usr/src/linux-$pkgver-mc$pkgrel" \
"$subpkgdir"/lib/modules/$pkgver-mc$pkgrel-easy/source
}
src() {
pkgdesc="Kernel source code used to build the kernel"
provides="easy-kernel-src=$pkgver-r$pkgrel"
mkdir -p "$subpkgdir"/usr/src
mv "$srcdir"/linux-src "$subpkgdir"/usr/src/linux-$pkgver-mc$pkgrel
}
sha512sums="77e43a02d766c3d73b7e25c4aafb2e931d6b16e870510c22cef0cdb05c3acb7952b8908ebad12b10ef982c6efbe286364b1544586e715cf38390e483927904d8 linux-4.14.tar.xz
f76ae636da104c6f1d299a6aff18a5aa1166c9c06efbdf3270c911f26adc1760fbb4271ca2338ced47c7787c2ff54880e1945e2d6cf25fda880b5f735029d7a8 linux-4.14-mc9.patch.xz
e41d9111219342ad13367902242444ecdd847a93575c3f9709d6c6a075bc650f4a15be9db1a8798435fc0a0b56d41705829bfe0d2c2d88f8d1c28931e27ef5be ast-endianness.patch
829801050a55c5d8abf63bd91c3b23f1c86643f50ce9a0b7b489fb1e7eb3c07a2a68a6376c521b54460a02e0df7e39783d2fe863974c199b35e47f0b7dc1246c config-ppc64"
|