diff options
Diffstat (limited to 'system/unrar/unrar.SlackBuild')
-rw-r--r-- | system/unrar/unrar.SlackBuild | 43 |
1 files changed, 25 insertions, 18 deletions
diff --git a/system/unrar/unrar.SlackBuild b/system/unrar/unrar.SlackBuild index 4ee945818a..6da28d4868 100644 --- a/system/unrar/unrar.SlackBuild +++ b/system/unrar/unrar.SlackBuild @@ -1,8 +1,8 @@ -#!/bin/sh +#!/bin/bash # Slackware build script for unrar -# Copyright 2011, 2013, 2015, 2016, 2017, 2018 Mario Preksavec, Zagreb, Croatia +# Copyright 2011, 2024 Mario Preksavec, Zagreb, Croatia # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -22,26 +22,36 @@ # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# 20230801 bkw: Modified by SlackBuilds.org: add -j1 to make commands, +# since parallel builds fail. + +cd $(dirname $0) ; CWD=$(pwd) + PRGNAM=unrar -VERSION=${VERSION:-5.6.1} +VERSION=${VERSION:-6.2.12} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} +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" @@ -65,18 +75,18 @@ cd $PRGNAM 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 {} + -patch -p1 < $CWD/unrar-5.5.5-soname.patch +patch -p1 < $CWD/unrar-6.1.7-soname.patch cp -a $TMP/$PRGNAM/ $TMP/libunrar -make -C $TMP/libunrar lib libversion=$VERSION CXXFLAGS="$SLKCFLAGS" -make CXXFLAGS="$SLKCFLAGS" -f makefile unrar lib +make -j1 -C $TMP/libunrar lib libversion=$VERSION CXXFLAGS="$SLKCFLAGS" +make -j1 CXXFLAGS="$SLKCFLAGS" -f makefile unrar lib -install -D -m 755 unrar $PKG/usr/bin/unrar -install -D -m 755 $TMP/libunrar/libunrar.so.$VERSION $PKG/usr/lib${LIBDIRSUFFIX}/libunrar.so.$VERSION +install -s -D -m 755 unrar $PKG/usr/bin/unrar +install -s -D -m 755 $TMP/libunrar/libunrar.so.$VERSION $PKG/usr/lib${LIBDIRSUFFIX}/libunrar.so.$VERSION install -D -m 644 dll.hpp "$PKG/usr/include/unrar/dll.hpp" ( @@ -85,9 +95,6 @@ install -D -m 644 dll.hpp "$PKG/usr/include/unrar/dll.hpp" ln -s libunrar.so.$VERSION $PKG/usr/lib${LIBDIRSUFFIX}/libunrar.so.5 ) -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 - mkdir -p $PKG/usr/man/man1 gzip -9c $CWD/unrar.1 > $PKG/usr/man/man1/unrar.1.gz @@ -103,4 +110,4 @@ 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 |