aboutsummaryrefslogtreecommitdiff
path: root/development/qb64/qb64.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'development/qb64/qb64.SlackBuild')
-rw-r--r--development/qb64/qb64.SlackBuild59
1 files changed, 22 insertions, 37 deletions
diff --git a/development/qb64/qb64.SlackBuild b/development/qb64/qb64.SlackBuild
index 7cfc69d3b60d..ae313042a230 100644
--- a/development/qb64/qb64.SlackBuild
+++ b/development/qb64/qb64.SlackBuild
@@ -27,7 +27,7 @@ cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=qb64
VERSION=${VERSION:-2.1}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
@@ -48,12 +48,26 @@ 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
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
set -e
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-$VERSION
-tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
+mkdir -p $PRGNAM-$VERSION
cd $PRGNAM-$VERSION
chown -R root:root .
find -L . \
@@ -62,49 +76,20 @@ 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 {} \;
-echo "Building library 'LibQB'"
-pushd internal/c/libqb/os/lnx >/dev/null
-rm -f libqb_setup.o
-./setup_build.sh
-popd >/dev/null
-
-echo "Building library 'FreeType'"
-pushd internal/c/parts/video/font/ttf/os/lnx >/dev/null
-rm -f src.o
-./setup_build.sh
-popd >/dev/null
-
-echo "Building library 'Core:FreeGLUT'"
-pushd internal/c/parts/core/os/lnx >/dev/null
-rm -f src.a
-./setup_build.sh
-popd >/dev/null
-
-echo "Building 'QB64'"
-cp -r ./internal/source/* ./internal/temp/
-pushd internal/c >/dev/null
-g++ -no-pie -w qbx.cpp libqb/os/lnx/libqb_setup.o parts/video/font/ttf/os/lnx/src.o parts/core/os/lnx/src.a -lGL -lGLU -lX11 -lpthread -ldl -lrt -D FREEGLUT_STATIC -o ../../qb64
-popd
-
-mkdir -p $PKG/opt/$PRGNAM-$VERSION $PKG/usr/share/pixmaps $PKG/usr/share/applications $PKG/usr/man/man1 $PKG/usr/bin
-install -s -c -m 755 qb64 $PKG/opt/$PRGNAM-$VERSION/
-cat qb64.1 | gzip -c -f > $PKG/usr/man/man1/qb64.1.gz
-cp -axu internal $PKG/opt/$PRGNAM-$VERSION/
-cp -axu licenses $PKG/opt/$PRGNAM-$VERSION/
-cp $CWD/run_qb64.sh $PKG/opt/$PRGNAM-$VERSION
+mkdir -p $PKG/usr/bin $PKG/usr/src/$PRGNAM-$VERSION $PKG/usr/share/pixmaps $PKG/usr/share/applications $PKG/usr/man/man1
+cp $CWD/$PRGNAM-$VERSION.tar.gz $PKG/usr/src/$PRGNAM-$VERSION
+cat $CWD/qb64.1 | gzip -c -f > $PKG/usr/man/man1/qb64.1.gz
+cp $CWD/qb64-launcher $PKG/usr/bin
cp $CWD/qb64.desktop $PKG/usr/share/applications
-cp source/qb64.png $PKG/usr/share/pixmaps
+cp $CWD/qb64.png $PKG/usr/share/pixmaps
( cd $PKG/usr/bin ; rm -rf qb64 )
-( cd $PKG/usr/bin ; ln -sf /opt/$PRGNAM-$VERSION/run_qb64.sh qb64 )
+( cd $PKG/usr/bin ; ln -s qb64-launcher qb64 )
#find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
# | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
-cp CHANGELOG.md $PKG/usr/doc/$PRGNAM-$VERSION
-cp README.md $PKG/usr/doc/$PRGNAM-$VERSION
-cp SAMPLES.txt $PKG/usr/doc/$PRGNAM-$VERSION
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc