summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: f4722c0509441a74556fb539f081e5d5c6249d70 (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
# Maintainer: Clarence <xjh.azzbcc@gmail.com>
_pkgname=spandsp
pkgname=(${_pkgname}-fs ${_pkgname}-docs)
pkgver=3.0.0
pkgrel=1
pkgdesc="A DSP library for telephony (FreeSWITCH version)"
arch=('x86_64')
url="https://github.com/freeswitch/spandsp"
license=('LGPL' 'GPL')
makedepends=('gawk' 'sox' 'fftw' 'doxygen' 'netpbm')
source=("git+https://github.com/freeswitch/$_pkgname")
sha256sums=('SKIP')

pkgver() {
  cd "$_pkgname"
  awk '/^Version:/ { print $2 }' spandsp.spec
}

build() {
  cd "$_pkgname"
  ./autogen.sh
  ./configure --prefix=/usr --disable-static --enable-tests --enable-doc
  make -C src
}

check() {
  cd "$_pkgname"
  make check
}

package_spandsp-fs() {
  depends=('libtiff')
  optdepends=('spandsp-docs: Documentation')
  provides=('spandsp')
  conflicts=('spandsp')

  cd "$_pkgname"
  make DESTDIR="$pkgdir" -C src install
  make DESTDIR="$pkgdir" install-pkgconfigDATA
}

package_spandsp-docs() {
  pkgdesc="A DSP library for telephony documentation (FreeSWITCH version)"

  cd "$_pkgname"
  make -C doc

  install -dm755 "${pkgdir}/usr/share/doc/$_pkgname/html"
  cp -r "doc/api/html" "${pkgdir}/usr/share/doc/$_pkgname/html/api"
  cp -r "doc/t38_manual" "${pkgdir}/usr/share/doc/$_pkgname/html/t38_manual"
}