PKGBUILD 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. # Maintainer (arch): David Runge <dvzrv@archlinux.org>
  2. # Contributor: Rob Til Freedmen <rob.til.freedman@gmail.com>
  3. # Contributor: Ray Rashif <schiv@archlinux.org>
  4. # Contributor: tobias <tobias@archlinux.org>
  5. # Maintainer: Omar Vega Ramos <ovruni@gnu.org.pe>
  6. # Contributor: André Silva <emulatorman@hyperbola.info>
  7. # Contributor: bill-auger <bill-auger@programmer.net>
  8. # parabola changes and rationale:
  9. # - Offer only freely-licensed drumkit downloads from parabola
  10. pkgname=hydrogen
  11. pkgver=1.1.1
  12. pkgrel=2
  13. pkgrel+=.parabola1
  14. pkgdesc="An advanced drum machine"
  15. arch=(x86_64)
  16. arch+=(armv7h i686)
  17. url="http://www.hydrogen-music.org/"
  18. license=(GPL2)
  19. groups=(pro-audio)
  20. depends=(
  21. gcc-libs
  22. glibc
  23. hicolor-icon-theme
  24. qt5-base
  25. qt5-xmlpatterns
  26. )
  27. makedepends=(
  28. alsa-lib
  29. cmake
  30. jack
  31. ladspa
  32. libarchive
  33. liblo
  34. liblrdf
  35. libpulse
  36. libsndfile
  37. portaudio
  38. portmidi
  39. python
  40. qt5-tools
  41. )
  42. checkdepends=(cppunit)
  43. optdepends=('new-session-manager: for session management')
  44. source=(https://github.com/$pkgname-music/$pkgname/archive/$pkgver/$pkgname-$pkgver.tar.gz)
  45. sha512sums=('c5e6bd713a0f9ef3b30bf0ae00bc41fea7494c20342c14c9f41ec05d1fdd3be721ffc3ff92bacd011e3b39a68022ea04daf55e60d334f64a00abef17d892cd37')
  46. b2sums=('52f6f61fc6e247875688dcea2290d92eb7bc85910620f0adcb52506d587b02dcaec6e2ecb72c77cf4eb3134534c75fc64bc4dd76a63f886cc6ea07d9b8812089')
  47. prepare() {
  48. # Offer only freely-licensed drumkits
  49. local sed_rx='s|hydrogen-music[.]org/feeds/drumkit_list[.]php|repo.parabola.nu/other/hydrogen-libre/feeds/drumkit_list.php|'
  50. for f in $(grep -rlI 'hydrogen-music[.]org/feeds/drumkit_list[.]php' $pkgname-$pkgver/)
  51. do sed -i -e "${sed_rx}" ${f}
  52. done
  53. }
  54. build() {
  55. local cmake_options=(
  56. -B build
  57. -D CMAKE_INSTALL_PREFIX=/usr
  58. -D CMAKE_BUILD_TYPE=None
  59. -D WANT_DEBUG=OFF
  60. -D WANT_CPPUNIT=ON
  61. -D WANT_LRDF=ON
  62. -D WANT_PORTAUDIO=ON
  63. -D WANT_PORTMIDI=ON
  64. -D WANT_PULSEAUDIO=ON
  65. -S $pkgname-$pkgver
  66. -W no-dev
  67. )
  68. cmake "${cmake_options[@]}"
  69. cmake --build build --verbose
  70. # update translations
  71. (
  72. cd $pkgname-$pkgver/data/i18n
  73. ./updateTranslations.sh
  74. )
  75. }
  76. check() {
  77. ctest --test-dir build --output-on-failure
  78. }
  79. package() {
  80. depends+=(
  81. alsa-lib libasound.so
  82. jack libjack.so
  83. libarchive libarchive.so
  84. liblo liblo.so
  85. liblrdf liblrdf.so
  86. libpulse libpulse.so
  87. libsndfile libsndfile.so
  88. portaudio libportaudio.so
  89. portmidi libportmidi.so
  90. )
  91. DESTDIR="$pkgdir" cmake --install build
  92. install -vDm 644 $pkgname-$pkgver/{ChangeLog,DEVELOPERS,INSTALL.md,README.md} -t "$pkgdir/usr/share/doc/$pkgname/"
  93. }