# Contributor: Sören Tempel <soeren+alpine@soeren-tempel.net>
# Contributor: Carlo Landmeter <clandmeter@gmail.com>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=mkvtoolnix
pkgver=19.0.0
pkgrel=0
pkgdesc="Set of tools to create, edit and inspect Matroska files"
url="https://mkvtoolnix.download/index.html"
arch="all"
license="GPL"
makedepends="libmatroska-dev flac-dev libvorbis-dev boost-dev
	zlib-dev file-dev libogg-dev ruby-rake ruby-json bash docbook-xsl"
options="!check"
subpackages="$pkgname-doc"
source="https://mkvtoolnix.download/sources/$pkgname-$pkgver.tar.xz"
builddir="$srcdir"/$pkgname-$pkgver

build() {
	cd "$builddir"
	./configure CC="${CC:-gcc}" CFLAGS="${CFLAGS}" \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var \
		--without-gettext
	rake V=1 -j${JOBS}
}

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

sha512sums="dd18eeffc8a5210ca3c8a287321ad106f63cff8fbe5ad3891460aab7e60f2d5261a3f335f3991524a95724861288593cfb3bd9df6829a2f7751f6a1fdaba0ca6  mkvtoolnix-19.0.0.tar.xz"
