PKGBUILDs/extra/zita-resampler/PKGBUILD

59 lines
1.7 KiB
Bash
Raw Normal View History

2021-06-28 23:27:18 +00:00
# Maintainer: David Runge <dvzrv@archlinux.org>
# Contributor: speps <speps at aur dot archlinux dot org>
# Contributor: Philipp Überbacher <murks at lavabit dot com>
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
# - disable SSE
2023-02-17 14:04:14 +00:00
pkgbase=zita-resampler
pkgname=(zita-resampler zita-resampler-docs)
pkgver=1.10.1
2021-06-28 23:27:18 +00:00
pkgrel=1
pkgdesc="A C++ library for resampling audio signals"
2023-02-17 14:04:14 +00:00
arch=(x86_64)
url="https://kokkinizita.linuxaudio.org/linuxaudio"
license=(GPL3)
makedepends=(gcc-libs glibc libsndfile)
source=($url/downloads/$pkgname-$pkgver.tar.xz)
sha512sums=('ba95286b0744df393194f4f94a8aad62f6c088cf80f6be71482ed55beef6503a9bab6644f2565b69002247611fcf0fb6561fc0072578466a0133311721b43cf5')
b2sums=('b8871899b7e6cac9b46df3c45c5bb1d8e9c9edd41bcbc5944098d9c4eee2ff4e4d216f97b3bfa96ac43082b5333de26201d6cba9eaa152efd20e8c5017478391')
2021-06-28 23:27:18 +00:00
prepare() {
2023-02-17 14:04:14 +00:00
cd $pkgname-$pkgver
# remove march=native
sed -e '/native/d' -i {source,apps}/Makefile
2021-06-28 23:27:18 +00:00
# disable SSE
2023-02-17 14:04:14 +00:00
sed -e '/ENABLE_SSE2/d' -i source/Makefile
2021-06-28 23:27:18 +00:00
}
build() {
2023-02-17 14:04:14 +00:00
cd $pkgname-$pkgver
2021-06-28 23:27:18 +00:00
# libs
make -C source
# create lib link for building apps
2023-02-17 14:04:14 +00:00
ln -sv lib$pkgname.so.$pkgver source/lib$pkgname.so
2021-06-28 23:27:18 +00:00
# apps
make LDFLAGS+=" -L../source" CXXFLAGS+=" -I../source" -C apps
# cleanup link
2023-02-17 14:04:14 +00:00
rm -rv source/lib$pkgname.so
2021-06-28 23:27:18 +00:00
}
2023-02-17 14:04:14 +00:00
package_zita-resampler() {
depends=(gcc-libs glibc)
optdepends=(
'libsndfile: for zresample and zretune'
'zita-resampler-docs: for documentation'
)
provides=(libzita-resampler.so)
for location in $pkgbase-$pkgver/{source,apps}; do
make DESTDIR="$pkgdir/" PREFIX=/usr SUFFIX="" install -C $location
done
}
package_zita-resampler-docs() {
pkgdesc+=" - documentation"
install -vDm 644 $pkgbase-$pkgver/{AUTHORS,README,docs/*} -t "$pkgdir/usr/share/doc/$pkgbase/"
2021-06-28 23:27:18 +00:00
}