#Maintainer: Thorsten Muehlfelder <thenktor(at)gmx.de>

pkgname=projectx
pkgver=20091001
pkgrel=2tm
arch=noarch
source=("get-new-src.sh" "http://thenktor.dyndns.org/packages/$pkgname/$pkgname-$pkgver.src.tar.gz")
url="http://www.lucike.info/page_projectx.htm"
docs=('ReadMe.txt' 'Copying')
# extradepends=('jre|jdk')

slackdesc=\
(
#|-----handy-ruler------------------------------------------------------|
"$pkgname - DVB demux tool"
"European digital radio & television uses the DVB standard to broadcast"
"it's data. Project X gives you a look behind the transmissions and"
"tries its best to handle & repair many stream types and shows what"
"went wrong on reception."
)

build() {
	cd $startdir/src/Project-X

	find . -type f -exec chmod 644 {} +
	sh ./build.sh || return 1

	# install files
	mkdir -p -m 755 $startdir/pkg/usr/share/projectx
	install -m 644 ProjectX.jar $startdir/pkg/usr/share/projectx || return 1
	cp -a lib $startdir/pkg/usr/share/projectx || return 1
	cp -a resources $startdir/pkg/usr/share/projectx || return 1

	# copy html docs
	mkdir -p -m 755 $startdir/pkg/usr/doc/$pkgname-$pkgver
	cp -a htmls $startdir/pkg/usr/share/projectx || return 1

	# copy the desktop file to destination
	mkdir -p -m 755 $startdir/pkg/usr/share/applications
	install -o root -g root -m 644 projectx.desktop $startdir/pkg/usr/share/applications || return 1
}