40 lines
1.2 KiB
Bash
40 lines
1.2 KiB
Bash
# Template file for 'openbsd-netcat'
|
|
pkgname=openbsd-netcat
|
|
version=1.105p7
|
|
revision=3
|
|
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/p/-}.debian.tar.gz"
|
|
checksum="
|
|
40653fe66c1516876b61b07e093d826e2a5463c5d994f1b7e6ce328f3edb211e
|
|
eee759327ffea293e81d0dde67921b7fcfcad279ffd7a2c9d037bbc8f882b363"
|
|
|
|
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
|
|
}
|