From 63f49739628ba18176880550c3d3f19eb6aa83a6 Mon Sep 17 00:00:00 2001 From: Denes Matetelki Date: Mon, 4 Jul 2011 15:26:17 +0200 Subject: [PATCH] create_deb.sh update --- other/create_deb.sh | 56 ++++++++++++++++++++++++++++----------------- 1 file changed, 35 insertions(+), 21 deletions(-) diff --git a/other/create_deb.sh b/other/create_deb.sh index 74197d2..5d9ad42 100755 --- a/other/create_deb.sh +++ b/other/create_deb.sh @@ -1,51 +1,65 @@ #!/bin/bash -EXPECTED_ARGS=1 -E_BADARGS=65 +# version="0.1" +version="0.2" +# version="master" -if [ $# -ne $EXPECTED_ARGS ] -then - echo "Usage: `basename $0` " - exit $E_BADARGS + + +if [ "$version" = "master" ]; then + packageversion="9999" +else + packageversion=$version fi -srcdir=$1 -packagedir="/tmp/qtmindmap-0.2" -tempdir="/tmp/qtmindmap-build" + +packagedir="/tmp/qtmindmap-${packageversion}" +tempdir="/tmp/qtmindmap-qtmindmap" currdir=`pwd` +# get source +wget -c http://gitorious.org/qtmindmap/qtmindmap/archive-tarball/${version} -O /tmp/qtmindmap-${packageversion}.tar.gz +cd /tmp +tar -xvf qtmindmap-${packageversion}.tar.gz + # compile -rm -rf $tempdir -mkdir $tempdir cd $tempdir -qmake $srcdir/qtmindmap.pro +qmake qtmindmap.pro make #copy rm -rf $packagedir -mkdir -p $packagedir/usr/bin -mkdir -p $packagedir/usr/share/applications -mkdir -p $packagedir/usr/share/pixmaps -mkdir -p $packagedir/usr/share/qtmindmap/i18n +mkdir -p $packagedir/usr/bin cp $tempdir/qtmindmap $packagedir/usr/bin/ -cp $srcdir/other/qtmindmap.desktop $packagedir/usr/share/applications/ -cp $srcdir/images/qtmindmap.svg $packagedir/usr/share/pixmaps/ -cp $tempdir/.qm/i18n/*.qm $packagedir/usr/share/qtmindmap/i18n/ + +if [ "$version" != "0.1" ]; then + mkdir -p $packagedir/usr/share/applications + mkdir -p $packagedir/usr/share/pixmaps + mkdir -p $packagedir/usr/share/qtmindmap/i18n + cp $tempdir/other/qtmindmap.desktop $packagedir/usr/share/applications/ + cp $tempdir/images/qtmindmap.svg $packagedir/usr/share/pixmaps/ + cp $tempdir/.qm/i18n/*.qm $packagedir/usr/share/qtmindmap/i18n/ +fi #package mkdir $packagedir/DEBIAN/ echo "Package: qtmindmap -Version: 0.2 +Version: ${packageversion} Section: base Priority: optional Architecture: all Depends: libqtcore4 (>= 4.6), libqtgui4 (>= 4.6), libqt4-svg (>= 4.6), libqt4-xml (>= 4.6) -Maintainer: Dénes Mátételki +Maintainer: Denes Matetelki Homepage: https://gitorious.org/qtmindmap Description: Mindmap software in Qt." > $packagedir/DEBIAN/control cd $currdir dpkg --build $packagedir + +#cleanup +rm /tmp/qtmindmap-${packageversion}.tar.gz +rm -rf $packagedir +rm -rf $tempdir