### this file is sourced not run
PKGVER=1.234.deb2
PKGBUILD=1
PKGARCH=x86_64

# source: james
TARBALL=netcat-openbsd_1.234.orig.tar.gz
MD5SUM=c3906f02d5a070afd8ac23ec983fc746
SRC_URL=http://deb.debian.org/debian/pool/main/n/netcat-openbsd/$TARBALL
BUNDLE=

SLACKREQ=libbsd
SLACKDESC="nc-openbsd: nc-openbsd $PKGVER (OpenBSD version of Netcat)
nc-openbsd: 
nc-openbsd: nc-openbsd is the OpenBSD version of netcat. It can be used for just 
nc-openbsd: about anything under the sun involving TCP, UDP, or UNIX-domain 
nc-openbsd: sockets. It can open TCP connections, send UDP packets, listen on 
nc-openbsd: arbitrary TCP and UDP ports, do port scanning, and deal with both 
nc-openbsd: IPv4 and IPv6.
nc-openbsd: 
nc-openbsd: This one is built using debian patches.
nc-openbsd: https://packages.debian.org/sid/netcat-openbsd
nc-openbsd: 
"

### default pkg_download
### prepare
pkg_prepare() {
	pkg_prepare_default &&
	tar -xf tmp/pkg/netcat-openbsd_1.234-2.debian.tar.xz -C tmp/netcat* &&
	(
	cd tmp/netcat* &&
	while read p; do
		patch -Np1 -i debian/patches/$p || return 1
	done < debian/patches/series
	)
}

### default pkg_package
### build
pkg_build() {
	cd /tmp/netcat* &&
	make &&
	install -m755 nc /usr/bin/nc-openbsd &&
	install -m644 nc.1 /usr/share/man/man1/nc-openbsd.1 &&
	pkg_build_slackdesc
}


