Commit 850b9cd8 authored by Manuel's avatar Manuel

Add tuxguitar

parent 9a930ede
pkgname=swt
pkgver=4.2.1
pkgrel=1
_date=201209141800
pkgdesc='An open source widget toolkit for Java'
arch=('x86_64')
url='http://www.eclipse.org/swt/'
license=('EPL')
depends=('java-runtime>=6' 'gtk2>=2.20.1' 'libxtst')
optdepends=('mesa' 'glu' 'libwebkit-qtk2')
makedepends=('java-environment' 'libxtst' 'mesa' 'glu' 'unzip' 'pkgconfig' 'libwebkit-gtk2' 'apache-ant')
source=(http://archive.eclipse.org/eclipse/downloads/drops4/R-${pkgver}-${_date}/swt-${pkgver}-gtk-linux-x86_64.zip
build-swt.xml)
sha256sums=('e89e330df24ca72c57a381e81590293ce3f475d855258183179436bd5dcd85c8'
'6bb48007a95e3d8c6b577cc9cc4b61a51ce928b04f4fcd393cf72f8f727fe923')
build() {
cd ${srcdir}
unzip -oq src.zip -d src
. /etc/profile.d/openjdk.sh
. /etc/profile.d/apache-ant.sh
# Shared objects
cd src
./build.sh
# SWT jar
ant -f ../build-swt.xml compile
}
package() {
cd ${srcdir}/src
# Shared objects
export OUTPUT_DIR=${pkgdir}/extra/usr/lib
install -dm755 ${OUTPUT_DIR}
make -f make_linux.mak install
# SWT jar
ant -f ../build-swt.xml jar
install -Dm755 ../swt.jar ${pkgdir}/extra/usr/share/java/swt-${pkgver}.jar
ln -s swt-${pkgver}.jar ${pkgdir}/extra/usr/share/java/swt.jar
}
<project name="SWT" default="jar" basedir=".">
<property name="src" location="."/>
<property name="build" location="build"/>
<target name="init">
<tstamp/>
<mkdir dir="${build}"/>
</target>
<target name="compile" depends="init" description="Compile the SWT toolset">
<javac srcdir="${src}" destdir="${build}" target="1.6" />
</target>
<target name="jar">
<jar destfile="swt.jar" basedir="${build}"/>
</target>
</project>
pkgname=tuxguitar
pkgver=1.2
pkgrel=1
_jdk=java-7-openjdk
pkgdesc="multitrack guitar tablature editor and player"
arch=('x86_64')
#url="http://www.herac.com.ar/contenidos/tuxguitar.html"
url="http://sourceforge.net/projects/tuxguitar"
license=('LGPL')
depends=('java-runtime' 'swt' 'alsa-lib')
makedepends=('unzip' 'zip' 'apache-ant' 'jack' 'fluidsynth')
install=tuxguitar.install
source=(tuxguitar-src-$pkgver.tar.gz::http://sourceforge.net/projects/tuxguitar/files/TuxGuitar/TuxGuitar-$pkgver/tuxguitar-src-$pkgver.tar.gz/download
http://chakra.sourceforge.net/sources/tuxguitar/TuxGuitar-Oxygen.tar.gz
tuxguitar.desktop \
tuxguitar.xml)
md5sums=('f41ed20e77c6c3d8968991a29c71b912'
'7b2a6ffbf4fc6bcf4ed8e7453dd1bb52'
'63f9ca355a7f24f6c4d652179770afb4'
'59ce4eb8dcc0d0dde81e6cf2820aa9b0')
build() {
cd $srcdir/tuxguitar-src-$pkgver
export CLASSPATH=/extra/usr/share/java/swt.jar:$CLASSPATH
(cd TuxGuitar/ && ant)
(cd TuxGuitar-alsa/ && ant)
(cd TuxGuitar-fluidsynth/ && ant)
(cd TuxGuitar-jack/ && ant)
(cd TuxGuitar-oss/ && ant)
(cd TuxGuitar-compat/ && ant)
(cd TuxGuitar-gtp/ && ant)
(cd TuxGuitar-ptb/ && ant)
(cd TuxGuitar-tef/ && ant)
(cd TuxGuitar-midi/ && ant)
(cd TuxGuitar-lilypond/ && ant)
(cd TuxGuitar-musicxml/ && ant)
(cd TuxGuitar-ascii/ && ant)
(cd TuxGuitar-converter/ && ant)
(cd TuxGuitar-tray/ && ant)
(cd TuxGuitar-community/ && ant)
(cd TuxGuitar-gervill/ && ant)
(cd TuxGuitar-jsa/ && ant)
# alsa
pushd TuxGuitar-alsa/jni
gcc -I/usr/lib/jvm/${_jdk}/include -I/usr/lib/jvm/${_jdk}/include/linux -fPIC \
-c -o org_herac_tuxguitar_player_impl_midiport_alsa_MidiSystem.o \
org_herac_tuxguitar_player_impl_midiport_alsa_MidiSystem.c
gcc -shared -o libtuxguitar-alsa-jni.so org_herac_tuxguitar_player_impl_midiport_alsa_MidiSystem.o -L/usr/lib -lasound
popd
# oss
pushd TuxGuitar-oss/jni
gcc -I/usr/lib/jvm/${_jdk}/include -I/usr/lib/jvm/${_jdk}/include/linux -fPIC \
-c -o org_herac_tuxguitar_player_impl_midiport_oss_MidiSystem.o \
org_herac_tuxguitar_player_impl_midiport_oss_MidiSystem.c
gcc -shared -o libtuxguitar-oss-jni.so org_herac_tuxguitar_player_impl_midiport_oss_MidiSystem.o -L/usr/lib
popd
# jack
pushd TuxGuitar-jack/jni
gcc -I/usr/lib/jvm/${_jdk}/include -I/usr/lib/jvm/${_jdk}/include/linux -fPIC \
-c -o org_herac_tuxguitar_jack_JackClient.o \
org_herac_tuxguitar_jack_JackClient.c
gcc -shared -o libtuxguitar-jack-jni.so org_herac_tuxguitar_jack_JackClient.o -L/usr/lib -ljack
popd
# fluidsynth
pushd TuxGuitar-fluidsynth/jni
gcc -I/usr/lib/jvm/${_jdk}/include -I/usr/lib/jvm/${_jdk}/include/linux -fPIC \
-c -o org_herac_tuxguitar_player_impl_midiport_fluidsynth_MidiSynth.o \
org_herac_tuxguitar_player_impl_midiport_fluidsynth_MidiSynth.c
gcc -shared -o libtuxguitar-fluidsynth-jni.so org_herac_tuxguitar_player_impl_midiport_fluidsynth_MidiSynth.o -L/usr/lib -lfluidsynth
popd
}
package() {
cd $srcdir/tuxguitar-src-$pkgver
mkdir -p $pkgdir/extra/usr/share/tuxguitar
mkdir -p $pkgdir/extra/usr/bin
cp -r TuxGuitar/share $pkgdir/extra/usr/share/tuxguitar/
find -name \*.jar -exec sh -c 'cp {} '$pkgdir'/extra/usr/share/tuxguitar/share/plugins/`basename {}`' \;
mv $pkgdir/extra/usr/share/tuxguitar/share/plugins/tuxguitar.jar $pkgdir/extra/usr/share/tuxguitar/
cp TuxGuitar/tuxguitar $pkgdir/extra/usr/share/tuxguitar/
# alsa
pushd TuxGuitar-alsa/jni
install -D -m0755 libtuxguitar-alsa-jni.so $pkgdir/extra/usr/lib/tuxguitar/libtuxguitar-alsa-jni.so
mkdir -p $pkgdir/extra/usr/share/tuxguitar/lib
ln -s /usr/lib/tuxguitar/libtuxguitar-alsa-jni.so $pkgdir/extra/usr/share/tuxguitar/lib/libtuxguitar-alsa-jni.so
popd
# oss
pushd TuxGuitar-oss/jni
install -D -m0755 libtuxguitar-oss-jni.so $pkgdir/extra/usr/lib/tuxguitar/libtuxguitar-oss-jni.so
mkdir -p $pkgdir/exthttp://paste.chakra-project.org/4544/ra/usr/share/tuxguitar/lib
ln -s /usr/lib/tuxguitar/libtuxguitar-oss-jni.so $pkgdir/extra/usr/share/tuxguitar/lib/libtuxguitar-oss-jni.so
popd
# jack
pushd TuxGuitar-jack/jni
install -D -m0755 libtuxguitar-jack-jni.so $pkgdir/extra/usr/lib/tuxguitar/libtuxguitar-jack-jni.so
mkdir -p $pkgdir/extra/usr/share/tuxguitar/lib
ln -s /usr/lib/tuxguitar/libtuxguitar-jack-jni.so $pkgdir/extra/usr/share/tuxguitar/lib/libtuxguitar-jack-jni.so
popd
# fluidsynth
pushd TuxGuitar-fluidsynth/jni
install -D -m0755 libtuxguitar-fluidsynth-jni.so $pkgdir/extra/usr/lib/tuxguitar/libtuxguitar-fluidsynth-jni.so
mkdir -p $pkgdir/extra/usr/share/tuxguitar/lib
ln -s /usr/lib/tuxguitar/libtuxguitar-fluidsynth-jni.so $pkgdir/extra/usr/share/tuxguitar/lib/libtuxguitar-fluidsynth-jni.so
popd
unset CLASSPATH
cd $pkgdir/extra/usr/bin
cat >tuxguitar << EOF
#!/bin/sh
export CLASSPATH=/extra/usr/share/java/swt.jar:\$CLASSPATH
export LD_LIBRARY_PATH=/extra/usr/lib:/extra/usr/lib/tuxguitar:\$LD_LIBRARY_PATH
cd /extra/usr/share/$pkgname
exec /extra/usr/share/$pkgname/tuxguitar "\$1" "\$2" "\$3" "\$4" "\$5" "\$6" "\$7" "\$8" "\$9"
EOF
chmod 755 tuxguitar
install -D -m0644 $srcdir/tuxguitar.xml $pkgdir/extra/usr/share/mime/packages/tuxguitar.xml
install -D -m0644 $srcdir/tuxguitar.desktop $pkgdir/extra/usr/share/applications/tuxguitar.desktop
# Oxygen theme
cp -rf $srcdir/TuxGuitar-Oxygen $pkgdir/extra/usr/share/tuxguitar/share/skins/
}
[Desktop Entry]
Version=1.0
Name=tuxguitar
Comment=Edit, playback guitar tablatures
Comment[fr]=Edite, joue des tablatures de guitare
Comment[es]=Edita, reproduce tablaturas de guitarra
Icon=tuxguitar.png
Terminal=false
Type=Application
Categories=Application;AudioVideo;Audio;
Exec=tuxguitar %F
MimeType=audio/x-tuxguitar;audio/x-gtp;audio/x-ptb;
#eof "$Id: tuxguitar.desktop,v 1.2 2008/09/15 07:54:28 sergej Exp $"
post_install() {
[ -x `which update-mime-database` ] && update-mime-database /usr/share/mime
[ -x `which update-desktop-database` ] && update-desktop-database
/bin/true
}
post_upgrade() {
[ -x `which update-mime-database` ] && update-mime-database /usr/share/mime
[ -x `which update-desktop-database` ] && update-desktop-database
/bin/true
}
<?xml version="1.0" encoding="UTF-8"?>
<mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info">
<mime-type type="audio/x-tuxguitar">
<comment>TuxGuitar file</comment>
<glob pattern="*.tg"/>
</mime-type>
<mime-type type="audio/x-gtp">
<comment>GuitarPro file</comment>
<glob pattern="*.gtp"/>
<glob pattern="*.gp3"/>
<glob pattern="*.gp4"/>
<glob pattern="*.gp5"/>
</mime-type>
<mime-type type="audio/x-ptb">
<comment>PowerTab file</comment>
<glob pattern="*.ptb"/>
</mime-type>
</mime-info>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment