NAME="libpcap"
DESC="Functions for user-level packet capture, used in low-level network monitoring"
VERSION="1.10.4"
FILES=("https://www.tcpdump.org/release/libpcap-$VERSION.tar.gz")
HASHES=("0322e28dd76cda8066bb6d00fee5969b")
DEPENDS=("libnl" "libusb")

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

  ./configure --prefix=/usr && make
  sed -i '/INSTALL_DATA.*libpcap.a\|RANLIB.*libpcap.a/ s/^/#/' Makefile
  make DESTDIR="$ROOTDIR" install

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