archrelease: copy trunk to extra-x86_64
[arch-packages.git] / libsndfile / repos / extra-x86_64 / PKGBUILD
blob9a319f40c796328f376597fe0b1ce198c2bcadd5
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 options=(debug)
26 source=(https://github.com/$pkgname/$pkgname/releases/download/$pkgver/$pkgname-$pkgver.tar.xz{,.asc})
27 sha512sums=('c0dee6b33cd3c619aa13ec2854a5480e826640ca98a438758346194e83752af576a39f9de118824f0d0c61288632d87b489dc5793c025296e0f15564d87ca12a'
28             'SKIP')
29 b2sums=('cb13fde9b9f44c6279a9ee7741457824eb41fc17261bf9c669d757e9e506eba2c3d4ad259e4625b8a11c82308188cc19f7399e9d1fc0299a3a11794e4b653e47'
30         'SKIP')
31 validpgpkeys=(
32   '6A91A5CF22C24C99A35E013FCFDCF91FB242ACED'  # Erik de Castro Lopo <erikd@mega-nerd.com>
33   '9B1CFD2E92239C4B288E025F9D0D1F1CCB35FF8C'  # evpobr evpobr@gmail.com
34   '31D95CAB6D80D262244A1750A47620E801E47E95'  # David Seifert soap@gentoo.org
37 build() {
38   # tests can only be built with static libs
39   cmake -DCMAKE_INSTALL_PREFIX=/usr \
40         -DCMAKE_BUILD_TYPE=None \
41         -Wno-dev \
42         -B build-test \
43         -S $pkgname-$pkgver
44   make VERBOSE=1 -C build-test
46   cmake -DCMAKE_INSTALL_PREFIX=/usr \
47         -DCMAKE_BUILD_TYPE=None \
48         -DBUILD_SHARED_LIBS=ON \
49         -DENABLE_EXTERNAL_LIBS=ON \
50         -DENABLE_MPEG=ON \
51         -Wno-dev \
52         -B build \
53         -S $pkgname-$pkgver
54   make VERBOSE=1 -C build
57 check() {
58   make test -C build-test
61 package() {
62   depends+=(
63     flac libFLAC.so
64     lame libmp3lame.so
65     libogg libogg.so
66     libvorbis libvorbis.so libvorbisenc.so
67     mpg123 libmpg123.so
68     opus libopus.so
69   )
71   make DESTDIR="$pkgdir" install -C build
72   install -vDm 644 $pkgname-$pkgver/{AUTHORS,ChangeLog,README} -t "$pkgdir/usr/share/doc/$pkgname"