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')
15 _commit=b32e5cbf9818ca23dd22aaa75522042c16ea7d17 # tags/1.4.2
16 source=("git+https://github.com/xiph/flac?signed#commit=$_commit")
18 validpgpkeys=('5DE3E0509C47EA3CF04A42D34AEE18F83AFDEB23') # https://github.com/web-flow.gpg
22 git describe --tags | sed 's/[^-]*-g/r&/;s/-/+/g'
29 # https://bugs.archlinux.org/task/76120
30 git cherry-pick -n 3d55a9dc6c14317b4766db96bb52e2fd95e920a9
33 sed -i 's/FLAC__TEST_LEVEL=1/FLAC__TEST_LEVEL=0/' test/CMakeLists.txt
37 cmake -S flac -B build -G Ninja \
38 -DCMAKE_BUILD_TYPE=None \
39 -DCMAKE_INSTALL_PREFIX=/usr \
40 -DBUILD_SHARED_LIBS=ON \
41 -DINSTALL_MANPAGES=ON \
42 -DWITH_STACK_PROTECTOR=OFF \
46 # Build docs and place them where install expects them
47 cmake --build build --target FLAC-doxygen
48 mv build/doc/doxytmp/html flac/doc/api
53 ctest --output-on-failure --stop-on-failure -j1
57 provides=('libFLAC.so' 'libFLAC++.so')
59 DESTDIR="${pkgdir}" cmake --install build
61 install -Dm 644 flac/src/*/*.m4 -t "${pkgdir}/usr/share/aclocal"
63 mkdir -p doc/usr/share
64 mv {"${pkgdir}",doc}/usr/share/doc
66 install -Dm 644 flac/COPYING.Xiph -t "${pkgdir}/usr/share/licenses/${pkgname}"
70 pkgdesc+=' documentation'
75 install -Dm 644 flac/COPYING.Xiph -t "${pkgdir}/usr/share/licenses/${pkgname}"
78 # vim:set sw=2 sts=-1 et: