#!/usr/bin/bash
# JOBoRun		: Jwm OpenBox Obarun RUNit
# Maintainer	: Joe Bo Run <joborun@disroot.org>
# PkgSource		: url="https://gittea.disroot.org/joborun-pkg/jobcore/$pkgname"
# Website		: https://pozol.eu
#-----------------------------------------| DESCRIPTION |---------------------------------------

pkgname=libpcap
pkgver=1.10.4
pkgrel=01
pkgdesc='A system-independent interface for user-level packet capture - without ipv6 and dbus need'
url="https://www.tcpdump.org/"
depends=(glibc libnl sh)
makedepends=(bluez-libs)
provides=(libpcap.so)
#options=(debug)
source=("https://www.tcpdump.org/release/${pkgname}-${pkgver}.tar.gz"{,.sig})

prepare() {
  cd $pkgname-$pkgver
  autoreconf -fiv
}

build() {
  cd $pkgname-$pkgver
  ./configure --prefix=/usr \
              --disable-ipv6 \
              --enable-bluetooth \
              --enable-usb \
	  --disable-dbus \
              --with-libnl
  make
}

package() {
  depends+=('libdbus-1.so')
  cd $pkgname-$pkgver
  make DESTDIR="$pkgdir" install
  install -vDm 644 LICENSE -t "$pkgdir/usr/share/licenses/$pkgname/"
  install -vDm 644 {CHANGES,{CONTRIBUTING,README}.md} -t "${pkgdir}/usr/share/doc/${pkgname}/"
}

#---- arch license gpg-key & sha256sums ----

arch=(x86_64)

license=('BSD')

validpgpkeys=('1F166A5742ABB9E0249A8D30E089DEF1D9C15D0D') # The Tcpdump Group

sha256sums=(ed19a0383fad72e3ad435fd239d7cd80d64916b87269550159d20e47160ebe5f  # libpcap-1.10.4.tar.gz
	d3f19087169bc823fad9a8a184372f8977d81b23edcdc6bc9dc9d874c99cab01) # libpcap-1.10.4.tar.gz.sig

##  d225ded625d06fd4214823102896f6e18c2871a53260ec4318608c21d6da56cc  libpcap-1.10.4-01-x86_64.pkg.tar.lz

