network/slack: Fix symlink and remove ARCH detection.
Thanks to Thomas Morper. Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
parent
f988b6c426
commit
07b2fd5dce
|
@ -30,42 +30,13 @@ VERSION=${VERSION:-2.6.0}
|
||||||
BUILD=${BUILD:-1}
|
BUILD=${BUILD:-1}
|
||||||
TAG=${TAG:-_SBo}
|
TAG=${TAG:-_SBo}
|
||||||
|
|
||||||
if [ -z "$ARCH" ]; then
|
ARCH=x86_64
|
||||||
case "$( uname -m )" in
|
|
||||||
i?86) export ARCH=i586 ;;
|
|
||||||
arm*) export ARCH=arm ;;
|
|
||||||
*) export ARCH=$( uname -m ) ;;
|
|
||||||
esac
|
|
||||||
fi
|
|
||||||
|
|
||||||
DEBARCH=${DEBARCH:-$(uname -m)}
|
|
||||||
|
|
||||||
case "$DEBARCH" in
|
|
||||||
i?86) DEBARCH="i386" ;;
|
|
||||||
x86_64) DEBARCH="amd64" ;;
|
|
||||||
*) echo "Package for $(uname -m) architecture is not available." ; exit 1 ;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
|
|
||||||
CWD=$(pwd)
|
CWD=$(pwd)
|
||||||
TMP=${TMP:-/tmp/SBo}
|
TMP=${TMP:-/tmp/SBo}
|
||||||
PKG=$TMP/package-$PRGNAM
|
PKG=$TMP/package-$PRGNAM
|
||||||
OUTPUT=${OUTPUT:-/tmp}
|
OUTPUT=${OUTPUT:-/tmp}
|
||||||
|
|
||||||
if [ "$ARCH" = "i586" ]; then
|
|
||||||
SLKCFLAGS="-O2 -march=i586 -mtune=i686"
|
|
||||||
LIBDIRSUFFIX=""
|
|
||||||
elif [ "$ARCH" = "i686" ]; then
|
|
||||||
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
|
|
||||||
LIBDIRSUFFIX=""
|
|
||||||
elif [ "$ARCH" = "x86_64" ]; then
|
|
||||||
SLKCFLAGS="-O2 -fPIC"
|
|
||||||
LIBDIRSUFFIX="64"
|
|
||||||
else
|
|
||||||
SLKCFLAGS="-O2"
|
|
||||||
LIBDIRSUFFIX=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
rm -rf $PKG
|
rm -rf $PKG
|
||||||
|
@ -74,7 +45,7 @@ cd $TMP
|
||||||
rm -rf $PRGNAM-$VERSION
|
rm -rf $PRGNAM-$VERSION
|
||||||
mkdir -p $PRGNAM-$VERSION
|
mkdir -p $PRGNAM-$VERSION
|
||||||
cd $PRGNAM-$VERSION
|
cd $PRGNAM-$VERSION
|
||||||
ar p $CWD/${PRGNAM}-desktop-${VERSION}-${DEBARCH}.deb data.tar.xz | tar xJv
|
ar p $CWD/${PRGNAM}-desktop-${VERSION}-amd64.deb data.tar.xz | tar xJv
|
||||||
chown -R root:root .
|
chown -R root:root .
|
||||||
find -L . \
|
find -L . \
|
||||||
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
|
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
|
||||||
|
@ -89,13 +60,13 @@ rm -rf $PKG/etc/
|
||||||
## nor lintian stuff and another copy of LICENSE
|
## nor lintian stuff and another copy of LICENSE
|
||||||
rm -rf $PKG/usr/share/{doc,lintian}
|
rm -rf $PKG/usr/share/{doc,lintian}
|
||||||
|
|
||||||
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION/
|
# Fix path
|
||||||
cp -a $PKG/usr/lib/slack/LICENSE $PKG/usr/doc/$PRGNAM-$VERSION/
|
mv $PKG/usr/lib $PKG/usr/lib64
|
||||||
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
|
( cd $PKG/usr/bin ; rm -f slack ; ln -s ../lib64/slack/slack )
|
||||||
|
|
||||||
if [ "$ARCH" = "x86_64" ]; then
|
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION/
|
||||||
mv $PKG/usr/lib $PKG/usr/lib64
|
cp -a $PKG/usr/lib64/slack/LICENSE $PKG/usr/doc/$PRGNAM-$VERSION/
|
||||||
fi
|
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
|
||||||
|
|
||||||
mkdir -p $PKG/install
|
mkdir -p $PKG/install
|
||||||
cat $CWD/slack-desc > $PKG/install/slack-desc
|
cat $CWD/slack-desc > $PKG/install/slack-desc
|
||||||
|
|
Loading…
Reference in New Issue