# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
setvar pkgname = 'a52dec'
setvar pkgver = '0.7.4'
setvar pkgrel = '6'
setvar pkgdesc = ""A free library for decoding ATSC A/52 streams.""
setvar url = ""http://liba52.sourceforge.net/""
setvar arch = ""all""
setvar license = ""GPL2+""
setvar subpackages = ""$pkgname-dev $pkgname-doc""
setvar makedepends = ""autoconf automake libtool linux-headers""
setvar source = ""http://liba52.sourceforge.net/files/$pkgname-$pkgver.tar.gz
	automake.patch
	$pkgname-$pkgver-build.patch
	""

setvar builddir = ""$srcdir/$pkgname-$pkgver""
proc prepare {
	default_prepare
	update_config_sub
	libtoolize --force && \
		aclocal && autoconf && automake --add-missing
}

proc build {
	cd $builddir
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--enable-shared
	make
}

proc package {
	cd $builddir
	make DESTDIR="$pkgdir" install
	install -m644 liba52/a52_internal.h "$pkgdir"/usr/include/a52dec/
}

setvar sha512sums = ""4b26fe9492f218b775fb190b76ecf06edaeb656adfe6dcbd24d0a0f86871c3ba917edb88a398eb12dccedaa1605b6f0a0be06b09f9fddd9a46e457b7dd244848  a52dec-0.7.4.tar.gz
4a832b7e13e19ba00b1fcf5ddbdcca416ee71818f2fd77f19114d7f98fb41dbd04f906eb78f403dc27324d7e8bd8ec4e0b670139a27b49a7acdb2e3cf88d8d12  automake.patch
eee40a2871c00fc704fa49d3192a41ceadc4cf7e80d7d7cf368aa2a3e7ebb786f39ef835bdffca5685bf054316a9bacf87556b9a0c90868dbf29e7269873806e  a52dec-0.7.4-build.patch""