summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: c1838db95cb3759324a10c8a98ec57fb1a24d0f0 (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
72
73
74
75
76
77
78
79
80
81
82
# Maintainer: Fabio 'Lolix' Loli <fabio.loli@disroot.org> -> https://github.com/FabioLolix
# Contributor: ronalde <r.v.engelen+aur@gmail.com>
# Contributor: dexterlb <dexterlb@qtrp.org>

pkgname=roc-toolkit-git
pkgver=0.3.0.r0.g57b932b8
pkgrel=3
pkgdesc="Real-time audio streaming over network"
arch=(x86_64 i686 armv7h aarch64)
url="https://github.com/roc-streaming/roc-toolkit"
license=(MPL2)
provides=(roc-toolkit)
conflicts=(roc-toolkit roc)
replaces=(roc)
depends=(
  glibc
  gcc-libs
  libunwind
  libuv
  openfec
  speexdsp
)
makedepends=(
  alsa-lib
  cpputest
  gengetopt
  libpulse
  ragel
  scons
  sox
  git
)
optdepends=(
  'libpulse: for roc-conv, roc-receive and roc-send'
  'sox: for roc-conv, roc-receive and roc-send'
)
source=("git+https://github.com/roc-streaming/roc-toolkit.git")
sha256sums=('SKIP')

pkgver() {
  cd "roc-toolkit"
  git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
}

build() {
  local scons_options=(
    --prefix=/usr
    --libdir=/usr/lib
    --disable-openssl  # disable as it is not yet used
    --enable-tests
    --enable-examples
  )

  cd "roc-toolkit"
  scons "${scons_options[@]}"
}

check() {
  local scons_options=(
    --prefix=/usr
    --libdir=/usr/lib
    --disable-openssl  # disable as it is not yet used
    --enable-tests
    --enable-examples
  )

  cd "roc-toolkit"
  scons test "${scons_options[@]}"
}

package() {
  local scons_options=(
    --prefix=/usr
    --libdir=/usr/lib
  )

  cd "roc-toolkit"
  scons DESTDIR="$pkgdir/" "${scons_options[@]}" install

  install -Dm644 LICENSE "$pkgdir/usr/share/licenses/${pkgname}/LICENSE"
  install -Dm644 3rdparty/hedley/COPYING -t "$pkgdir/usr/share/licenses/${pkgname}/hedley.COPYING"
}