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

_pkgname=faustfilters
pkgname="${_pkgname}-git"
pkgver=0.3.0.r0.g5d74237
pkgrel=1
pkgdesc="A collection of virtual-analog filter plugins (git version)"
arch=('i686' 'x86_64')
url="https://github.com/SpotlightKid/${_pkgname}"
license=('MIT')
depends=('gcc-libs')
makedepends=('git')
groups=('pro-audio' 'ladspa-plugins' 'lv2-plugins' 'vst-plugins')
provides=("${_pkgname}" "${_pkgname}=${pkgver//.r*/}")
conflicts=("${_pkgname}")
source=("${_pkgname}::git+https://github.com/SpotlightKid/${_pkgname}.git"
        'dpf::git+https://github.com/DISTRHO/DPF.git')
md5sums=('SKIP' 'SKIP')

pkgver() {
  cd "${srcdir}/${_pkgname}"

  (
    set -o pipefail
    git describe --long --tags 2>/dev/null | sed -e 's/^v//' -e 's/\([^-]*-g\)/r\1/;s/-/./g' ||
    printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
  )
}

prepare() {
  cd "${srcdir}/${_pkgname}"

  git submodule init
  git config submodule.dpf.url "${srcdir}/dpf"
  git submodule update
}

build() {
  cd "${srcdir}/${_pkgname}"

  make
}

package() {
  cd "${srcdir}/${_pkgname}"

  make DESTDIR="${pkgdir}" PREFIX=/usr install
  # install documentation
  install -Dm644 README.md -t "${pkgdir}/usr/share/doc/${pkgname}/"
  # install license file
  install -Dm644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}/"
}