parent
aa7cb65609
commit
63f4973962
@ -1,51 +1,65 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
EXPECTED_ARGS=1
|
# version="0.1"
|
||||||
E_BADARGS=65
|
version="0.2"
|
||||||
|
# version="master"
|
||||||
|
|
||||||
if [ $# -ne $EXPECTED_ARGS ]
|
|
||||||
then
|
|
||||||
echo "Usage: `basename $0` <path to qtmindmap source>"
|
if [ "$version" = "master" ]; then
|
||||||
exit $E_BADARGS
|
packageversion="9999"
|
||||||
|
else
|
||||||
|
packageversion=$version
|
||||||
fi
|
fi
|
||||||
|
|
||||||
srcdir=$1
|
|
||||||
packagedir="/tmp/qtmindmap-0.2"
|
packagedir="/tmp/qtmindmap-${packageversion}"
|
||||||
tempdir="/tmp/qtmindmap-build"
|
tempdir="/tmp/qtmindmap-qtmindmap"
|
||||||
currdir=`pwd`
|
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
|
# compile
|
||||||
rm -rf $tempdir
|
|
||||||
mkdir $tempdir
|
|
||||||
cd $tempdir
|
cd $tempdir
|
||||||
qmake $srcdir/qtmindmap.pro
|
qmake qtmindmap.pro
|
||||||
make
|
make
|
||||||
|
|
||||||
#copy
|
#copy
|
||||||
rm -rf $packagedir
|
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 $tempdir/qtmindmap $packagedir/usr/bin/
|
||||||
cp $srcdir/other/qtmindmap.desktop $packagedir/usr/share/applications/
|
|
||||||
cp $srcdir/images/qtmindmap.svg $packagedir/usr/share/pixmaps/
|
if [ "$version" != "0.1" ]; then
|
||||||
cp $tempdir/.qm/i18n/*.qm $packagedir/usr/share/qtmindmap/i18n/
|
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
|
#package
|
||||||
mkdir $packagedir/DEBIAN/
|
mkdir $packagedir/DEBIAN/
|
||||||
|
|
||||||
echo "Package: qtmindmap
|
echo "Package: qtmindmap
|
||||||
Version: 0.2
|
Version: ${packageversion}
|
||||||
Section: base
|
Section: base
|
||||||
Priority: optional
|
Priority: optional
|
||||||
Architecture: all
|
Architecture: all
|
||||||
Depends: libqtcore4 (>= 4.6), libqtgui4 (>= 4.6), libqt4-svg (>= 4.6), libqt4-xml (>= 4.6)
|
Depends: libqtcore4 (>= 4.6), libqtgui4 (>= 4.6), libqt4-svg (>= 4.6), libqt4-xml (>= 4.6)
|
||||||
Maintainer: Dénes Mátételki <denes.matetelki@gmial.com>
|
Maintainer: Denes Matetelki <denes.matetelki@gmial.com>
|
||||||
Homepage: https://gitorious.org/qtmindmap
|
Homepage: https://gitorious.org/qtmindmap
|
||||||
Description: Mindmap software in Qt." > $packagedir/DEBIAN/control
|
Description: Mindmap software in Qt." > $packagedir/DEBIAN/control
|
||||||
|
|
||||||
cd $currdir
|
cd $currdir
|
||||||
dpkg --build $packagedir
|
dpkg --build $packagedir
|
||||||
|
|
||||||
|
#cleanup
|
||||||
|
rm /tmp/qtmindmap-${packageversion}.tar.gz
|
||||||
|
rm -rf $packagedir
|
||||||
|
rm -rf $tempdir
|
||||||
|
Loading…
Reference in new issue