void-packages/srcpkgs/openbsd-netcat/template
2016-12-13 14:10:11 +01:00

38 lines
1.2 KiB
Bash

# Template file for 'openbsd-netcat'
pkgname=openbsd-netcat
version=1.130
revision=1
wrksrc="netcat-openbsd-${version%p*}"
hostmakedepends="pkg-config"
makedepends="libbsd-devel"
short_desc="TCP/IP swiss army knife (OpenBSD/Debian variant)"
maintainer="Christian Neukirchen <chneukirchen@gmail.com>"
license="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}-1.debian.tar.xz"
checksum="fd7205065d0b47898851f31f33e614de5d47a5b9dc81fd50d2ff51b63d091e5b
f35f72984df2c5a8d9e9e1b23e72875a0f9aa78ef9eb97f92f191b7390dbffda"
alternatives="
nc:nc:/usr/bin/openbsd-nc
nc:nc.1:/usr/share/man/man1/openbsd-nc.1"
do_build() {
cat ../debian/patches/*.patch | 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
}