diff options
-rw-r--r-- | libre/hydrogen/PKGBUILD | 80 |
1 files changed, 55 insertions, 25 deletions
diff --git a/libre/hydrogen/PKGBUILD b/libre/hydrogen/PKGBUILD index 588840f4f..1ca4bf705 100644 --- a/libre/hydrogen/PKGBUILD +++ b/libre/hydrogen/PKGBUILD @@ -1,54 +1,84 @@ -# $Id$ +# Maintainer (Arch): David Runge <dave@sleepmap.de> +# Contributor (Arch): Rob Til Freedmen <rob.til.freedman@gmail.com> # Maintainer (Arch): Ray Rashif <schiv@archlinux.org> # Contributor (Arch): tobias <tobias@archlinux.org> -# Contributor (Arch): K. Piche <kpiche@rogers.com> -# Contributor (Arch): Giovanni Scafora <giovanni@archlinux.org> # Maintainer: Omar Vega Ramos <ovruni@gnu.org.pe> # Contributor: André Silva <emulatorman@hyperbola.info> # parabola changes and rationale: # - removed drumkits recommendation -# - added contributors from .contrib to PKGBUILD pkgname=hydrogen -pkgver=0.9.6.1 -pkgrel=4.parabola3 +pkgver=1.0.0beta1 +_beta=beta1 +pkgrel=1.par1 pkgdesc="An advanced drum machine, without nonfree drumkits recommendation" arch=('x86_64' 'i686' 'armv7h') -license=('GPL') +license=('GPL2') +groups=('pro-audio') url="http://www.hydrogen-music.org/" -depends=('libarchive' 'liblrdf' 'qt4' 'jack' 'libpulse') -optdepends=('rubberband') -makedepends=('cmake') -source=("https://github.com/hydrogen-music/hydrogen/archive/$pkgver.tar.gz") -md5sums=('527a44eec22fd31f55e6b3cf1089613d') +depends=('desktop-file-utils' 'hicolor-icon-theme' 'libarchive' 'liblrdf' +'liblo' 'portaudio' 'portmidi' 'libpulse' 'qt5-xmlpatterns') +makedepends=('cmake' 'cppunit' 'ladspa' 'python2' 'qt5-tools') +optdepends=('rubberband: Time stretch samples') +source=("${pkgname}-${pkgver}.tar.gz::https://github.com/${pkgname}-music/${pkgname}/archive/${pkgver/${_beta}/-${_beta}}.tar.gz") +sha512sums=('73963a9f400a4d9f6faca41f5f9af2c4b00ebefb16f394a78fe81f7aacb23acee49633803a484e91705da01cb59b4699133f618fac34f6caa7734bcc67bf4518') prepare() { - cd "$srcdir/$pkgname-$pkgver" - # Change to list with free licensed drumkits only sed -i -e 's|www[.]hydrogen-music[.]org/feeds/drumkit_list[.]php|repo.parabola.nu/other/hydrogen-libre/feeds/drumkit_list.php|'\ $(grep -rlI 'www[.]hydrogen-music[.]org/feeds/drumkit_list[.]php') + + mv -v "${pkgname}-${pkgver/${_beta}/-${_beta}}" "${pkgname}-${pkgver}" + cd "${pkgname}-${pkgver}" + # fix python2 shebang (only required for building) + sed -e 's/python/python2/' -i data/i18n/stats.py + # fix desktop file icon name + # https://github.com/hydrogen-music/hydrogen/issues/558 + sed -e "s/h2-icon/${pkgname}/" -i "linux/${pkgname}.desktop" + # fix man page location (seemingly fixed on HEAD) + sed -e 's|/man/|/share/man/|' -i CMakeLists.txt + # out-of-tree build + mkdir -v build } build() { - cd "$srcdir/$pkgname-$pkgver" - - # lash will have to wait until I bring it into [extra] --schiv - cmake . -DCMAKE_INSTALL_PREFIX=/usr \ - -DWANT_CPPUNIT=OFF \ - -DWANT_LRDF=ON + cd "${pkgname}-${pkgver}/build" + cmake -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DWANT_DEBUG=OFF \ + -DWANT_CPPUNIT=ON \ + -DWANT_LRDF=ON \ + -DWANT_PORTAUDIO=ON \ + -DWANT_PORTMIDI=ON \ + -DWANT_PULSEAUDIO=ON \ + .. make + # update translations + ( + cd ../data/i18n + ./updateTranslations.sh + ) } package() { - cd "$srcdir/$pkgname-$pkgver" - + cd "${pkgname}-${pkgver}/build" make DESTDIR="$pkgdir" install - # TODO: tell upstream to comply with freedesktop.org icon conventions - sed -i 's:Icon=h2-icon:Icon=/usr/share/hydrogen/data/img/gray/h2-icon.svg:' \ - "$pkgdir/usr/share/applications/$pkgname.desktop" + # install desktop file icon to correct location + # https://github.com/hydrogen-music/hydrogen/issues/558 + install -vDm 644 "${pkgdir}/usr/share/${pkgname}/data/img/gray/h2-icon.svg" \ + "${pkgdir}/usr/share/icons/hicolor/scalable/apps/${pkgname}.svg" + rm -rv "${pkgdir}/usr/share/pixmaps" + rm -rv "${pkgdir}/usr/share/${pkgname}/data/doc" + + # docs + install -vDm 644 ../{ChangeLog,DEVELOPERS,INSTALL.txt,README.txt} \ + -t "${pkgdir}/usr/share/doc/${pkgname}" + +# # clean up data dir +# # https://github.com/hydrogen-music/hydrogen/issues/559 + rm -v "$pkgdir/usr/share/${pkgname}/data/i18n/"*.{ts,py,sh} } # vim:set ts=2 sw=2 et: |