12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667 |
- # Maintainer (Arch): Bartłomiej Piotrowski <bpiotrowski@mirantis.com>
- # Contributor (Arch): Thomas Bächler <thomas@archlinux.org>
- # Maintainer: André Silva <emulatorman@hyperbola.info>
- # Contributor: Márcio Silva <coadde@hyperbola.info>
- # Contributor: Tobias Dausend <throgh@hyperbola.info>
- pkgname=libpcap
- pkgver=1.10.3
- _debver=$pkgver
- _debrel=1
- pkgrel=1
- pkgdesc="A system-independent interface for user-level packet capture"
- arch=('i686' 'x86_64')
- url='https://www.tcpdump.org/'
- license=('Modified-BSD')
- depends=('sh')
- makedepends=('flex' 'quilt')
- source=("https://www.tcpdump.org/release/${pkgname}-${pkgver}.tar.gz"
- "https://deb.debian.org/debian/pool/main/libp/libpcap/libpcap_${_debver}-${_debrel}.debian.tar.xz"
- "CVE-2024-8006.patch")
- sha512sums=('57bc07cbc8c326e203ce10ce1eb9f55760fc33320718d8643c65a68949334291877dffcf19af5f61eb9b4eda2d8ffe7bacee38363d2d6536cc85ae81c851684d'
- 'bd8fb0c2a801d38dc7e1a1581eb2721750d13dff3352939ebe6c0665834f38f6c8d0782d8b42305904bceeaf72d7d6297fa70d110ebb6b3ab4adbe72e6733103'
- '3c9d35142724e03a6bd3a5df33854df6e19a91c16e0c10d6cd41bbf54598cffd2ea282f035c1b47cc7547822350089d1f2515afa728464816f7e70a90310afc9')
- prepare() {
- cd $pkgname-$pkgver
- if [[ ${pkgver%.*} = ${_debver%.*} ]]; then
- # Debian patches
- export QUILT_PATCHES=debian/patches
- export QUILT_REFRESH_ARGS='-p ab --no-timestamps --no-index'
- export QUILT_DIFF_ARGS='--no-timestamps'
- mv "$srcdir"/debian .
- # Doesn't apply
- rm -v debian/patches/hurd.diff || true
- rm -v debian/patches/kfreebsd.diff || true
- rm -v debian/patches/shared-lib.diff || true
- quilt push -av
- fi
- patch -Np1 -i ${srcdir}/CVE-2024-8006.patch
- }
- build() {
- cd $pkgname-$pkgver
- ./configure --prefix=/usr \
- --enable-ipv6 \
- --disable-bluetooth \
- --disable-usb \
- --disable-dbus \
- --without-libnl
- make
- }
- package() {
- cd $pkgname-$pkgver
- install -d -m755 "$pkgdir"/usr/bin
- make DESTDIR="$pkgdir" install
- install -Dm644 LICENSE -t "$pkgdir/usr/share/licenses/$pkgname"
- # backwards compatibility, programs often look for net/bpf.h
- mkdir -p "$pkgdir/usr/include/net"
- cd "$pkgdir/usr/include/net"
- ln -s ../pcap-bpf.h bpf.h
- }
|