# Maintainer: PktSurf <smlinux@pktsurf.in>
app=libpcap
version=1.9.0
build=1sml
homepage="http://www.tcpdump.org"
download="https://www.tcpdump.org/release/libpcap-$version.tar.gz"
desc="packet capture library"
requires="musl"

prepbuilddir() {
  mkandenterbuilddir
  rm -rf $app-$version

  tar xf $srcdir/$app-$version.tar.?z*
  cd $app-$version
  fixbuilddirpermissions
}

build() {
  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
"
