add packLibs

fix guhd.conf port
pull/135/head
Simon Stürz 2015-07-10 18:56:58 +02:00 committed by Michael Zanetti
parent e553439b63
commit f713544958
5 changed files with 42 additions and 5 deletions

16
guh.pro
View File

@ -79,7 +79,8 @@ contains(DEFINES, SNAPPY){
meta.files = meta/package.yaml \
meta/readme.md \
meta/guh-logo.svg \
meta/license.txt
meta/license.txt \
meta/packLibs.sh
meta.path = /meta/
wrapper.files = meta/guhd-wrapper.sh
@ -100,5 +101,16 @@ contains(DEFINES, SNAPPY){
sqlplugin.files = /usr/lib/arm-linux-gnueabihf/qt5/plugins/sqldrivers/libqsqlite.so
sqlplugin.path = /usr/lib/qt5/plugins/sqldrivers/
INSTALLS += meta wrapper qtlibs sqlplugin
# install guhd.conf
guhdconf.files = data/config/guhd.conf
guhdconf.path = /config/
INSTALLS += meta wrapper qtlibs sqlplugin guhdconf
# command to pack libs for snappy package
packlibs.depends = libguh server
packlibs.commands = $$top_srcdir/meta/packLibs.sh $$top_srcdir
QMAKE_EXTRA_TARGETS += packlibs
}

View File

@ -190,6 +190,7 @@ QString GuhSettings::logPath()
logPath = QDir::homePath() + "/.config/" + organisationName + "/guhd.sqlite";
}
#endif // SNAPPY
return logPath;
}

View File

@ -1,3 +0,0 @@
#!/bin/bash

26
meta/packLibs.sh Executable file
View File

@ -0,0 +1,26 @@
#!/bin/bash
function packLib()
{
echo -e "\nCopy dependencies for ${1}"
deps=$(ldd $1 | awk 'BEGIN{ORS=" "}$1 ~/^\//{print $1}$3~/^\//{print $3}' | sed 's/,$/\n/')
#Copy the deps
for dep in $deps
do
cp -v "$dep" "$2"
done
}
#################################################
if [ -d ./dependencies ]; then
echo "Clean dependency folder"
rm -rf ./dependencies/*
else
mkdir -v ./dependencies
fi
packLib libguh/libguh.so ./dependencies
packLib server/guhd ./dependencies
# TODO: pack qt plugin sqlite driver lib

View File

@ -13,3 +13,4 @@ services:
caps:
- networking
- network-service