5.14.13-2 (clr 5.14.12-1082) re-add STRIP modules and vmlinux

This commit is contained in:
Josip Ponjavic 2021-10-18 00:53:17 +02:00
parent 1bb0d7dd9b
commit eab7713904
2 changed files with 11 additions and 5 deletions

View file

@ -1,7 +1,7 @@
pkgbase = linux-clear
pkgdesc = Clear Linux
pkgver = 5.14.13
pkgrel = 1
pkgrel = 2
url = https://github.com/clearlinux-pkgs/linux
arch = x86_64
license = GPL2
@ -10,6 +10,7 @@ pkgbase = linux-clear
makedepends = git
makedepends = kmod
makedepends = libelf
makedepends = pahole
makedepends = xmlto
options = !strip
source = https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-5.14.tar.xz
@ -43,3 +44,4 @@ pkgname = linux-clear
pkgname = linux-clear-headers
pkgdesc = Headers and scripts for building modules for the Clear Linux kernel
depends = pahole

View file

@ -79,12 +79,12 @@ _srcname=linux-${_major}
_clr=${_major}.12-1082
pkgbase=linux-clear
pkgver=${_major}.${_minor}
pkgrel=1
pkgrel=2
pkgdesc='Clear Linux'
arch=('x86_64')
url="https://github.com/clearlinux-pkgs/linux"
license=('GPL2')
makedepends=('bc' 'cpio' 'git' 'kmod' 'libelf' 'xmlto')
makedepends=('bc' 'cpio' 'git' 'kmod' 'libelf' 'pahole' 'xmlto')
options=('!strip')
_gcc_more_v='20210914'
source=(
@ -234,7 +234,7 @@ prepare() {
build() {
cd ${_srcname}
make bzImage modules
make all
}
_package() {
@ -260,7 +260,7 @@ _package() {
echo "$pkgbase" | install -Dm644 /dev/stdin "$modulesdir/pkgbase"
echo "Installing modules..."
make INSTALL_MOD_PATH="$pkgdir/usr" modules_install
make INSTALL_MOD_PATH="$pkgdir/usr" INSTALL_MOD_STRIP=1 modules_install
# remove build and source links
rm "$modulesdir"/{source,build}
@ -268,6 +268,7 @@ _package() {
_package-headers() {
pkgdesc="Headers and scripts for building modules for the $pkgdesc kernel"
depends=(pahole)
cd ${_srcname}
local builddir="$pkgdir/usr/lib/modules/$(<version)/build"
@ -339,6 +340,9 @@ _package-headers() {
esac
done < <(find "$builddir" -type f -perm -u+x ! -name vmlinux -print0)
echo "Stripping vmlinux..."
strip -v $STRIP_STATIC "$builddir/vmlinux"
echo "Adding symlink..."
mkdir -p "$pkgdir/usr/src"
ln -sr "$builddir" "$pkgdir/usr/src/$pkgbase"