NAME="libevent"
DESC="Asynchronous event notification software library"
VERSION="2.1.12"
FILES=("https://github.com/libevent/libevent/releases/download/release-$VERSION-stable/libevent-$VERSION-stable.tar.gz")
HASHES=("b5333f021f880fe76490d8a799cd79f4")
DEPENDS=()

build() {
  tar xf $NAME-$VERSION-stable.tar.gz
  cd $NAME-$VERSION

  sed -i 's/python/&3/' event_rpcgen.py
  ./configure --prefix=/usr --disable-static
  make && doxygen Doxyfile
  make DESTDIR="$ROOTDIR" install
  install -v -m755 -d "$ROOTDIR/usr/share/doc/libevent-$VERSION/api"
  cp      -v -R       doxygen/html/* \
                    "$ROOTDIR/usr/share/doc/libevent-$VERSION/api"

  cd .. && rm -r $NAME-$VERSION
}
