# Maintainer: Levente Polyak # Contributor: Eric BĂ©langer # ALARM: Kevin Mihelich # - remove makedepends on pandoc, set -DINSTALL_MANPAGES=OFF pkgbase=flac pkgname=('flac' 'flac-doc') pkgver=1.4.1 pkgrel=2 pkgdesc='Free Lossless Audio Codec' url='https://xiph.org/flac/' arch=('x86_64') license=('BSD' 'GPL') depends=('gcc-libs' 'libogg') makedepends=('nasm' 'cmake' 'ninja' 'doxygen' 'git') options=('debug') _commit=b6fbd6b3d97e2da4481bdbd25176f263fd6a5e75 # tags/1.4.1 source=("git+https://github.com/xiph/flac?signed#commit=$_commit") b2sums=('SKIP') validpgpkeys=('5DE3E0509C47EA3CF04A42D34AEE18F83AFDEB23') # https://github.com/web-flow.gpg pkgver() { cd flac git describe --tags | sed 's/[^-]*-g/r&/;s/-/+/g' } prepare() { cd flac # Fix GStreamer # https://bugs.archlinux.org/task/76120 git cherry-pick -n 3d55a9dc6c14317b4766db96bb52e2fd95e920a9 # Shorten tests sed -i 's/FLAC__TEST_LEVEL=1/FLAC__TEST_LEVEL=0/' test/CMakeLists.txt } build() { cmake -S flac -B build -G Ninja \ -DCMAKE_BUILD_TYPE=None \ -DCMAKE_INSTALL_PREFIX=/usr \ -DBUILD_SHARED_LIBS=ON \ -DINSTALL_MANPAGES=OFF \ -DWITH_STACK_PROTECTOR=OFF \ -DNDEBUG=ON cmake --build build # Build docs and place them where install expects them cmake --build build --target FLAC-doxygen mv build/doc/doxytmp/html flac/doc/api } check() { cd build ctest --output-on-failure --stop-on-failure -j1 } package_flac() { provides=('libFLAC.so' 'libFLAC++.so') DESTDIR="${pkgdir}" cmake --install build install -Dm 644 flac/src/*/*.m4 -t "${pkgdir}/usr/share/aclocal" mkdir -p doc/usr/share mv {"${pkgdir}",doc}/usr/share/doc install -Dm 644 flac/COPYING.Xiph -t "${pkgdir}/usr/share/licenses/${pkgname}" } package_flac-doc() { pkgdesc+=' documentation' depends=() mv doc/* "$pkgdir" install -Dm 644 flac/COPYING.Xiph -t "${pkgdir}/usr/share/licenses/${pkgname}" } # vim:set sw=2 sts=-1 et: