mirror of
https://gitdl.cn/https://github.com/chakralinux/core.git
synced 2025-02-11 10:34:36 +08:00
43 lines
1.3 KiB
Bash
43 lines
1.3 KiB
Bash
|
|
# toolchain build order: linux-api-headers->glibc->binutils->gcc->binutils->glibc
|
|
source ../linux.conf
|
|
|
|
pkgname=linux-api-headers
|
|
pkgver=$_kernelver
|
|
pkgrel=1
|
|
pkgdesc="Kernel headers sanitized for use in userspace"
|
|
arch=('x86_64')
|
|
url="http://www.gnu.org/software/libc"
|
|
license=('GPL2')
|
|
source=(https://www.kernel.org/pub/linux/kernel/v4.x/linux-${pkgver%.*}.tar.{xz,sign}
|
|
https://www.kernel.org/pub/linux/kernel/v4.x/patch-${pkgver}.{xz,sign})
|
|
sha256sums=('63f6dc8e3c9f3a0273d5d6f4dca38a2413ca3a5f689329d05b750e4c87bb21b9'
|
|
'SKIP'
|
|
'634d3fd97e5d9d90262db0a9d62ed0a40043eb691d68bd4a545f907079610b56'
|
|
'SKIP')
|
|
validpgpkeys=('ABAF11C65A2970B130ABE3C479BE3E4300411886' # Linus Torvalds
|
|
'647F28654894E3BD457199BE38DBBDC86092693E') # Greg Kroah-Hartman
|
|
|
|
prepare() {
|
|
cd ${srcdir}/linux-${_basekernel}
|
|
[[ $pkgver != $_basekernel ]] && patch -p1 -i ${srcdir}/patch-${pkgver} || true
|
|
}
|
|
|
|
build() {
|
|
cd ${srcdir}/linux-${_basekernel}
|
|
|
|
make mrproper
|
|
make headers_check
|
|
}
|
|
|
|
package() {
|
|
cd ${srcdir}/linux-${_basekernel}
|
|
make INSTALL_HDR_PATH=${pkgdir}/usr headers_install
|
|
|
|
# use headers from libdrm
|
|
rm -r ${pkgdir}/usr/include/drm
|
|
|
|
# clean-up unnecessary files generated during install
|
|
find ${pkgdir} \( -name .install -o -name ..install.cmd \) -delete
|
|
}
|