summaryrefslogtreecommitdiff
path: root/packaging/linux
diff options
context:
space:
mode:
Diffstat (limited to 'packaging/linux')
-rwxr-xr-xpackaging/linux/build.sh47
1 files changed, 24 insertions, 23 deletions
diff --git a/packaging/linux/build.sh b/packaging/linux/build.sh
index 703d1e0..4825e0b 100755
--- a/packaging/linux/build.sh
+++ b/packaging/linux/build.sh
@@ -8,7 +8,7 @@ echo "<******************************>"
###############################################################################
# HELP
###############################################################################
-if [ $1 == "help" ]; then
+if [[ $1 == "--help" ]]; then
echo "usage: $0 -v version"
echo "-v 0.2.5 \"compile version 0.2.5\""
echo "!if no version is specified svn version is created!"
@@ -34,21 +34,24 @@ BUNDLE_PREFIX="${HOME}/tuxanci-bundle"
LOG="${BUNDLE_PREFIX}/linux.log"
SOURCE="${BUNDLE_PREFIX}/source"
D="${BUNDLE_PREFIX}/${APPNAME}"
-ARCHS="32b 64b"
+ARCHS="64b 32b"
+OPTIONS="client server"
ERROR_MESSAGE="Check ${LOG}, cause i was unable to finish my stuff correctly!"
-CMAKE_PARAMS="-DCMAKE_INSTALL_PREFIX=\"..\""
+CMAKE_PARAMS="-DBundle=1 -DTUXANCI_VERSION=${VERSION}"
###############################################################################
# PREPARING ENVIROMENT
###############################################################################
-mkdir -p ${BUNDLE_PREFIX} || ( echo "I was unable to create working directory"; exit 1 )
-touch ${LOG} || ( echo "I was unable to create log file"; exit 1 )
-echo "" > ${LOG} # LOG CLEANUP
-echo "<******************************>"
+mkdir -p "${BUNDLE_PREFIX}" || ( echo "I was unable to create working directory"; exit 1 )
+#rm -rf "${BUNDLE_PREFIX}"/*
+touch "${LOG}" || ( echo "I was unable to create log file"; exit 1 )
+echo "" > "${LOG}" # LOG CLEANUP
echo "<Downloading files from SVN repository>"
echo "<******************************>"
svn export $SVN ${SOURCE} >> "${LOG}" || ( echo "${ERROR_MESSAGE}"; exit 1 )
+# fix prefix placement
+
for X in ${ARCHS}; do
-if [ ${X} == "32b" ]; then
+if [[ ${X} == "32b" ]]; then
CMAKE_PARAMS="${CMAKE_PARAMS} -DCMAKE_C_FLAGS=-m32"
fi
###############################################################################
@@ -57,7 +60,7 @@ fi
echo "<******************************>"
echo "<Building Client ${X}>"
echo "<******************************>"
-cd ${SOURCE}
+cd "${SOURCE}"
cmake . ${CMAKE_PARAMS} >> "${LOG}" || ( echo "${ERROR_MESSAGE}"; exit 1 )
make >> "${LOG}" || ( echo "${ERROR_MESSAGE}"; exit 1 )
make install DESTDIR="${D}_client-${X}/" >> "${LOG}" || ( echo "${ERROR_MESSAGE}"; exit 1 )
@@ -72,7 +75,7 @@ make clean
echo "<******************************>"
echo "<Building Server ${X}>"
echo "<******************************>"
-cd ${SOURCE}
+cd "${SOURCE}"
cmake . ${CMAKE_PARAMS} -DServer=ON >> "${LOG}" || ( echo "${ERROR_MESSAGE}"; exit 1 )
make >> "${LOG}" || ( echo "${ERROR_MESSAGE}"; exit 1 )
make install DESTDIR="${D}_server-${X}/" >> "${LOG}" || ( echo "${ERROR_MESSAGE}"; exit 1 )
@@ -85,36 +88,34 @@ make clean
done
# DESTRUCTION OF SRC
###############################################################################
-cd ${BUNDLE_PREFIX}
-rm -rf ${SOURCE}
+cd "${BUNDLE_PREFIX}"
+#rm -rf "${SOURCE}"
###############################################################################
# BUILDING TARS
###############################################################################
-echo "<******************************>"
echo "<Creating tar.bz2 archives>"
echo "<******************************>"
for X in ${ARCHS}; do
- for Y in "client server"; do
- tar cjf "${APPNAME}_${Y}-${X}.tar.bz2" "${APPNAME}_${Y}-${X}/"
+ for Y in ${OPTIONS}; do
+ tar cjf "${APPNAME}"_"${Y}"-"${X}".tar.bz2 "${APPNAME}"_"${Y}"-"${X}"/*
done
done
###############################################################################
# DESTRUCTION OF UNPACKED BINARIES
###############################################################################
for X in ${ARCHS}; do
- for Y in "client server"; do
- rm -rf "${APPNAME}_${Y}-${X}/"
+ for Y in ${OPTIONS}; do
+ rm -rf "${APPNAME}"_"${Y}"-"${X}"/
done
done
###############################################################################
# SHOW WHAT HAVE WE DONE
###############################################################################
-echo "<******************************>"
echo "<What have i created :>"
echo "<******************************>"
-find type -f ./ -maxdepth 1 -print
-echo "<******************************>"
-echo "<******************************>"
+find ./ -maxdepth 1 -type f -print
+echo
+echo
echo "<GNU/Linux binary packages are ready>"
-echo "<******************************>"
-echo "<******************************>"
+echo
+echo