From 4ae3f211cda0acdb2d5e4192a2bc8da733fefa1e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9gory=20Soutad=C3=A9?= Date: Mon, 7 Mar 2011 09:06:37 +0100 Subject: [PATCH] Fixs for Debian packaging --- tools/package.sh | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/tools/package.sh b/tools/package.sh index 95a8eb5..b66dde8 100755 --- a/tools/package.sh +++ b/tools/package.sh @@ -5,8 +5,9 @@ DATE=`date +%d.%m.%Y` VERSION=`cat src/controller/KissCount.h | grep APP_VERSION | cut -d\" -f2` DIR="KissCount_build_${VERSION}_${DATE}_${ARCH}" FILE="$DIR.tar.bz2" + +# Debian packaging DEB_DIR="kisscount-${VERSION}" -DEB_FILE="$DEB_DIR.tar.gz" DEBEMAIL=soutade@gmail.com DEBFULLNAME="Grégory Soutadé" export DEBEMAIL DEBFULLNAME @@ -25,6 +26,8 @@ tar -jcf "$FILE" "$DIR" rm -rf "$DIR" # Debian packaging +if [ -d "debian" ] ; then +DEB_FILE="kisscount_${VERSION}-1_${ARCH}.deb" rm -rf "$DEB_DIR" "$DEB_FILE" mkdir -p "$DEB_DIR/lib" cp -r lib/freechart/lib/*.so* lib/wxsqlite3-1.9.9/lib/*.so* "$DEB_DIR/lib" @@ -37,7 +40,13 @@ ln -s ../../src #sed -i s/i686/$ARCH/g debian/control #dh_make -f "../$DEB_FILE" --copyright gpl3 --email $DEBEMAIL -s [ "${ARCH}" == "x86_64" ] && ARCH="amd64" +[ "${ARCH}" == "i686" ] && ARCH="i386" debuild -us -uc -b -i -a${ARCH} cd - +fi -echo "Packaged into $FILE and kisscount_${VERSION}-1_${ARCH}.deb !" \ No newline at end of file +if [ -z "$DEB_FILE" ] ; then + echo "Packaged into $FILE !" +else + echo "Packaged into $FILE and $DEB_FILE !" +fi