network/tor-browser: Simplify SlackBuild script.

Thanks to Thomas Morper.

Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
Willy Sudiarto Raharjo 2016-01-16 16:38:21 +07:00
parent f97638282c
commit 8882b9e25f
2 changed files with 2 additions and 24 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

View file

@ -41,21 +41,9 @@ TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
if [ "$ARCH" = "i486" ]; then
SLKCFLAGS="-O2 -march=i486 -mtune=i686"
LIBDIRSUFFIX=""
SRCARCH=32
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
LIBDIRSUFFIX=""
SRCARCH=32
elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC"
LIBDIRSUFFIX="64"
if [ "$ARCH" = "x86_64" ]; then
SRCARCH=64
else
SLKCFLAGS="-O2"
LIBDIRSUFFIX=""
SRCARCH=32
fi
@ -64,18 +52,8 @@ set -e
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf ${PRGNAM}_${PRGLANG}
tar xvf $CWD/${PRGNAM}-linux${SRCARCH}-${VERSION}_${PRGLANG}.tar.xz
cd ${PRGNAM}_${PRGLANG}
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 {} \;
mkdir -p $PKG/opt/
mv * $PKG/opt/
mkdir -p $PKG/usr/bin
install -m 0755 $CWD/tor-browser.sh $PKG/usr/bin/tor-browser
@ -89,7 +67,7 @@ mkdir -p $PKG/opt/$PRGNAM
install -m 0644 $CWD/${PRGNAM}-linux${SRCARCH}-${VERSION}_${PRGLANG}.tar.xz $PKG/opt/$PRGNAM
mkdir -p $PKG/usr/share/pixmaps
install -m 0644 $PKG/opt/Browser/browser/icons/mozicon128.png $PKG/usr/share/pixmaps/tor-browser.png
install -m 0644 $CWD/mozicon128.png $PKG/usr/share/pixmaps/tor-browser.png
mkdir -p $PKG/usr/share/applications/
install -m 0644 $CWD/$PRGNAM.desktop $PKG/usr/share/applications/