archrelease: copy trunk to extra-x86_64
[arch-packages.git] / zita-resampler / trunk / PKGBUILD
blobac14fc67bbb406e3da1d606ac9a62aa7fbf5ce95
1 # Maintainer: David Runge <dvzrv@archlinux.org>
2 # Contributor: speps <speps at aur dot archlinux dot org>
3 # Contributor: Philipp Überbacher <murks at lavabit dot com>
5 pkgbase=zita-resampler
6 pkgname=(zita-resampler zita-resampler-docs)
7 pkgver=1.10.1
8 pkgrel=1
9 pkgdesc="A C++ library for resampling audio signals"
10 arch=(x86_64)
11 url="https://kokkinizita.linuxaudio.org/linuxaudio"
12 license=(GPL3)
13 makedepends=(gcc-libs glibc libsndfile)
14 source=($url/downloads/$pkgname-$pkgver.tar.xz)
15 sha512sums=('ba95286b0744df393194f4f94a8aad62f6c088cf80f6be71482ed55beef6503a9bab6644f2565b69002247611fcf0fb6561fc0072578466a0133311721b43cf5')
16 b2sums=('b8871899b7e6cac9b46df3c45c5bb1d8e9c9edd41bcbc5944098d9c4eee2ff4e4d216f97b3bfa96ac43082b5333de26201d6cba9eaa152efd20e8c5017478391')
18 prepare() {
19   cd $pkgname-$pkgver
20   # remove march=native
21   sed -e '/native/d' -i {source,apps}/Makefile
24 build() {
25   cd $pkgname-$pkgver
26   # libs
27   make -C source
28   # create lib link for building apps
29   ln -sv lib$pkgname.so.$pkgver source/lib$pkgname.so
30   # apps
31   make LDFLAGS+=" -L../source" CXXFLAGS+=" -I../source" -C apps
32   # cleanup link
33   rm -rv source/lib$pkgname.so
36 package_zita-resampler() {
37   depends=(gcc-libs glibc)
38   optdepends=(
39     'libsndfile: for zresample and zretune'
40     'zita-resampler-docs: for documentation'
41   )
42   provides=(libzita-resampler.so)
44   for location in $pkgbase-$pkgver/{source,apps}; do
45     make DESTDIR="$pkgdir/" PREFIX=/usr SUFFIX="" install -C $location
46   done
49 package_zita-resampler-docs() {
50   pkgdesc+=" - documentation"
52   install -vDm 644 $pkgbase-$pkgver/{AUTHORS,README,docs/*}  -t "$pkgdir/usr/share/doc/$pkgbase/"