# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=vorbisgain
pkgver=0.37
pkgrel=1
pkgdesc="A utility that computes the ReplayGain values for Ogg Vorbis files"
url="https://sjeng.org/vorbisgain.html"
arch="all"
license="GPL-2.0-only"
makedepends="libvorbis-dev"
subpackages="$pkgname-doc"
source="https://sjeng.org/ftp/vorbis/vorbisgain-$pkgver.tar.gz
	fix-format-string.patch
	fix-implicit.patch"

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var \
		--enable-recursive
	make
}

check() {
	make check
}

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

sha512sums="
67181834e1a0d7c6e1ccd984e2d30ebf1dcdff84caa77f75e5e771de8414904810e966a43852b7184e075d2428fd8b431124835efc370ce6504b8b2756746e04  vorbisgain-0.37.tar.gz
205213d2600c1e54972f06b13d91ca5d2ca482a83051d6264e6cf59fceca03daf95997acc06ed7e4f3b3e2d8d542f6196ff3812681e8ccf7a53b5da33a093060  fix-format-string.patch
1589f8f281f636386e224da18915da368d3662a7620a08c9770623511f6a1a51f4083ae6e797cc5a732d44046e0480bbe875eeabb020d995ef9c1bfe583820d2  fix-implicit.patch
"
