APP=libpcap
VERSION=1.9.0
BUILD=1sml
HOMEPAGE='http://www.tcpdump.org'
DOWNLOAD='https://www.tcpdump.org/release/libpcap-1.9.0.tar.gz'
DESC="packet capture library"
REQUIRES="musl"

build() {
  mkandenterbuilddir
  rm -rf $APP-$VERSION

  tar xf $SRCDIR/$APP-$VERSION.tar.?z*
  cd $APP-$VERSION
  fixbuilddirpermissions

  CFLAGS="$CFLAGS -D_BSD_SOURCE -DIPPROTO_HOPOPTS=0 -include limits.h" \
  ac_cv_type_u_int64_t=yes \
  ./configure \
    --prefix="" \
    --enable-shared \
    --disable-dbus \
    --disable-bluetooth

  make
  make install DESTDIR=$PKG

  cp LICENSE $PKGDOCS/

  mkfinalpkg
}

SHA512SUMS="
b1449b248bc3f3daf17c1a8bfcb7870e7157d050db36bfce6f9adde6a9ba4893baff40d0f21d50012da02b11ec5a43d21a2b3715ab51dcbe03192541dc83be68  libpcap-1.9.0.tar.lz
"
