mirror of
https://github.com/Ponce/slackbuilds
synced 2024-11-22 19:44:21 +01:00
development/qb64: Update script.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
parent
45e7fe02ba
commit
16fcc1b0fb
3 changed files with 28 additions and 41 deletions
|
@ -16,5 +16,7 @@ adds a number of extensions, such as OpenGL and other modern
|
|||
features, providing the perfect blend of classic and modern
|
||||
program development.
|
||||
|
||||
This package installs to /opt/ but a user directory is
|
||||
required in $HOME in order to run the program and its data.
|
||||
On first run this package installs ~/.config/qb64-2.1
|
||||
in $HOME in order to run the program and its data.
|
||||
You can delete this directory and rebuild you local configuration
|
||||
by relaunching the program.
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
[Desktop Entry]
|
||||
Name=QB64 Programming IDE
|
||||
GenericName=QB64 Programming IDE
|
||||
Exec=bash -c "/opt/qb64-2.1/run_qb64.sh"
|
||||
Icon=qb64
|
||||
Exec=qb64-launcher "$@"
|
||||
Icon=qb64.png
|
||||
Terminal=false
|
||||
Type=Application
|
||||
Categories=Development;IDE;
|
||||
|
|
Loading…
Reference in a new issue