summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 2698283e8c2b771e20082868216ae809be599e66 (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
# Maintainer: George Rawlinson <grawlinson@archlinux.org>

pkgname=cacophony
pkgver=0.1.2
pkgrel=1
pkgdesc='A minimalist and ergonomic MIDI sequencer'
arch=('x86_64')
url='https://subalterngames.com/cacophony'
license=('MIT')
depends=('glibc' 'gcc-libs' 'alsa-lib' 'libspeechd')
makedepends=('git' 'rust' 'clang')
options=('!lto')
_commit='cdbb7bfad550618d973b109f408e4e38709e3496'
source=("$pkgname::git+https://github.com/subalterngames/cacophony")
b2sums=('SKIP')

pkgver() {
  cd "$pkgname"

  git describe --tags | sed 's/^v//'
}

prepare() {
  cd "$pkgname"

  # download dependencies
  cargo fetch --locked --target "$CARCH-unknown-linux-gnu"
}

build() {
  cd "$pkgname"

  cargo build --frozen --release
}

package() {
  cd "$pkgname"

  # binary
  install -vDm755 -t "$pkgdir/usr/bin" "target/release/$pkgname"

  # license
  install -vDm644 -t "$pkgdir/usr/share/licenses/$pkgname" LICENSE
}