aboutsummaryrefslogtreecommitdiff
path: root/development/sqlitebrowser/sqlitebrowser.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'development/sqlitebrowser/sqlitebrowser.SlackBuild')
-rw-r--r--development/sqlitebrowser/sqlitebrowser.SlackBuild21
1 files changed, 18 insertions, 3 deletions
diff --git a/development/sqlitebrowser/sqlitebrowser.SlackBuild b/development/sqlitebrowser/sqlitebrowser.SlackBuild
index 3ce097641b11..c42f24509ecf 100644
--- a/development/sqlitebrowser/sqlitebrowser.SlackBuild
+++ b/development/sqlitebrowser/sqlitebrowser.SlackBuild
@@ -31,7 +31,7 @@ TAG=${TAG:-_SBo}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
- i?86) ARCH=i486 ;;
+ i?86) ARCH=i586 ;;
arm*) ARCH=arm ;;
*) ARCH=$( uname -m ) ;;
esac
@@ -42,13 +42,27 @@ TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
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
+ SLCKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
set -eu
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-$VERSION
-tar xvf $CWD/$PRGNAM-$VERSION.tar.gz || tar xvf $CWD/v$VERSION.tar.gz
+tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
chown -R root:root .
find -L . \
@@ -57,7 +71,7 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
-qmake
+qmake QMAKE_CFLAGS="$SLKCFLAGS" QMAKE_CXXFLAGS="$SLKCFLAGS"
make LINK="g++ -ldl"
mkdir -p $PKG/usr/bin
cp src/$PRGNAM $PKG/usr/bin/
@@ -76,6 +90,7 @@ cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
+cat $CWD/doinst.sh > $PKG/install/doinst.sh
cd $PKG
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}