gtk/tuxguitar/PKGBUILD

84 lines
2.4 KiB
Bash

pkgname=tuxguitar
pkgver=1.3.2
pkgrel=2
_jdk=java-8-openjdk
pkgdesc="multitrack guitar tablature editor and player"
arch=('x86_64')
url="http://sourceforge.net/projects/tuxguitar"
license=('LGPL')
depends=('java-runtime' 'swt-extra' 'alsa-lib')
makedepends=('unzip' 'zip' 'apache-ant' 'jack' 'fluidsynth' 'maven')
install=$pkgname.install
source=("http://downloads.sourceforge.net/project/$pkgname/TuxGuitar/TuxGuitar-$pkgver/$pkgname-$pkgver-src.tar.gz"
"http://chakra.sourceforge.net/sources/$pkgname/TuxGuitar-Oxygen.tar.gz"
"$pkgname.desktop"
"$pkgname.xml")
md5sums=('ba436b4558dc3ca054b395d8d7e38c50'
'7b2a6ffbf4fc6bcf4ed8e7453dd1bb52'
'fa9d98c32f4dae2f80ade4aa1e22c3a3'
'59ce4eb8dcc0d0dde81e6cf2820aa9b0')
prepare() {
cd $srcdir
cat >gcj <<EOF
#!/bin/sh
echo "/usr/lib/jvm/java-8-openjdk/include -I/usr/lib/jvm/java-8-openjdk/include/linux"
EOF
chmod 0755 gcj
sed -i 's|https://swt-repo.googlecode.com/svn/repo/|http://maven-eclipse.github.io/maven|' tuxguitar-$pkgver-src/pom.xml
}
build() {
export PATH=$srcdir:$PATH
export MAVEN_OPTS="$MAVEN_OPTS -Duser.home=$srcdir"
# tuxguitar
cd $srcdir/tuxguitar-$pkgver-src/build-scripts/tuxguitar-linux-$arch
mvn install
for i in TuxGuitar-lib TuxGuitar-gm-utils; do
cd $srcdir/tuxguitar-$pkgver-src/$i
mvn install
done
cd $srcdir/tuxguitar-$pkgver-src
mvn install
# native modules
for i in alsa oss jack fluidsynth; do
cd $srcdir/tuxguitar-$pkgver-src/build-scripts/native-modules/tuxguitar-$i-linux-$arch
mvn install
done
}
package() {
mkdir -p $pkgdir/usr/{bin,share}
cd $srcdir/tuxguitar-$pkgver-src/build-scripts/tuxguitar-linux-$arch
# tuxguitar
cp -a target/tuxguitar-$pkgver-linux-$arch $pkgdir/usr/share/tuxguitar
cat >$pkgdir/usr/bin/tuxguitar <<EOF
#!/bin/sh
cd /usr/share/tuxguitar && exec ./tuxguitar.sh "\$@"
EOF
chmod 0755 $pkgdir/usr/bin/tuxguitar
# native modules
for i in alsa oss jack fluidsynth; do
cp -a $srcdir/tuxguitar-$pkgver-src/build-scripts/native-modules/tuxguitar-$i-linux-$arch/target/build/* $pkgdir/usr/share/tuxguitar/
done
# desktop files
install -D -m0644 $srcdir/tuxguitar.xml $pkgdir/usr/share/mime/packages/tuxguitar.xml
install -D -m0644 $srcdir/tuxguitar.desktop $pkgdir/usr/share/applications/tuxguitar.desktop
# Oxygen theme
cp -rf $srcdir/TuxGuitar-Oxygen $pkgdir/usr/share/tuxguitar/share/skins/
}