summaryrefslogtreecommitdiff
path: root/libre/hydrogen/PKGBUILD
blob: 96ad3da80eae2962fadf8a2a90e1dda27ac1ff16 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
# Maintainer (arch): David Runge <dvzrv@archlinux.org>
# Contributor: Rob Til Freedmen <rob.til.freedman@gmail.com>
# Contributor: Ray Rashif <schiv@archlinux.org>
# Contributor: tobias <tobias@archlinux.org>
# Maintainer: Omar Vega Ramos <ovruni@gnu.org.pe>
# Contributor: André Silva <emulatorman@hyperbola.info>


# parabola changes and rationale:
#  - removed drumkits recommendation


pkgname=hydrogen
pkgver=1.1.0
pkgrel=2
pkgrel+=.parabola1
pkgdesc="An advanced drum machine"
pkgdesc+=", without nonfree drumkits recommendation"
arch=('x86_64')
arch+=('i686' 'armv7h')
license=('GPL2')
groups=('pro-audio')
url="http://www.hydrogen-music.org/"
depends=('gcc-libs' 'glibc' 'hicolor-icon-theme' 'qt5-base' 'qt5-xmlpatterns')
makedepends=('alsa-lib' 'cmake' 'jack' 'ladspa' 'libarchive' 'liblo' 'liblrdf'
'libpulse' 'libsndfile' 'portaudio' 'portmidi' 'python' 'qt5-tools')
checkdepends=('cppunit')
optdepends=('new-session-manager: for session management')
source=("${pkgname}-${pkgver}.tar.gz::https://github.com/${pkgname}-music/${pkgname}/archive/${pkgver}.tar.gz")
sha512sums=('116380be03f03a9294e278be5c7ede90fe088f21bf31db46a5e5df2684d11676e518200e6c4a187063c769f5b97950af9602b9b2694ca37788f73a2666265cc8')
b2sums=('8008336d2199bf36d9efca8875217e4a5f3d66c0274e25334525292e7864ca1dc4da75f86cbba981dfdbc19a3dbafebff503ce1ef597adae56fc467b44611a19')


prepare() {
  # 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')
}

build() {
  cd "${pkgname}-${pkgver}"
  cmake -DCMAKE_INSTALL_PREFIX='/usr' \
        -DCMAKE_BUILD_TYPE='None' \
        -DWANT_DEBUG=OFF \
        -DWANT_CPPUNIT=ON \
        -DWANT_LRDF=ON \
        -DWANT_PORTAUDIO=ON \
        -DWANT_PORTMIDI=ON \
        -DWANT_PULSEAUDIO=ON \
        -Wno-dev \
        -B build \
        -S .
  make VERBOSE=1 -C build
  # update translations
  (
    cd data/i18n
    ./updateTranslations.sh
  )
}

package() {
  depends+=('libarchive.so' 'libasound.so' 'liblo.so' 'libjack.so' 'liblrdf.so'
  'liblo.so' 'libportaudio.so' 'libportmidi.so' 'libpulse.so' 'libsndfile.so')
  cd "${pkgname}-${pkgver}"
  make DESTDIR="$pkgdir" install -C build
  # docs
  install -vDm 644 {ChangeLog,DEVELOPERS,INSTALL.md,README.md} \
    -t "${pkgdir}/usr/share/doc/${pkgname}"
}

# vim:set ts=2 sw=2 et: