diff options
Diffstat (limited to 'system/sbsigntools/sbsigntools.SlackBuild')
-rw-r--r-- | system/sbsigntools/sbsigntools.SlackBuild | 69 |
1 files changed, 33 insertions, 36 deletions
diff --git a/system/sbsigntools/sbsigntools.SlackBuild b/system/sbsigntools/sbsigntools.SlackBuild index f9701591ff..9146f824f6 100644 --- a/system/sbsigntools/sbsigntools.SlackBuild +++ b/system/sbsigntools/sbsigntools.SlackBuild @@ -1,8 +1,9 @@ -#!/bin/sh +#!/bin/bash # Slackware build script for sbsigntools # Copyright 2015 Jonathan Li +# Copyright 2023 Sam Wright # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -22,28 +23,39 @@ # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# 20231211 bkw: +# - update for v0.9.5. +# - new maintainer (who isn't me, for once!) +# - remove 0-byte ChangeLog from doc dir. +# - various minor tweaks. + +cd $(dirname $0) ; CWD=$(pwd) + PRGNAM=sbsigntools -VERSION=${VERSION:-0.7} +VERSION=${VERSION:-0.9.5} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} - -CCAN_VERSION=${CCAN_VERSION:-0.0.2} +PKGTYPE=${PKGTYPE:-tgz} if [ -z "$ARCH" ]; then case "$( uname -m )" in - i?86) ARCH=i486 ;; + i?86) ARCH=i586 ;; arm*) ARCH=arm ;; *) ARCH=$( uname -m ) ;; esac fi -CWD=$(pwd) +if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then + echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE" + exit 0 +fi + TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} -if [ "$ARCH" = "i486" ]; then - SLKCFLAGS="-O2 -march=i486 -mtune=i686" +if [ "$ARCH" = "i586" ]; then + SLKCFLAGS="-O2 -march=i586 -mtune=i686" LIBDIRSUFFIX="" elif [ "$ARCH" = "i686" ]; then SLKCFLAGS="-O2 -march=i686 -mtune=i686" @@ -62,31 +74,21 @@ rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT cd $TMP rm -rf $PRGNAM-$VERSION -tar xvf $CWD/$PRGNAM-$VERSION.tar.gz +# The tarball is generated from a clone --recursive of the git repository, +# see git2tarxz.sh. +tar xvf $CWD/$PRGNAM-$VERSION.tar.xz cd $PRGNAM-$VERSION -tar -xvf $CWD/ccan-$CCAN_VERSION.tar.gz -C lib/ccan.git - -# Next 2 patches taken from -# https://build.opensuse.org/package/show/home:jejb1:UEFI/sbsigntools?rev=16 -# Fixes build on 32-bit. -patch -p1 -i $CWD/fix_efi_arch.patch - -# Creates changelog and stops git from being called. -patch -p1 -i $CWD/autogen.patch - -# Suppress "not git repo messages"- they're evaluated by the makefile but don't -# actually get run so it's just noise. -patch -p1 -i $CWD/ccan_makefile.patch -rm lib/ccan.git/Makefile-web - chown -R root:root . find -L . \ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ - -o -perm 511 \) -exec chmod 755 {} \; -o \ + -o -perm 511 \) -exec chmod 755 {} + -o \ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ - -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; + -o -perm 440 -o -perm 400 \) -exec chmod 644 {} + + +sed -i "s|/usr/lib$LIBDIRSUFFIX/efi|/usr/lib$LIBDIRSUFFIX/gnuefi|" configure.ac + +NOCONFIGURE=1 ./autogen.sh -./autogen.sh CFLAGS="$SLKCFLAGS" \ CXXFLAGS="$SLKCFLAGS" \ ./configure \ @@ -98,20 +100,15 @@ CXXFLAGS="$SLKCFLAGS" \ cp lib/ccan.git/config.h lib/ccan make -make install DESTDIR=$PKG - -find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \ - | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true - -find $PKG/usr/man -type f -exec gzip -9 {} \; -for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done +make install-strip DESTDIR=$PKG +gzip -9 $PKG/usr/man/man*/* mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION -cp -a AUTHORS COPYING LICENSE.GPLv3 ChangeLog $PKG/usr/doc/$PRGNAM-$VERSION +cp -a AUTHORS COPYING LICENSE.GPLv3 $PKG/usr/doc/$PRGNAM-$VERSION cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc cd $PKG -/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE |