diff options
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 |