diff options
Diffstat (limited to 'packaging')
| -rwxr-xr-x | packaging/deb/build.sh | 32 | ||||
| -rw-r--r-- | packaging/deb/control | 12 | ||||
| -rw-r--r-- | packaging/deb/tuxanci.desktop | 9 | ||||
| -rwxr-xr-x | packaging/linux/build.sh | 69 |
4 files changed, 61 insertions, 61 deletions
diff --git a/packaging/deb/build.sh b/packaging/deb/build.sh deleted file mode 100755 index 6d5a56e..0000000 --- a/packaging/deb/build.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh - -rm -rf tmp - -mkdir tmp -mkdir tmp/DEBIAN - -mkdir tmp/usr/ -mkdir tmp/usr/games -mkdir tmp/usr/games/lib -mkdir tmp/usr/games/share -mkdir tmp/usr/share/ -mkdir tmp/usr/share/applications/ - -echo "2.0" > tmp/DEBIAN/debian-binary -cp control tmp/DEBIAN -cp tuxanci.desktop tmp/usr/share/applications/ - -cd ../.. - -rm CMakeCache.txt -make clean -cmake . -DDebug=1 -DCMAKE_INSTALL_PREFIX=/usr/games -DCMAKE_DATA_PATH=/usr/games/share -DCMAKE_CONF_PATH=/etc -DLIB_INSTALL_DIR=/usr/games/lib -make DESTDIR=./packaging/deb/tmp/ install - -cd ./packaging/deb - -cd tmp -md5sum `find . -type f | awk '/.\// { print substr($0, 3) }'` > DEBIAN/md5sums -cd .. - -dpkg-deb -b tmp tuxanci_svn-1_i386.deb diff --git a/packaging/deb/control b/packaging/deb/control deleted file mode 100644 index 5874d37..0000000 --- a/packaging/deb/control +++ /dev/null @@ -1,12 +0,0 @@ -Package: tuxanci -Version: 0.20.0 -Section: Game -Priority: optional -Depends: libc6 (>= 2.2.4-4), libsdl1.2debian (>= 1.2), libsdl-image1.2 (>= 1.2), libsdl-mixer1.2 (>= 1.2), libsdl-ttf2.0-0 (>= 2.0) -Architecture: i386 -Installed-Size: 4993 -Maintainer: Dušan Ďurech <dusan.d@centrum.sk> -Description: Game tuxanci next generation version 0.20.0 SVN revision - Game tuxanci next generation SVN revision - . - http://www.tuxanci.org diff --git a/packaging/deb/tuxanci.desktop b/packaging/deb/tuxanci.desktop deleted file mode 100644 index f34fcde..0000000 --- a/packaging/deb/tuxanci.desktop +++ /dev/null @@ -1,9 +0,0 @@ -[Desktop Entry] -Name=tuxanci-svn -Comment=game tuxanci -Exec=/usr/games/bin/tuxanci-svn -Terminal=false -Type=Application -Icon=/usr/games/share/tuxanci-svn/images/tuxanci.png -Encoding=UTF-8 -Categories=Game diff --git a/packaging/linux/build.sh b/packaging/linux/build.sh index 43a642e..36e82e1 100755 --- a/packaging/linux/build.sh +++ b/packaging/linux/build.sh @@ -11,7 +11,7 @@ echo "<******************************>" if [[ $1 == "--help" ]]; then echo "usage: $0 -v version -a arch -r revision" echo "-v 0.2.5 \"compile version 0.2.5\"" - echo "-a 32b \"compile 32b ELF (64b for 64b ELF)\"" + echo "-a i386 \"compile 32b ELF (64b for 64b ELF)\"" echo "-r 183 \"create packages from svn revision 183\"" echo "!if no version is specified svn version is created!" echo "!if no arch is specified 64b is used!" @@ -22,7 +22,7 @@ fi # ARGUMENT PASSING ############################################################################### VERSION="9999" -ARCH="64b" +ARCH="amd64" SVN_REV="" while getopts v:a:r: arg ; do case $arg in @@ -36,13 +36,14 @@ done ############################################################################### APPNAME="tuxanci" SVN="https://opensvn.csie.org/tuxanci_ng/" -BUNDLE_PREFIX="${HOME}/tuxanci-bundle" -LOG="${BUNDLE_PREFIX}/linux.log" +BUNDLE_PREFIX="${HOME}"/tuxanci-bundle +LOG="${BUNDLE_PREFIX}"/linux.log SOURCE="${BUNDLE_PREFIX}"/"${APPNAME}"_source_"${VERSION}" -D="${BUNDLE_PREFIX}/${APPNAME}" +D="${BUNDLE_PREFIX}"/"${APPNAME}" +DEST_DEB="${BUNDLE_PREFIX}"/"${APPNAME}"-deb OPTIONS="client server" ERROR_MESSAGE="Check ${LOG}, cause i was unable to finish my stuff correctly!" -CMAKE_PARAMS="-DBundle=1 -DTUXANCI_VERSION=${VERSION} -DCMAKE_BUILD_TYPE=Release" +CMAKE_PARAMS="-DNLS=1 -DTUXANCI_VERSION=${VERSION} -DCMAKE_BUILD_TYPE=Release" ############################################################################### # PREPARING ENVIROMENT ############################################################################### @@ -60,12 +61,41 @@ rm -rf ${SOURCE}/packaging ############################################################################### tar cjf "${APPNAME}"_source_"${VERSION}".tar.bz2 "${APPNAME}"_source_"${VERSION}"/ ############################################################################### -# BUILDING BINARIES +# DEBIAN PACKAGE ENVIROMENT CREATION +############################################################################### +mkdir "${DEST_DEB}" +mkdir -p "${DEST_DEB}"/DEBIAN +mkdir -p "${DEST_DEB}"/usr/share/applications/ +# create desktop file and other debian related +echo "2.0" > "${DEST_DEB}"/DEBIAN/debian-binary +echo "[Desktop Entry] +Name=${APPNAME}-${VERSION} +Comment=game tuxanci +Exec=/usr/games/bin/${APPNAME}-${VERSION} +Terminal=false +Type=Application +Icon=/usr/games/share/tuxanci-svn/images/tuxanci.png +Encoding=UTF-8 +Categories=Game" > "${DEST_DEB}"/usr/share/applications/tuxanci.desktop +echo"Package: tuxanci +Version: ${VERSION} +Section: Game +Priority: optional +Depends: libc6 (>= 2.2.4-4), libsdl1.2debian (>= 1.2), libsdl-image1.2 (>= 1.2), libsdl-mixer1.2 (>= 1.2), libsdl-ttf2.0-0 (>= 2.0), gettext +Architecture: ${ARCH} +Installed-Size: 4993 +Maintainer: Tomas Chvatal <tomas.chvatal@gmail.com> +Description: Game tuxanci next generation version ${VERSION} + . + http://www.tuxanci.org" > "${DEST_DEB}"/DEBIAN/control +############################################################################### +# BUILDING DEBIAN PACKAGES ############################################################################### for Y in ${OPTIONS}; do echo "<******************************>" echo "<Building ${Y} ${ARCH}>" echo "<******************************>" +CMAKE_PARAMS="${CMAKE_PARAMS} -DCMAKE_INSTALL_PREFIX=/usr/games/" if [[ ${Y} == "server" ]]; then CMAKE_PARAMS="${CMAKE_PARAMS} -DServer=1" fi @@ -74,6 +104,29 @@ rm CMakeCache.txt || ( echo "I was unable to cleanup CMakeCache.txt"; exit 1; ) make clean >> "${LOG}" cmake . ${CMAKE_PARAMS} >> "${LOG}" || ( echo "${ERROR_MESSAGE}"; exit 1 ) make >> "${LOG}" || ( echo "${ERROR_MESSAGE}"; exit 1 ) +make install DESTDIR="${DEST_DEB}" >> "${LOG}" || ( echo "${ERROR_MESSAGE}"; exit 1 ) +cd "${DEST_DEB}"/ +`which strip` --strip-unneeded lib/tuxanci/* bin/* >> "${LOG}" +md5sum `find . -type f | awk '/.\// { print substr($0, 3) }'` > DEBIAN/md5sums +cd "${BUNDLE_PREFIX}" +dpkg-deb -b "${DEST_DEB}" ${APPNAME}_${VERSION}-1_${ARCH}.deb +done +CMAKE_PARAMS="-DBundle=1 -DNLS=1 -DTUXANCI_VERSION=${VERSION} -DCMAKE_BUILD_TYPE=Release" # duplicating due to override +############################################################################### +# BUILDING BINARIES +############################################################################### +for Y in ${OPTIONS}; do +echo "<******************************>" +echo "<Building ${Y} ${ARCH}>" +echo "<******************************>" +if [[ ${Y} == "server" ]]; then + CMAKE_PARAMS="${CMAKE_PARAMS} -DServer=1" +fi +cd "${SOURCE}" +rm CMakeCache.txt || ( echo "I was unable to cleanup CMakeCache.txt"; exit 1; ) +make clean >> "${LOG}" +cmake . ${CMAKE_PARAMS} >> "${LOG}" || ( echo "${ERROR_MESSAGE}"; exit 1 ) +make >> "${LOG}" || ( echo "${ERROR_MESSAGE}"; exit 1 ) make install DESTDIR="${D}_${Y}_${VERSION}-${ARCH}/" >> "${LOG}" || ( echo "${ERROR_MESSAGE}"; exit 1 ) cd "${D}"_"${Y}"_"${VERSION}"-"${ARCH}"/ `which strip` --strip-unneeded lib/tuxanci/* bin/* >> "${LOG}" @@ -102,7 +155,7 @@ done ############################################################################### echo "<What have i created :>" echo "<******************************>" -find ./ -maxdepth 1 -type f -name \*.tar.bz2 -print | while read FILE ; do +find ./ -maxdepth 1 -type f \( -name \*.tar.bz2 , -name *.deb \) -print | while read FILE ; do echo "FILE: ${FILE}" echo " SIZE: $(`which du` -h ${FILE} |`which awk` -F' ' '{print $1}')" echo " MD5SUM: $(`which md5sum` ${FILE} |`which awk` -F' ' '{print $1}')" |