summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 066557ad443ad7e6de9de8cbe7f8504af6b806da (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
# Maintainer: Christopher Arndt <aur -at- chrisarndt -dot -de>

_pkgname=geonkick
pkgname="${_pkgname}-git"
pkgver=2.1.1.r820.8742ddb
pkgrel=1
pkgdesc="A free software percussion synthesizer (git version)"
arch=('i386' 'x86_64')
url="https://gitlab.com/iurie-sw/geonkick"
license=('GPL3')
groups=('pro-audio' 'lv2-plugins')
depends=('cairo' 'hicolor-icon-theme' 'libsndfile')
makedepends=('cmake' 'jack' 'lv2' 'rapidjson' 'redkite' 'sord')
optdepends=('jack: for stand-alone application')
provides=("${_pkgname}")
conflicts=("${_pkgname}")
source=("${_pkgname}::git+https://gitlab.com/iurie-sw/geonkick.git")
sha512sums=('SKIP')


pkgver() {
  cd "${srcdir}/${_pkgname}"
  local ver="$(grep 'geonkick VERSION' CMakeLists.txt | cut -d ' ' -f 3 | tr -d ')')"
  echo "$ver.r$(git rev-list --count HEAD).$(git rev-parse --short HEAD)"
}

prepare() {
  cd "${srcdir}/${_pkgname}/doc/examples"
  # extract drumkits
  for tarxz in *.tar.xz; do
    tar -xvJf "$tarxz"
  done
}

build() {
  cd "${srcdir}/${_pkgname}"
  mkdir -p build
  cd build
  cmake \
    -DCMAKE_BUILD_TYPE=Release \
    -DCMAKE_INSTALL_PREFIX=/usr \
    -DGKICK_REDKITE_SDK_PATH=/usr \
    ..
  make
}

package() {
  cd "${srcdir}/${_pkgname}"
  (
    cd build
    make DESTDIR="$pkgdir/" install
  )
  # desktop file
  install -vDm 644 "data/${_pkgname}.desktop" \
    -t "${pkgdir}/usr/share/applications"
  # example preset & kits
  install -vDm 644 doc/examples/*.{gkick,gkit} \
    -t "${pkgdir}/usr/share/${_pkgname}/presets"
  for directory in doc/examples/*; do
    if [[ -d "$directory" ]]; then
      install -vDm 644 "$directory/"*.{gkick,gkit} \
        -t "${pkgdir}/usr/share/${_pkgname}/presets/$(basename "$directory")"
    fi
  done
  # documentation
  install -vDm 644 README.md NEWS.md -t "${pkgdir}/usr/share/doc/${pkgname}"
}