# Contributor: Roberto Oliveira <robertoguimaraes8@gmail.com>
# Maintainer: Roberto Oliveira <robertoguimaraes8@gmail.com>
pkgname=liboggz
pkgver=1.1.1
pkgrel=0
pkgdesc="Provides a simple programming interface for reading and writing Ogg files and streams"
url="https://www.xiph.org/oggz/"
arch="all"
license="BSD"
depends=""
makedepends="libogg-dev"
install=""
subpackages="$pkgname-dev $pkgname-doc"
source="http://downloads.xiph.org/releases/$pkgname/$pkgname-$pkgver.tar.gz"
builddir="$srcdir/$pkgname-$pkgver"

prepare() {
	default_prepare
	update_config_guess
}

build() {
	cd "$builddir"
	./configure --prefix=/usr
	make
}

check() {
	cd "$builddir"
	#FIXME: test segfaults on some archs
	sed -i "/TESTS = httpdate_test\$(EXEEXT)/d" src/tools/oggz-chop/Makefile
	make check
}

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

sha512sums="8f5fc8ca49cb6f7a1160a9c1932876b771d55985d59ddc1f48497dfc08641414a58244d7a7e52bfcecdb69f52913d0123efd8f92513f8b9064e4abe1442f2cba  liboggz-1.1.1.tar.gz"
