# Maintainer: Balló György <ballogyor+arch at gmail dot com>
# Contributor: Tobias Powalowski <tpowa@archlinux.org>
pkgbase=spandsp
pkgname=(spandsp spandsp-docs)
pkgver=0.0.6
pkgrel=5
pkgdesc='Low-level signal processing library that modulates and demodulates signals commonly used in telephony'
arch=('x86_64' 'armv7h')
url='https://www.soft-switch.org/'
license=('LGPL-2.1-only')
depends=('glibc' 'libtiff')
makedepends=('docbook-xsl' 'doxygen')
source=("https://www.soft-switch.org/downloads/$pkgbase/$pkgbase-$pkgver.tar.gz")
b2sums=('6ee95501473d5758c9ff96580bb51222f49a230dc6a5f52f5a852781cbb70079bb07f9d7224f5c7ea91c0dd617fa543a37518f68875c76a44b3be1415aece696')
prepare() {
cd $pkgbase-$pkgver
autoreconf -fi
}
build() {
cd $pkgbase-$pkgver
./configure --prefix=/usr --enable-doc
sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
make
}
package_spandsp() {
cd $pkgbase-$pkgver
make DESTDIR="$pkgdir" install
}
package_spandsp-docs() {
pkgdesc='Developer documentation for spandsp'
depends=()
cd $pkgbase-$pkgver
install -dm755 "$pkgdir/usr/share/doc/$pkgbase"
cp -r doc/api/html "$pkgdir/usr/share/doc/$pkgbase/"
}