void-packages/srcpkgs/openbsd-netcat/template
2017-07-11 17:56:46 +02:00

40 lines
1.3 KiB
Bash

# Template file for 'openbsd-netcat'
pkgname=openbsd-netcat
version=1.178
revision=3
wrksrc="netcat-openbsd-${version%p*}"
hostmakedepends="pkg-config"
makedepends="libbsd-devel"
short_desc="TCP/IP swiss army knife (OpenBSD/Debian variant)"
maintainer="Leah Neukirchen <leah@vuxu.org>"
license="3-clause-BSD,2-clause-BSD"
homepage="http://packages.debian.org/sid/netcat-openbsd"
distfiles="
${DEBIAN_SITE}/main/n/netcat-openbsd/netcat-openbsd_${version%p*}.orig.tar.gz
${DEBIAN_SITE}/main/n/netcat-openbsd/netcat-openbsd_${version}-2.debian.tar.xz"
checksum="918330a41ee8ea938144ab1c59fa27533654ebff983bfb5255f730a3d9b06239
4f48b9758eaa1e7148ce44a5dceaf9548f80ed8e1316f3e85f648ec39cc43c4f"
alternatives="
nc:nc:/usr/bin/openbsd-nc
nc:nc.1:/usr/share/man/man1/openbsd-nc.1"
do_build() {
# XXX TODO re-enable TLS
( cd ../debian/patches; xargs cat <series; ) | patch -p1
case "$XBPS_TARGET_MACHINE" in
*-musl) # Add missing b64_ntop() and b64_pton() functions
cp ${FILESDIR}/base64.c .
sed -i Makefile -e "/SRCS=/s;\(.*\);& base64.c;"
;;
esac
make ${makejobs} \
CFLAGS="$CFLAGS -DDEBIAN_VERSION=\"\\\"${version}\\\"\" $(pkg-config libbsd --cflags)" \
LDFLAGS="$LDFLAGS $(pkg-config libbsd --libs)"
}
do_install() {
vbin nc openbsd-nc
vman nc.1 openbsd-nc.1
vlicense ../debian/copyright LICENSE
}