archrelease: copy trunk to extra-x86_64
[arch-packages.git] / libsndfile / trunk / PKGBUILD
blobb933d537844b7c3f698a28132f970d6aa106048a
1 # Maintainer: David Runge <dvzrv@archlinux.org>
3 pkgname=libsndfile
4 pkgver=1.2.0
5 pkgrel=1
6 pkgdesc="A C library for reading and writing files containing sampled audio data"
7 arch=(x86_64)
8 url="https://libsndfile.github.io/libsndfile/"
9 license=(LGPL2.1)
10 depends=(glibc)
11 makedepends=(
12   alsa-lib
13   cmake
14   flac
15   lame
16   libogg
17   libvorbis
18   mpg123
19   opus
20   python
21   sqlite
23 optdepends=('alsa-lib: for sndfile-play')
24 provides=(libsndfile.so)
25 source=(https://github.com/$pkgname/$pkgname/releases/download/$pkgver/$pkgname-$pkgver.tar.xz{,.asc})
26 sha512sums=('c0dee6b33cd3c619aa13ec2854a5480e826640ca98a438758346194e83752af576a39f9de118824f0d0c61288632d87b489dc5793c025296e0f15564d87ca12a'
27             'SKIP')
28 b2sums=('cb13fde9b9f44c6279a9ee7741457824eb41fc17261bf9c669d757e9e506eba2c3d4ad259e4625b8a11c82308188cc19f7399e9d1fc0299a3a11794e4b653e47'
29         'SKIP')
30 validpgpkeys=(
31   '6A91A5CF22C24C99A35E013FCFDCF91FB242ACED'  # Erik de Castro Lopo <erikd@mega-nerd.com>
32   '9B1CFD2E92239C4B288E025F9D0D1F1CCB35FF8C'  # evpobr evpobr@gmail.com
33   '31D95CAB6D80D262244A1750A47620E801E47E95'  # David Seifert soap@gentoo.org
36 build() {
37   # tests can only be built with static libs
38   cmake -DCMAKE_INSTALL_PREFIX=/usr \
39         -DCMAKE_BUILD_TYPE=None \
40         -Wno-dev \
41         -B build-test \
42         -S $pkgname-$pkgver
43   make VERBOSE=1 -C build-test
45   cmake -DCMAKE_INSTALL_PREFIX=/usr \
46         -DCMAKE_BUILD_TYPE=None \
47         -DBUILD_SHARED_LIBS=ON \
48         -DENABLE_EXTERNAL_LIBS=ON \
49         -DENABLE_MPEG=ON \
50         -Wno-dev \
51         -B build \
52         -S $pkgname-$pkgver
53   make VERBOSE=1 -C build
56 check() {
57   make test -C build-test
60 package() {
61   depends+=(
62     flac libFLAC.so
63     lame libmp3lame.so
64     libogg libogg.so
65     libvorbis libvorbis.so libvorbisenc.so
66     mpg123 libmpg123.so
67     opus libopus.so
68   )
70   make DESTDIR="$pkgdir" install -C build
71   install -vDm 644 $pkgname-$pkgver/{AUTHORS,ChangeLog,README} -t "$pkgdir/usr/share/doc/$pkgname"