# Maintainer: Jesus E. pkgname=timidity++ pkgver=2.14.0 _debver=$pkgver _debrel=8 pkgrel=2 pkgdesc="A MIDI to WAVE converter and player" arch=('i686' 'x86_64') url='http://timidity.sourceforge.net' license=('GPL-2') depends=('flac' 'libao' 'libvorbis' 'portaudio' 'speex' 'jack') makedepends=('libxaw3d' 'gtk2' 'tk' 'libxaw' 'libjack' 'quilt') optdepends=('gtk2: for using the GTK+ interface' 'tk: for using the Tk interface' 'libxaw3d: for using the Xaw interface' 'sndio: for using the sndio audio output' 'freepats: additional files for MIDI audio synthesis') backup=('etc/timidity++/timidity.cfg' 'etc/conf.d/timidity') install=timidity.install source=(https://downloads.sourceforge.net/timidity/TiMidity++-${pkgver}.tar.xz https://deb.debian.org/debian/pool/main/t/timidity/timidity_${_debver}-${_debrel}.debian.tar.xz timidity.cfg timidity-jack.patch timidity-tk86.patch timidity-sndio.patch timidity.confd timidity.initd) sha512sums=('d8fc06fa36e4dd42de80c61943da4cd9aec5f8aaf31057a9ededa633d2d48e64c4e53391378d82a7a46ffe4f96c756b010ea9727270f80b134ae1f8bad535bd3' '3219c3f17b2b558643eb0c886984fba13d3e5954a7a0b9443910f601da7aea9205e4964545c589de70e937987e2fdbe0bd8b1b12f1fa0b76c9dc7cafdb17cd57' '054cd39bef913314e9901171566398af6280236531ac13ece683eaeb642c52b3280116adaa6328054c94bd79b0ab88c253281e386012a2c6d67f4b85c38e4859' '51c075da04aeedca4edecb5a7f1926ccb80637b550f8fafca6d68be466cd4353a77bbb832878941919ec354c279a6014403e995b9152a47a3817c99890a4afeb' 'f7c711fd7aaf924b4469f61780f8b6a282c11246e093b121597a098190ee3ab96964dcc0eb772dfe8232eb95bcfa8819e105eb0f7956b723f84a4df13e72ca98' '641900474a89d844aa6857d1f2cd42f2e732fda2a0d7032901e4c73f3345e8e8806b84a379a8bf190c4cc80a2245d7b11640d5163cc9aebfeaa413feff40d155' '63f11625298f214955d8d36690f18288c246c7701324be1e03d056dda145f2bd92f9fdd484061263cdd702260f8c808d9bbdb8c5a27a7a23ee7d1c08cb4dbfed' '5ce0f8fcd9da26383455ba3fb931f01a0c07d54b4c5b05d0a3bc338bea509078dd9c6b01a5cc8d4a320ebae9e620040aea9ee9ceed71ed393210b753a181ae88') prepare() { cd TiMidity++-${pkgver} if [[ ${pkgver%.*} = ${_debver%.*} ]]; then # Debian patches export QUILT_PATCHES=debian/patches export QUILT_REFRESH_ARGS='-p ab --no-timestamps --no-index' export QUILT_DIFF_ARGS='--no-timestamps' mv "$srcdir"/debian . quilt push -av else patch -p1 -i "${srcdir}/timidity-tk86.patch" fi patch -p1 -i "${srcdir}/timidity-jack.patch" patch -p1 -i "${srcdir}/timidity-sndio.patch" autoreconf -vfi } build() { if [ $(uname -s) = HyperbolaBSD ]; then _enable_ksnd=sun elif [ $(uname -o) = GNU/Linux ]; then _enable_ksnd=alsa fi cd TiMidity++-${pkgver} ./configure \ --prefix=/usr \ --mandir=/usr/share/man \ --with-default-path=/etc/timidity++/ \ --enable-server \ --enable-alsaseq \ --enable-spectrogram \ --enable-network \ --enable-xft \ --enable-audio=${_enable_ksnd},jack,sndio,ao,portaudio,flac,vorbis,speex \ --enable-dynamic=ncurses,tcltk,vt100,xaw,gtk make } package() { cd TiMidity++-${pkgver} make DESTDIR="${pkgdir}" install # configuration install -Dm644 "${srcdir}/timidity.cfg" "${pkgdir}/etc/timidity++/timidity.cfg" # services, only openrc for the moment install -Dm644 "${srcdir}/timidity.confd" "${pkgdir}/etc/conf.d/timidity" install -Dm755 "${srcdir}/timidity.initd" "${pkgdir}/etc/init.d/timidity" # license install -Dm644 COPYING -t "${pkgdir}/usr/share/licenses/${pkgname}" }