archrelease: copy trunk to community-any
[ArchLinux/community.git] / lib32-libsamplerate / repos / multilib-x86_64 / PKGBUILD
blob6055933c4a306b350f2da06e272baf74b30748ea
1 # Maintainer: Jan "heftig" Steffens <jan.steffens@gmail.com>
2 # Maintainer: David Runge <dvzrv@archlinux.org>
4 _name=libsamplerate
5 pkgname=lib32-libsamplerate
6 pkgver=0.2.2
7 pkgrel=2
8 pkgdesc="An audio sample rate conversion library"
9 arch=(x86_64)
10 url="https://libsndfile.github.io/libsamplerate/"
11 license=(BSD)
12 depends=(
13   lib32-gcc-libs
14   lib32-glibc
15   "$_name=$pkgver"
17 makedepends=(
18   cmake
19   lib32-alsa-lib
20   lib32-libsndfile
21   lib32-opus
23 # TODO: package lib32-fftw for tests
24 # checkdepends=(lib32-fftw)
25 provides=(libsamplerate.so)
26 source=(https://github.com/libsndfile/$_name/releases/download/$pkgver/$_name-$pkgver.tar.xz{,.sig})
27 sha512sums=('d23ae54d23209ba22baae9e5fd178dd8e0e99205dada7e7c3a7b3a3d8cf816ed427a411bfeb008427f64da7767d645edce40811f238af11c8c386f5ef25a9f0c'
28             'SKIP')
29 b2sums=('71b1e8a1644a94fff019abc6bf98c557df84994293f1e9bc651ad3ad3f0afeb24f54b8c75fc26e5202ae7c3a3e34e783fd1be7f7c6fdefe9eac9a5dfe7100b91'
30         'SKIP')
31 validpgpkeys=('31D95CAB6D80D262244A1750A47620E801E47E95')  # David Seifert soap@gentoo.org
33 build() {
34   local cmake_options=(
35     -B build
36     -D BUILD_SHARED_LIBS=ON
37     -D CMAKE_BUILD_TYPE=None
38     -D CMAKE_INSTALL_LIBDIR=lib32
39     -D CMAKE_INSTALL_PREFIX=/usr
40     -S $_name-$pkgver
41     -W no-dev
42   )
43   export CC="gcc -m32"
44   export CXX="g++ -m32"
45   export PKG_CONFIG_PATH="/usr/lib32/pkgconfig"
47   cmake "${cmake_options[@]}"
48   cmake --build build --verbose
51 # check() {
52 #   ctest --test-dir build --output-on-failure
53 # }
55 package() {
56   DESTDIR="$pkgdir" cmake --install build
57   # remove everything that is provided by libsamplerate
58   rm -rfv "$pkgdir"/usr/{include,share,bin}
59   install -vDm 644 $_name-$pkgver/COPYING -t "$pkgdir/usr/share/licenses/$pkgname/"