summaryrefslogtreecommitdiff
path: root/source/l/qtscriptgenerator/qtscriptgenerator.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'source/l/qtscriptgenerator/qtscriptgenerator.SlackBuild')
-rwxr-xr-xsource/l/qtscriptgenerator/qtscriptgenerator.SlackBuild116
1 files changed, 116 insertions, 0 deletions
diff --git a/source/l/qtscriptgenerator/qtscriptgenerator.SlackBuild b/source/l/qtscriptgenerator/qtscriptgenerator.SlackBuild
new file mode 100755
index 00000000..ed66c9bb
--- /dev/null
+++ b/source/l/qtscriptgenerator/qtscriptgenerator.SlackBuild
@@ -0,0 +1,116 @@
+#!/bin/sh
+
+# Slackware build script for qtscriptgenerator
+
+# Copyright 2009 Heinz Wiesinger <pprkut@liwjatan.at>
+# Copyright 2009 Patrick J. Volkerding, Sebeka, MN, USA
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+PRGNAM=qtscriptgenerator
+VERSION=${VERSION:-0.1.0}
+ARCH=${ARCH:-x86_64}
+BUILD=${BUILD:-1}
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-$PRGNAM
+
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+elif [ "$ARCH" = "arm" ]; then
+ SLKCFLAGS="-O2 -march=armv4 -mtune=xscale"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "armel" ]; then
+ SLKCFLAGS="-O2 -march=armv4t"
+ LIBDIRSUFFIX=""
+fi
+
+# Avoid a version number in .la files:
+if [ -d /usr/lib${LIBDIRSUFFIX}/qt ]; then
+ QTDIR=/usr/lib${LIBDIRSUFFIX}/qt
+fi
+
+rm -rf $PKG
+mkdir -p $TMP $PKG
+cd $TMP
+rm -rf $PRGNAM-src-$VERSION
+tar xvf $CWD/$PRGNAM-src-$VERSION.tar.?z* || exit 1
+cd $PRGNAM-src-$VERSION || exit 1
+chown -R root:root .
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+
+zcat $CWD/include-everything.patch.gz | patch -p1 --verbose || exit 1
+
+cd generator
+ qmake
+ make
+ ./generator --include-paths=/usr/lib${LIBDIRSUFFIX}/qt/include:/usr/include
+cd -
+
+cd qtbindings
+ sed -i "s|CONFIG += debug_and_release|CONFIG += release|" \
+ qtbindingsbase.pri
+ qmake
+ make qmake_all
+ sed -i "s|-I/usr/lib${LIBDIRSUFFIX}/qt/include/phonon|-I/usr/include/phonon|" \
+ qtscript_phonon/Makefile
+ make all
+cd -
+
+cd tools/qsexec/src
+ qmake
+ make
+cd -
+
+mkdir -p $PKG/usr/lib${LIBDIRSUFFIX}/qt/{bin,plugins/script}
+
+install -m 755 tools/qsexec/qsexec $PKG/usr/lib${LIBDIRSUFFIX}/qt/bin/qsexec
+install -m 755 generator/generator $PKG/usr/lib${LIBDIRSUFFIX}/qt/bin/generator
+cp -a plugins/script/libqtscript* $PKG/usr/lib${LIBDIRSUFFIX}/qt/plugins/script/
+
+find $PKG | xargs 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
+cp -a tools/qsexec/README.TXT README.qsexec
+cp -a \
+ LICENSE.GPL README* \
+ $PKG/usr/doc/$PRGNAM-$VERSION
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+cd $PKG
+/sbin/makepkg -l y -c n $TMP/$PRGNAM-$VERSION-$ARCH-$BUILD.txz
+