# hdw - linux alsa package
#
# author: hackbard@hackdaworld.dyndns.org
#
# [V] 1.0.9
# [S] 3-7
## [D] alsa-driver-1.0.9.tar.bz2 ftp://ftp.alsa-project.org/pub/driver/
# [D] alsa-lib-1.0.9.tar.bz2 ftp://ftp.alsa-project.org/pub/lib/
# [D] alsa-oss-1.0.9.tar.bz2 ftp://ftp.alsa-project.org/pub/oss-lib/
# [D] alsa-utils-1.0.9.tar.bz2 ftp://ftp.alsa-project.org/pub/utils/
# [D] alsa-tools-1.0.9.tar.bz2 ftp://ftp.alsa-project.org/pub/tools/

# popular drivers (i have those ;)
card="emu10k1,intel8x0"

confopt_x="$confopt"
confopt="$confopt --with-sequencer=yes --with-oss=yes --with-cards=$card"

post_install()	{
	echo "extracting lib, utils, tools and oss source ..."
	for i in alsa-lib alsa-utils alsa-tools alsa-oss; do
		tar --use-compress-program=bzip2 -xf \
			$archdir/$i-${ver}.tar.bz2 -C ../
	done
	# building stuff
	echo "building alsa libraries ..."
	cd ../alsa-lib-*
	./configure $confopt_x --enable-static
	make $make_conf ; make $install_conf install
	for i in alsa-utils- alsa-oss-; do 
		echo "building ${i} ..."
		cd ../${i}* ; ./configure $confopt_x
		make $make_conf ; make $install_conf install
	done
	cd ../alsa-tools-*
	for i in ac3dec as10k1 envy24control sb16_csp; do
		echo "building alsa tools - $i ..."
		cd ${i}* ; ./configure $confopt_x
		make $make_conf ; make $install_conf install
		cd ..
	done
		}
