# Contributor: Ɓukasz Jendrysik <scadu@yandex.com>
# Contributor: Carlo Landmeter <clandmeter@gmail.com>
# Maintainer:
setvar pkgname = 'chromaprint'
setvar pkgver = '1.2'
setvar pkgrel = '1'
setvar pkgdesc = ""Library that implements a custom algorithm for extracting fingerprints from any audio source""
setvar url = ""http://acoustid.org/chromaprint/""
setvar arch = ""all""
setvar license = ""LGPL""
setvar depends = """"
setvar depends_dev = ""ffmpeg-dev""
setvar makedepends = ""$depends_dev cmake""
setvar install = """"
setvar subpackages = ""$pkgname-dev""
setvar source = ""https://bitbucket.org/acoustid/chromaprint/downloads/chromaprint-$pkgver.tar.gz""

setvar _builddir = ""$srcdir"/chromaprint-$pkgver"
proc prepare {
	local i
	cd $_builddir
	for i in $source {
		case (i) {
		*.patch { msg $i; patch -p1 -i "$srcdir"/$i || return 1}
		}
	}
}

proc build {
	cd $_builddir
	cmake \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_BUILD_TYPE=Release \
		-DBUILD_EXAMPLES=ON \
		. || return 1
	make || return 1
}

proc package {
	cd $_builddir
	make DESTDIR="${pkgdir}" install || return 1
}

setvar md5sums = ""748da044a8f0ee5f31edec8b67045b3e  chromaprint-1.2.tar.gz""
setvar sha256sums = ""822b8949a322ac04c6f8a3ed78f5e689bcc493c6ca0972bf627c913c8430031a  chromaprint-1.2.tar.gz""
setvar sha512sums = ""dc61db8894a20df3d7e7317cd7cd97148c19be5854dd66409341cb8e47c045e1c632b254e14a869279983a5af2cc6f9effea21b77a63dff729511e6144439cbb  chromaprint-1.2.tar.gz""