1 # Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
2 # Contributor: Eric BĂ©langer <eric@archlinux.org>
5 pkgname=('flac' 'flac-doc')
8 pkgdesc='Free Lossless Audio Codec'
9 url='https://xiph.org/flac/'
12 depends=('gcc-libs' 'libogg')
13 makedepends=('nasm' 'cmake' 'ninja' 'doxygen' 'git' 'pandoc')
14 _commit=b32e5cbf9818ca23dd22aaa75522042c16ea7d17 # tags/1.4.2
15 source=("git+https://github.com/xiph/flac?signed#commit=$_commit")
17 validpgpkeys=('5DE3E0509C47EA3CF04A42D34AEE18F83AFDEB23') # https://github.com/web-flow.gpg
21 git describe --tags | sed 's/[^-]*-g/r&/;s/-/+/g'
28 # https://bugs.archlinux.org/task/76120
29 git cherry-pick -n 3d55a9dc6c14317b4766db96bb52e2fd95e920a9
32 sed -i 's/FLAC__TEST_LEVEL=1/FLAC__TEST_LEVEL=0/' test/CMakeLists.txt
36 cmake -S flac -B build -G Ninja \
37 -DCMAKE_BUILD_TYPE=None \
38 -DCMAKE_INSTALL_PREFIX=/usr \
39 -DBUILD_SHARED_LIBS=ON \
40 -DINSTALL_MANPAGES=ON \
41 -DWITH_STACK_PROTECTOR=OFF \
45 # Build docs and place them where install expects them
46 cmake --build build --target FLAC-doxygen
47 mv build/doc/doxytmp/html flac/doc/api
52 ctest --output-on-failure --stop-on-failure -j1
56 provides=('libFLAC.so' 'libFLAC++.so')
58 DESTDIR="${pkgdir}" cmake --install build
60 install -Dm 644 flac/src/*/*.m4 -t "${pkgdir}/usr/share/aclocal"
62 mkdir -p doc/usr/share
63 mv {"${pkgdir}",doc}/usr/share/doc
65 install -Dm 644 flac/COPYING.Xiph -t "${pkgdir}/usr/share/licenses/${pkgname}"
69 pkgdesc+=' documentation'
74 install -Dm 644 flac/COPYING.Xiph -t "${pkgdir}/usr/share/licenses/${pkgname}"
77 # vim:set sw=2 sts=-1 et: