aboutsummaryrefslogtreecommitdiff
path: root/development/sqlitebrowser/sqlitebrowser.SlackBuild
diff options
context:
space:
mode:
authorklaatu <klaatu@member.fsf.org>2017-04-01 18:51:50 +0100
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2017-04-08 06:57:42 +0700
commit9ab99c8a3383132c5cf1d1fa34610da09c27010c (patch)
tree555605fb1e128927aab71bb9467533c8223537c6 /development/sqlitebrowser/sqlitebrowser.SlackBuild
parente870236153e84cd85ec843b52e7c455c8886be86 (diff)
development/sqlitebrowser: New maintainer + switch to i586.
Signed-off-by: David Spencer <idlemoor@slackbuilds.org>
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 3ce097641b113..c42f24509ecfa 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}