build_audiofile() { HERE=`pwd` . ./alsa-lib-sc.inc || exit 1 PKGPATH=$1 export LDFLAGS="-L$PKGPATH/lib" export CPPFLAGS="-I$PKGPATH/include" export PATH="$PKGPATH/bin:$PATH" export PKG_CONFIG_PATH="$PKGPATH/lib/pkgconfig:$PKG_CONFIG_PATH" if [ ! -f "$TMPDIR"/alsa-lib ]; then build_alsa-lib "$PKGPATH" || exit 1 fi tar xvf audiofile-0.3.4.tar.xz || exit 1 cd audiofile-0.3.4 || exit 1 ./configure --prefix="$PKGPATH" --bindir="$PKGPATH"/localbin || exit 1 make || exit 1 make install || exit 1 cd "$HERE" touch "$TMPDIR"/audiofile }