diff options
author | Andrew Clemons <andrew.clemons@gmail.com> | 2022-03-08 22:25:26 +1300 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2022-03-09 17:21:07 +0700 |
commit | 5da95dbdf8cac893fb146319f90cf92da9775ebf (patch) | |
tree | 925890007b44e57f78c809dcfa7a5b49e9a6afd3 /system | |
parent | 0b5174007e7cde8b96c28288f5c0ff474a1e0250 (diff) | |
download | slackbuilds-5da95dbdf8cac893fb146319f90cf92da9775ebf.tar.gz |
system/chipsec: Respect KERNEL.
Signed-off-by: Andrew Clemons <andrew.clemons@gmail.com>
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'system')
-rw-r--r-- | system/chipsec/chipsec.SlackBuild | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/system/chipsec/chipsec.SlackBuild b/system/chipsec/chipsec.SlackBuild index a612bc06c2..977836fa37 100644 --- a/system/chipsec/chipsec.SlackBuild +++ b/system/chipsec/chipsec.SlackBuild @@ -30,6 +30,9 @@ BUILD=${BUILD:-1} TAG=${TAG:-_SBo} PKGTYPE=${PKGTYPE:-tgz} +KERNEL=${KERNEL:-$(uname -r)} +PKGVER=${VERSION}_$(echo $KERNEL | tr - _) + if [ -z "$ARCH" ]; then case "$( uname -m )" in i?86) ARCH=i586 ;; @@ -42,7 +45,7 @@ fi # the name of the created package would be, and then exit. This information # could be useful to other scripts. if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then - echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE" + echo "$PRGNAM-$PKGVER-$ARCH-$BUILD$TAG.$PKGTYPE" exit 0 fi @@ -64,10 +67,6 @@ else LIBDIRSUFFIX="" fi -# Don't have ARCH in the environment when building a kernel module -SLKARCH=$ARCH -unset -v ARCH - set -e rm -rf $PKG @@ -84,13 +83,13 @@ find -L . \ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; mkdir -pv build/lib/chipsec/helper/linux -python3 setup.py build_ext install --root=$PKG +env -u ARCH python3 setup.py build_ext install --root=$PKG # Sign the kernel module (if available) if [ -f /proc/config.gz ] then eval $(zgrep "^CONFIG_MODULE_SIG_HASH=" /proc/config.gz) - KERNSRC=${KERNSRC:-/lib/modules/$(uname -r)/source} + KERNSRC=${KERNSRC:-/lib/modules/$KERNEL/source} if [ -n "${CONFIG_MODULE_SIG_HASH}" ] && \ [ -f $KERNSRC/certs/signing_key.pem ] && \ [ -f $KERNSRC/certs/signing_key.x509 ] && \ @@ -118,4 +117,4 @@ mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc cd $PKG -/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$SLKARCH-$BUILD$TAG.$PKGTYPE +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$PKGVER-$ARCH-$BUILD$TAG.$PKGTYPE |