name=libevent
version=2.1.12
release=1
desc="Event notification library"
url="https://libevent.org/"
license="BSD-3-Clause"
depend="glibc libressl"
makedepend=""
source="https://github.com/libevent/libevent/releases/download/release-2.1.12-stable/libevent-2.1.12-stable.tar.gz"
sha256="SKIP"

build() {
	cd "libevent-2.1.12-stable"
	[ -x ./configure ] || autoreconf -fi
	_opts="--prefix=/usr --sysconfdir=/etc --localstatedir=/var --libdir=/usr/lib"
	_help=$(./configure --help 2>/dev/null)
	case "$_help" in *--disable-static*)  _opts="$_opts --disable-static" ;; esac
	case "$_help" in *--disable-nls*)     _opts="$_opts --disable-nls" ;; esac
	case "$_help" in *--disable-dependency-tracking*) _opts="$_opts --disable-dependency-tracking" ;; esac
	./configure $_opts
	gmake -j"$JOBS"
}

package() {
	cd "libevent-2.1.12-stable"
	gmake DESTDIR="$pkgdir" install
}
