### this file is sourced not run
PKGVER=0.158
PKGBUILD=1
PKGARCH=x86_64

### dummy template: collect libs from elfutils
TARBALL=libelf-0.158-x86_64-1.txz
MD5SUM=
SRC_URL=elfutils-0.158-x86_64-1.txz
BUNDLE=

SLACKREQ=''
SLACKDESC='libelf: libelf 0.158 (extracted libraries from elfutils)  
libelf:  
libelf: This package contains the libraries from elfutils. In particular, it 
libelf: contains libelf.so, which is required by Radeon drivers for mesa. If 
libelf: you already installed elfutils, you don'\''t need this.  
libelf: 
libelf: 
libelf: 
libelf: 
libelf: 
libelf: 
'

PKG_NOMAKEPKG=yes
PKG_NOBUILD=yes

pkg_prepare() {
	: do nothing
}

pkg_package() {
	if  [ -e $OUTPUT_DIR/$SRC_URL ] ; then
		echo extracting $SRC_URL
		mkdir tmp/libelf
		tar -xf $OUTPUT_DIR/$SRC_URL -C tmp/libelf
		
		# clean up unnecessary stuff
		cd tmp/libelf
		(cd usr; ls | grep -vE "lib64" | xargs rm -rf; )
		find . -name "*.a" -delete

		# build the package
		pkg_package_dir .		
	else
		return 1
	fi
}

pkg_build() { 
	: do nothing
}
