44 lines
1.3 KiB
Bash
44 lines
1.3 KiB
Bash
# Template file for 'openbsd-netcat'
|
|
pkgname=openbsd-netcat
|
|
version=1.219
|
|
revision=1
|
|
create_wrksrc=yes
|
|
hostmakedepends="pkg-config"
|
|
makedepends="libbsd-devel"
|
|
short_desc="TCP/IP swiss army knife (OpenBSD/Debian variant)"
|
|
maintainer="Leah Neukirchen <leah@vuxu.org>"
|
|
license="BSD-2-Clause,BSD-3-Clause"
|
|
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="576487c3a4930987a5dc7b369340f07f3ef15abe7cd743d88036990bd8d89dca
|
|
3f5f801bacd740075d563137387004a6e651d56801e369026c2387a041b4d357"
|
|
|
|
alternatives="
|
|
nc:nc:/usr/bin/openbsd-nc
|
|
nc:nc.1:/usr/share/man/man1/openbsd-nc.1"
|
|
|
|
post_extract() {
|
|
mv netcat-openbsd-${version}/* .
|
|
( cd debian/patches; xargs cat <series; ) | patch -p1
|
|
}
|
|
|
|
do_build() {
|
|
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
|
|
}
|