build_libevent() { . ./openssl-sc.inc HERE=`pwd` NAME=libevent VER=2.0.16 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"/openssl ]; then build_openssl "$PKGPATH" || exit 1 fi tar xvf libevent-2.0.16-stable.tar.gz || exit 1 cd libevent-2.0.16-stable || exit 1 ./configure --prefix="$PKGPATH" || exit 1 make || exit 1 make install || exit 1 cd "$HERE" touch "$TMPDIR"/libevent }