summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonathan Bauer2011-09-06 17:15:40 +0200
committerJonathan Bauer2011-09-06 17:15:40 +0200
commit34881d406a5e68ed503c9916a1e73e2059c3e067 (patch)
treea24299233201f0a3c87b35c1ac85ae2a45a83fcc
parentstatic/dynamic builders (diff)
downloadfbsplash-master.tar.gz
fbsplash-master.tar.xz
fbsplash-master.zip
scripts update...HEADmaster
-rwxr-xr-xbuild-pkg.sh41
-rwxr-xr-xbuild-static.sh29
2 files changed, 70 insertions, 0 deletions
diff --git a/build-pkg.sh b/build-pkg.sh
new file mode 100755
index 0000000..a82525b
--- /dev/null
+++ b/build-pkg.sh
@@ -0,0 +1,41 @@
+#!/bin/bash
+
+QT_VERSION=QtEmbedded-4.7.2
+APP_NAME=fbsplash
+
+if [ ! -f bin/${APP_NAME} ]
+then
+ echo "No bin/${APP_NAME} found. Compile the code."
+ echo "Use:"
+ echo " build.sh"
+ echo "or"
+ echo " build-static.sh"
+ exit 0
+fi
+
+[ -f ${APP_NAME}.tgz ] && rm ${APP_NAME}.tgz
+
+mkdir -p pkg
+
+cd pkg
+
+mkdir -p bin
+cp ../bin/${APP_NAME} bin
+
+mkdir -p usr/local/Trolltech/${QT_VERSION}/lib
+cp -r /usr/local/Trolltech/${QT_VERSION}/lib/fonts \
+ usr/local/Trolltech/${QT_VERSION}/lib/
+
+for SHARED_LIBRARY in `ldd ../bin/${APP_NAME} | awk '{print $3}' |grep ^/`
+do
+#echo "$SHARED_LIBRARY"
+DIR=`dirname $SHARED_LIBRARY | cut -c2-`
+[ ! -d $DIR ] && mkdir -p $DIR
+[ ! -s "`echo $SHARED_LIBRARY | cut -c2-`" ] && \
+cp $SHARED_LIBRARY `echo $SHARED_LIBRARY | cut -c2-`
+done
+
+tar czf ../${APP_NAME}.tgz usr lib bin
+
+cd - &> /dev/null
+rm -rf pkg
diff --git a/build-static.sh b/build-static.sh
new file mode 100755
index 0000000..de05b26
--- /dev/null
+++ b/build-static.sh
@@ -0,0 +1,29 @@
+#!/bin/bash
+###############################################
+# #
+# fbsplash static builder using qmake #
+# #
+###############################################
+
+QT_VERSION=QtEmbedded-4.7.2
+SOURCE_DIR=src
+
+if [ "$1" = "-c" ]
+then
+ [ -d bin ] && rm -rf bin
+ [ -d build ] && rm -rf build
+fi
+
+if [ ! -f ${SOURCE_DIR}/fbsplash.pro ]
+then
+ echo "No 'fbsplash.pro' found!"
+ exit 1
+fi
+
+cd ${SOURCE_DIR}
+
+/usr/local/Trolltech/${QT_VERSION}/bin/qmake && make
+
+strip ../bin/fbsplash
+
+cd - &>/dev/null