### this file is sourced not run
PKGVER=0.7.4
PKGBUILD=1
PKGARCH=i686

# source: BLFS 7.5
TARBALL=a52dec-0.7.4.tar.gz
MD5SUM=caa9f5bc44232dc8aeea773fea56be80 
SRC_URL=http://liba52.sourceforge.net/files/$TARBALL
BUNDLE=

SLACKREQ=
SLACKDESC='liba52_32: liba52_32 0.7.4 (AC-3 decoder library)  
liba52_32:  
liba52_32: liba52 is a free library for decoding ATSC A/52 (also known as AC-3) 
liba52_32: streams. The A/52 standard is used in a variety of applications, 
liba52_32: including digital television and DVD.  
liba52_32: 
liba52_32: This contains 32-bit version of the library.
liba52_32: 
liba52_32: 
liba52_32: 
liba52_32: 
'

### default pkg_download
### default pkg_prepare
### package - only collect the libraries
pkg_package() {
	rm -rf bin sbin usr/bin usr/sbin usr/include usr/share
}

### build
pkg_build() {
	cd /tmp/liba52*
	sed -i "s/-prefer-non-pic/-prefer-pic/" configure &&
	
	CONFFLAGS="$CONFFLAGS --mandir=/usr/share/man --disable-static --enable-shared"
	export CFLAGS="-Os -fPIC"	
	pkg_build_autoconf && 
	cp liba52/a52_internal.h /usr/include/a52dec &&
	install -v -m644 -D doc/liba52.txt \
    /usr/share/doc/liba52-0.7.4/liba52.txt &&
    
	pkg_build_slackdesc
}
