# Maintainer: Leonardo Arena pkgname=netcat-openbsd pkgver=1.225 pkgrel=0 pkgdesc="The TCP/IP swiss army knife. OpenBSD variant from debian." url="https://packages.debian.org/sid/netcat-openbsd" arch="all" license="BSD-3-Clause" makedepends="libbsd-dev" subpackages="$pkgname-doc" options="!check" source="$pkgname-$pkgver.tar.gz::https://deb.debian.org/debian/pool/main/n/netcat-openbsd/netcat-openbsd_$pkgver.orig.tar.gz $pkgname-$pkgver-debian.tar.xz::http://deb.debian.org/debian/pool/main/n/netcat-openbsd/netcat-openbsd_$pkgver-1.debian.tar.xz b64.patch base64.c " prepare() { default_prepare # debian keeps their patchset in their own folder while read -r patch; do patch -Np1 < "$srcdir"/debian/patches/"$patch" done < "$srcdir"/debian/patches/series # linux port requires b64_ntop cp "$srcdir"/base64.c . sed -i Makefile -e "/SRCS=/s;\(.*\);& base64.c;" } build() { make CFLAGS="$CFLAGS -DDEBIAN_VERSION=\"\\\"$pkgver\\\"\"" } package() { install -Dm755 nc "$pkgdir"/usr/bin/nc install -Dm644 nc.1 "$pkgdir"/usr/share/man/man1/nc.openbsd.1 } sha512sums=" d2e86e87770c7c83077945334a7f5e77d0f3b3064e930a839de32d4392e12fed9c8b3cb546c0c7235d38380ee2c26c6877f13635738241602ec52c7a8645a0c0 netcat-openbsd-1.225.tar.gz 29a2fb063dcc7a7e363f5916372229baf2172016703c99e046905494ca964037d8ce9374d4d6bbdca3d2c74b111418dfebdbb21ceef2f6faffd8f8c89144ca5d netcat-openbsd-1.225-debian.tar.xz c35ed4e10d0a8d312d8e730cafb8c69538183ce4af5a3cd2a1ceabfc58e009a23bf487507ef4aab5ad0617abf1dde6ac4be4dff6aac4bbb8091f2089cb6a8fe3 b64.patch 2d4b117397e6882b0f4357bb11ca1f520746c59e0305a58f8651582a9cff17f4c59cacb14ce93de1d0fe78db5ba7fd9096c0176afc61b2c715b0b9a0444c2b4f base64.c "