#Maintainer: Dimitris Jemos <djemos~at~slackel~dot~gr>

#Mandatory
pkgname=hydrogen
pkgver=0.9.4
pkgrel=2dj
source=("http://downloads.sourceforge.net/project/$pkgname/Hydrogen/$pkgver%20Sources/$pkgname-$pkgver.tar.gz" "Fix_overloaded_QString_object.patch")
#Optional
docs=("AUTHORS" "COPYING" "ChangeLog" "DEVELOPERS" "INSTALL.txt" "README.txt" "COPYING." "TinyXML")
url=http://www.hydrogen-music.org/

slackdesc=\
(
 #|-----handy-ruler------------------------------------------------------|
"Hydrogen (advanced drum machine)"
"Hydrogen is an advanced drum machine for GNU/Linux. It's main goal"
"is to bring professional yet simple and intuitive pattern-based drum"
"programming."

"Homepage: http://www.hydrogen-music.org/"

)

build() {
cd $startdir/src/$pkgname-$pkgver || return 1
patch -p1 < ../Fix_overloaded_QString_object.patch || return 1
QTDIR=$QT4DIR scons lash=1  libarchive=1 prefix=/usr optflags="$CFLAGS" || return 1
QTDIR=$QT4DIR scons install DESTDIR=$startdir/pkg || return 1

mkdir -p $startdir/pkg/usr/share/icons/hicolor/48x48/apps || return 1
cp data/img/gray/icon48.png $startdir/pkg/usr/share/icons/hicolor/48x48/apps/h2-icon.png || return 1
}

# Doinst
doinst() {
if [ -x /usr/bin/update-desktop-database ]; then
  /usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1
fi

}