# Contributor: Francesco Colista <fcolista@alpinelinux.org>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=chromaprint
pkgver=1.4.3
pkgrel=0
pkgdesc="C library for generating audio fingerprints used by AcoustID"
url="https://acoustid.org/chromaprint"
arch="all"
license="MIT"
makedepends="cmake fftw-dev ffmpeg-dev"
options="!check"
subpackages="$pkgname-dev"
source="$pkgname-$pkgver.tar.gz::https://github.com/acoustid/$pkgname/archive/v$pkgver.tar.gz"
builddir="$srcdir/$pkgname-$pkgver"

build() {
	cd "$builddir"
	cmake \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_BUILD_TYPE=Release \
		-DBUILD_TOOLS=ON .
	make
}

package() {
	cd "$builddir"
	make DESTDIR="$pkgdir" install
}

sha512sums="aab00ca3d42047f20f48b24efdc50ef06fac799c69b3007a0e9c4e8217133a3626c51e49b4c842a59fc0e606169f2542c91997b0e838c62e9492a7ff5968363b  chromaprint-1.4.3.tar.gz"
