summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 2c675282a1c08a68563fafd69c69680baa3dfe82 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# Maintainer: Daniel Bermond <dbermond@archlinux.org>

pkgname=chromaprint-fftw
pkgver=1.5.1
pkgrel=2
pkgdesc='Library for extracting fingerprints from any audio source (uses fftw for FFT calculations instead of ffmpeg)'
arch=('x86_64')
url='https://acoustid.org/chromaprint'
license=('GPL')
depends=('fftw')
makedepends=('cmake' 'gtest')
provides=('chromaprint' 'libchromaprint.so')
conflicts=('chromaprint')
source=("https://github.com/acoustid/chromaprint/archive/v${pkgver}/chromaprint-${pkgver}.tar.gz" 
        '010-chromaprint-gtest-1.13.0-fix.patch')
sha256sums=('a1aad8fa3b8b18b78d3755b3767faff9abb67242e01b478ec9a64e190f335e1c'
            '46e389235dd08c727d6cc1ae079a77d06fde337f4a06d0c0fe908d2025280f63')

prepare() {
    patch -Np1 -d "chromaprint-${pkgver}" -i "${srcdir}/010-chromaprint-gtest-1.13.0-fix.patch"
}

build() {
    cmake -B build -S "chromaprint-${pkgver}" \
        -DCMAKE_BUILD_TYPE:STRING='None' \
        -DCMAKE_INSTALL_PREFIX:PATH='/usr' \
        -DBUILD_TESTS:BOOL='ON' \
        -DBUILD_TOOLS:BOOL='OFF' \
        -DFFT_LIB:STRING='fftw3' \
        -DGTEST_SOURCE_DIR:PATH='/usr/src/googletest' \
        -Wno-dev
    make -C build
}

check() {
    make -C build check
}

package() {
    make -C build DESTDIR="$pkgdir" install
}