aboutsummaryrefslogtreecommitdiff
path: root/system/unrar/unrar.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'system/unrar/unrar.SlackBuild')
-rw-r--r--system/unrar/unrar.SlackBuild26
1 files changed, 12 insertions, 14 deletions
diff --git a/system/unrar/unrar.SlackBuild b/system/unrar/unrar.SlackBuild
index 2b52b39b70045..c71997f359bbe 100644
--- a/system/unrar/unrar.SlackBuild
+++ b/system/unrar/unrar.SlackBuild
@@ -25,7 +25,7 @@
# Updated by Andrew Brouwers
PRGNAM=unrar
-VERSION=3.8.5
+VERSION=3.9.7
ARCH=${ARCH:-i486}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
@@ -48,36 +48,34 @@ case "$ARCH" in
;;
x86_64) SLKCFLAGS="-O2 -fPIC"
;;
- athlon-xp) SLKCFLAGS="-march=athlon-xp -O3 -pipe -fomit-frame-pointer"
- ;;
esac
+set -e
+
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
-rm -rf $PRGNAM-$VERSION
-tar xvf $CWD/${PRGNAM}src-$VERSION.tar.gz || exit 1
-mv $PRGNAM $PRGNAM-$VERSION || exit 1
-cd $PRGNAM-$VERSION || exit 1
+rm -rf $PRGNAM
+tar xvf $CWD/${PRGNAM}src-$VERSION.tar.gz
+cd $PRGNAM
chown -R root:root .
chmod -R a-s,u+w,go+r-w .
-CFLAGS="$SLKCFLAGS" \
-CXXFLAGS="$SLKCFLAGS" \
-sed -i "s/-O2/$CFLAGS/" makefile.unix
-make -f makefile.unix || exit 1
+make CXXFLAGS="$SLKCFLAGS" -f makefile.unix
-install -D -m 755 unrar $PKG/usr/bin/unrar || exit 1
+install -D -m 755 unrar $PKG/usr/bin/unrar
strip --strip-unneeded $PKG/usr/bin/unrar
-install -D -m 644 $CWD/unrar.1.gz $PKG/usr/man/man1/unrar.1.gz || exit 1
+mkdir -p $PKG/usr/man/man1
+gzip -9c $CWD/unrar.1 > $PKG/usr/man/man1/unrar.1.gz
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a $DOCS $PKG/usr/doc/$PRGNAM-$VERSION
+cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
chmod 0644 $PKG/usr/doc/$PRGNAM-$VERSION/*
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.tgz
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}