# Template file for 'tuxguitar' pkgname=tuxguitar version=1.5.2 revision=1 wrksrc="${pkgname}-${version}-src" hostmakedepends="apache-maven" makedepends="alsa-lib-devel fluidsynth-devel jack-devel" depends="virtual?java-runtime gtk+3 hicolor-icon-theme desktop-file-utils" short_desc="Multitrack guitar tablature editor and player" maintainer="John " license="LGPL-2.0-only" homepage="http://www.tuxguitar.com.ar/" distfiles="${SOURCEFORGE_SITE}/tuxguitar/tuxguitar-${version}-src.tar.gz" checksum=a9ade566752aa0ac72831a1cd0b18b85d302eca7934e2192ad875f51df755981 case $XBPS_TARGET_MACHINE in i686) _arch="x86" ;; x86_64) _arch="x86_64" ;; armv7l) _arch="armv7hl" ;; *) broken="package doesn't provide build function for other architectures" ;; esac do_build() { export MAVEN_OPTS="$MAVEN_OPTS -Duser.home=$wrksrc" export JAVA_HOME="/usr/lib/jvm/openjdk" PATH=$PATH:/usr/share/apache-maven/bin for _i in . TuxGuitar-{lib,gm-utils} \ build-scripts/{tuxguitar,native-modules/tuxguitar-{alsa,oss,jack,fluidsynth}}-linux-$_arch; do ( cd $_i mvn install ) done } post_build() { cat > tuxguitar <<_EOF #!/bin/sh -e cd /usr/share/tuxguitar exec ./tuxguitar.sh -Dorg.eclipse.swt.internal.gtk.cairoGraphics=false "\$@" _EOF } do_install() { vmkdir usr/share vcopy build-scripts/tuxguitar-linux-${_arch}/target/tuxguitar-${version}-linux-${_arch} usr/share/tuxguitar for _i in alsa oss jack fluidsynth; do vcopy build-scripts/native-modules/tuxguitar-${_i}-linux-${_arch}/target/build/* usr/share/tuxguitar/ done for _i in 16 24 32 48 64 96; do vmkdir usr/share/icons/hicolor/${_i}x${_i}/mimetypes vinstall TuxGuitar/share/skins/Lavender/icon-${_i}x${_i}.png 644 usr/share/icons/hicolor/${_i}x${_i}/apps tuxguitar.png for _j in audio-x-{tuxguitar,gtp,ptb}; do ln -s ../apps/tuxguitar.png ${DESTDIR}/usr/share/icons/hicolor/${_i}x${_i}/mimetypes/$_j.png done done vinstall misc/tuxguitar.xml 644 usr/share/mime/packages vinstall misc/tuxguitar.desktop 644 usr/share/applications vbin tuxguitar }