Files
extra/libsoxr/PKGBUILD
2025-06-22 20:39:04 -05:00

68 lines
1.7 KiB
Bash

# Maintainer: Jesus E. <heckyel@riseup.net>
pkgname=libsoxr
pkgver=0.1.3
_debver=0.1.3
_debrel=4
pkgrel=1
pkgdesc='The SoX Resampler library that aims to give fast and high quality results for any constant resampling ratio'
arch=('i686' 'x86_64')
url='https://sourceforge.net/p/soxr/wiki/Home/'
license=('LGPL-2.1')
depends=('gcc-libs')
makedepends=('cmake' 'quilt')
source=("https://downloads.sourceforge.net/project/soxr/soxr-$pkgver-Source.tar.xz"
"https://deb.debian.org/debian/pool/main/libs/libsoxr/libsoxr_$_debver-$_debrel.debian.tar.xz")
sha512sums=('f4883ed298d5650399283238aac3dbe78d605b988246bea51fa343d4a8ce5ce97c6e143f6c3f50a3ff81795d9c19e7a07217c586d4020f6ced102aceac46aaa8'
'd1ee99c364a94032a187930e41abd12d86f1c9767cb42f54d8468e31cf6f04861ce29e307d2719a3080de94fe0f64d049f30afe3745e67a43da8f85c4227f0f2')
prepare() {
if [[ -d build ]]; then
rm -rf build
fi
mkdir build
cd soxr-${pkgver}-Source
if [[ ${pkgver%.*} = ${_debver%.*} ]]; then
# Debian patches
export QUILT_PATCHES=debian/patches
export QUILT_REFRESH_ARGS='-p ab --no-timestamps --no-index'
export QUILT_DIFF_ARGS='--no-timestamps'
mv "$srcdir"/debian .
quilt push -av
fi
}
build() {
cd build
cmake ../soxr-${pkgver}-Source \
-DCMAKE_BUILD_TYPE='Release' \
-DCMAKE_INSTALL_PREFIX='/usr' \
-DBUILD_EXAMPLES='OFF' \
-DBUILD_SHARED_LIBS='ON' \
-DWITH_AVFFT='ON' \
-DWITH_LSR_BINDINGS='ON' \
-DWITH_OPENMP='ON' \
-DWITH_PFFFT='ON'
make
}
check() {
cd build
make test
}
package() {
cd build
make DESTDIR="${pkgdir}" install
rm -rf "${pkgdir}"/usr/share/doc
install -Dm644 ../soxr-${pkgver}-Source/LICENCE -t "${pkgdir}"/usr/share/licenses/libsoxr/
}
# vim: ts=2 sw=2 et: