diff options
Diffstat (limited to 'system/exa/exa.SlackBuild')
-rw-r--r-- | system/exa/exa.SlackBuild | 30 |
1 files changed, 21 insertions, 9 deletions
diff --git a/system/exa/exa.SlackBuild b/system/exa/exa.SlackBuild index 89bbaded44..578e021306 100644 --- a/system/exa/exa.SlackBuild +++ b/system/exa/exa.SlackBuild @@ -3,6 +3,7 @@ # Slackware build script for exa # Copyright 2017-2021 Andrew Clemons, Wellington New Zealand +# Copyright 2022-2023 Andrew Clemons, Tokyo Japan # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -26,7 +27,7 @@ cd $(dirname $0) ; CWD=$(pwd) PRGNAM=exa VERSION=${VERSION:-0.10.1} -BUILD=${BUILD:-1} +BUILD=${BUILD:-2} TAG=${TAG:-_SBo} PKGTYPE=${PKGTYPE:-tgz} @@ -44,9 +45,6 @@ if [ -z "$ARCH" ]; then fi fi -# If the variable PRINT_PACKAGE_NAME is set, then this script will report what -# 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" exit 0 @@ -59,15 +57,15 @@ OUTPUT=${OUTPUT:-/tmp} if [ "$ARCH" = "i586" ]; then SLKCFLAGS="-O2 -march=i586 -mtune=i686" LIBDIRSUFFIX="" - CARGOTARGET="--target i586-unknown-linux-gnu" + CARGOTARGET="--target $ARCH-unknown-linux-gnu" elif [ "$ARCH" = "i686" ]; then SLKCFLAGS="-O2 -march=i686 -mtune=i686" LIBDIRSUFFIX="" - CARGOTARGET="--target i686-unknown-linux-gnu" -elif [ "$ARCH" = "x86_64" ]; then + CARGOTARGET="--target $ARCH-unknown-linux-gnu" +elif [ "$ARCH" = "x86_64" ] || [ "$ARCH" = "aarch64" ]; then SLKCFLAGS="-O2 -fPIC" LIBDIRSUFFIX="64" - CARGOTARGET="--target x86_64-unknown-linux-gnu" + CARGOTARGET="--target $ARCH-unknown-linux-gnu" else SLKCFLAGS="-O2" LIBDIRSUFFIX="" @@ -140,10 +138,12 @@ find -L . \ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; +sed -i "s/version = \"0.11.0-pre\"/version = \"$VERSION\"/" Cargo.lock + CARGO_HOME=.cargo \ CFLAGS="$SLKCFLAGS" \ CXXFLAGS="$SLKCFLAGS" \ -cargo build --release $CARGOTARGET +cargo build --offline --release $CARGOTARGET mkdir -p $PKG/usr/bin @@ -152,6 +152,18 @@ find target -name $PRGNAM -exec install -m 755 {} $PKG/usr/bin/$PRGNAM \; 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 +unzip -q -d accoutrements $CWD/$PRGNAM-accoutrements-v$VERSION.zip + +install -Dm644 accoutrements/man/exa.1 $PKG/usr/man/man1/exa.1 +install -Dm644 accoutrements/man/exa_colors.5 $PKG/usr/man/man5/exa_colors.5 + +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 + +install -Dm644 accoutrements/completions/*.bash $PKG/usr/share/bash-completion/completions/exa +install -Dm644 accoutrements/completions/*.fish $PKG/usr/share/fish/completions/exa.fish +install -Dm644 accoutrements/completions/*.zsh $PKG/usr/share/zsh/site-functions/_exa + mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION cp -a LICENCE README.md $PKG/usr/doc/$PRGNAM-$VERSION cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild |