diff options
Diffstat (limited to 'system/unar/unar.SlackBuild')
-rw-r--r-- | system/unar/unar.SlackBuild | 86 |
1 files changed, 35 insertions, 51 deletions
diff --git a/system/unar/unar.SlackBuild b/system/unar/unar.SlackBuild index 43ac01aa34c1..f759acb89ef0 100644 --- a/system/unar/unar.SlackBuild +++ b/system/unar/unar.SlackBuild @@ -1,33 +1,23 @@ #!/bin/bash -# Slackware build script for <appname> - -# Copyright 2016-2023 Alexander Verbovetsky, Moscow, Russia -# All rights reserved. -# -# Redistribution and use of this script, with or without modification, is -# permitted provided that the following conditions are met: -# -# 1. Redistributions of this script must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# -# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED -# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO -# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; -# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR -# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# Slackware build script for unar + +# Original author: Alexander Verbovetsky, Moscow, Russia. +# Modified and now maintained by B. Watson <urchlay@slackware.uk>. +# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details. + +# 20241006 bkw: BUILD=2 +# - take over maintenance. +# - build in a top-level dir in $TMP (easier cleanup). +# - simplify scrippt. +# - relicense as WTFPL (thanks, Alexander). cd $(dirname $0) ; CWD=$(pwd) PRGNAM=unar VERSION=${VERSION:-1.10.8} UDVERSION=${UDVERSION:-1.1} -BUILD=${BUILD:-1} +BUILD=${BUILD:-2} TAG=${TAG:-_SBo} PKGTYPE=${PKGTYPE:-tgz} @@ -63,17 +53,17 @@ set -e rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT cd $TMP -rm -rf XADMaster-$VERSION UniversalDetector +rm -rf $PRGNAM-$VERSION +mkdir -p $PRGNAM-$VERSION +cd $PRGNAM-$VERSION tar xvf $CWD/XADMaster-$VERSION.tar.gz tar xvf $CWD/universal-detector-$UDVERSION.tar.gz mv universal-detector-$UDVERSION UniversalDetector -cd XADMaster-$VERSION 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 \ - \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ - -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; +find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} + -o \ + \! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} + + +cd XADMaster-$VERSION export CFLAGS="$SLKCFLAGS" export CXXFLAGS="$SLKCFLAGS" @@ -81,28 +71,22 @@ export OBJCFLAGS="$SLKCFLAGS" make -f Makefile.linux -mkdir -p $PKG/usr/bin -install -m 0755 -o root -g root lsar unar $PKG/usr/bin/ - -mkdir -p $PKG/usr/man/man1 -install -m 0644 -o root -g root Extra/lsar.1 Extra/unar.1 \ - $PKG/usr/man/man1 - -mkdir -p $PKG/usr/share/bash-completion/completions -install -m 0644 -o root -g root Extra/unar.bash_completion \ - $PKG/usr/share/bash-completion/completions/unar -install -m 0644 -o root -g root Extra/lsar.bash_completion \ - $PKG/usr/share/bash-completion/completions/lsar - -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 - -mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION -cp -a README.md $PKG/usr/doc/$PRGNAM-$VERSION -cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild +PKGMAN1=$PKG/usr/man/man1 +PKGBIN=$PKG/usr/bin +PKGCOMP=$PKG/usr/share/bash-completion/completions +INST="install -o root -g root" + +mkdir -p $PKGMAN1 $PKGBIN $PKGCOMP +for i in lsar unar; do + $INST -s -m 0755 $i $PKGBIN + gzip -9c < Extra/$i.1 > $PKG/usr/man/man1/$i.1.gz + $INST -m 0644 Extra/$i.bash_completion $PKGCOMP/$i +done + +PKGDOC=$PKG/usr/doc/$PRGNAM-$VERSION +mkdir -p $PKGDOC +cp -a README.md $PKGDOC +cat $CWD/$PRGNAM.SlackBuild > $PKGDOC/$PRGNAM.SlackBuild mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc |