summaryrefslogtreecommitdiff
path: root/libre/hydrogen/PKGBUILD
blob: a049d12439854e23bbbf5ef77835ea15bac9e071 (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
# 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.0.2
pkgrel=1
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=('7466b7ef1da4a078d67e1cab8744b2e0c3c048bb55e1febd22023c591ed9e2bf1cea41adc38a775a2ac60978735517a92df404d5ca8bb13603ea68c8da70daa9')
b2sums=('a4210e666b11e173eb0e02728f601ac9811941b558096ae76f3ad45b91c5db1ff942cddd536a50f8f2f456871d69f3a6c52d53c926f4547f13783ccbb4fc250d')

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: