diff options
Diffstat (limited to 'graphics/jUploadr/jUploadr.SlackBuild')
-rw-r--r-- | graphics/jUploadr/jUploadr.SlackBuild | 30 |
1 files changed, 27 insertions, 3 deletions
diff --git a/graphics/jUploadr/jUploadr.SlackBuild b/graphics/jUploadr/jUploadr.SlackBuild index 0ae8784061787..0d0f24ff30026 100644 --- a/graphics/jUploadr/jUploadr.SlackBuild +++ b/graphics/jUploadr/jUploadr.SlackBuild @@ -9,21 +9,45 @@ VERSION=${VERSION:-1.1.2} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} -ARCH=i386 +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) ARCH=i586 ;; + arm*) ARCH=arm ;; + *) ARCH=$( uname -m ) ;; + esac +fi CWD=$(pwd) TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} +if [ "$ARCH" = "i586" ]; then + SLKCFLAGS="-O2 -march=i586 -mtune=i686" + LIBDIRSUFFIX="" + SRCARCH=i386 +elif [ "$ARCH" = "i686" ]; then + SLKCFLAGS="-O2 -march=i686 -mtune=i686" + LIBDIRSUFFIX="" + SRCARCH=i386 +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" + LIBDIRSUFFIX="64" + SRCARCH=amd64 +else + SLKCFLAGS="-O2" + LIBDIRSUFFIX="" + SRCARCH=i386 +fi + set -e rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT cd $TMP rm -rf $PRGNAM-$VERSION -tar xvf $CWD/$PRGNAM-$VERSION-linuxGTK-i386.tar.gz -mv $PRGNAM-$VERSION-linuxGTK-i386 $PRGNAM-$VERSION +tar xvf $CWD/$PRGNAM-$VERSION-linuxGTK-$SRCARCH.tar.gz +mv $PRGNAM-$VERSION-linuxGTK-$SRCARCH $PRGNAM-$VERSION cd $PRGNAM-$VERSION chown -R root:root . find -L . \ |