# Contributor: Carlo Landmeter
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=libmodplug
pkgver=0.8.9.0
pkgrel=3
pkgdesc="A MOD playing library"
url="https://modplug-xmms.sourceforge.net/"
arch="all"
license="custom"
subpackages="$pkgname-static $pkgname-dev $pkgname-doc"
source="https://downloads.sourceforge.net/modplug-xmms/libmodplug-$pkgver.tar.gz"

prepare() {
	default_prepare

	update_config_sub
	update_config_guess
}

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

package() {
	make DESTDIR="$pkgdir" install
	install -D -m644 COPYING $pkgdir/usr/share/licenses/$pkgname/LICENSE
}

sha512sums="880e10154fd367ee24ace53ca7e32a5c1fee7dfff1f934e6499944c12779427da63e2f55f8d6ce25db0a42a5b4424053bf64305b31dbfc4ef6a8909924d655fd  libmodplug-0.8.9.0.tar.gz"
