desktop/openbsd-netcat/PKGBUILD
2018-07-20 11:10:59 +02:00

42 lines
1.3 KiB
Bash

#
# Chakra Packages for Chakra, part of chakra-project.org
#
# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Contributor: Andrej Gelenberg <andrej.gelenberg@udo.edu>
pkgname=openbsd-netcat
_pkgver=1.190
_pkgver_debrel=2
pkgver="${_pkgver}.${_pkgver_debrel}"
pkgrel=1
pkgdesc="TCP/IP swiss army knife. OpenBSD variant."
arch=('x86_64')
url="http://packages.debian.org/sid/netcat-openbsd"
license=('BSD')
depends=('glib2' 'libbsd')
makedepends=('gcc' 'make')
provides=(netcat)
conflicts=('gnu-netcat')
source=("http://ftp.debian.org/debian/pool/main/n/netcat-openbsd/netcat-openbsd_${_pkgver}.orig.tar.gz"
"http://ftp.debian.org/debian/pool/main/n/netcat-openbsd/netcat-openbsd_${_pkgver}-${_pkgver_debrel}.debian.tar.xz")
md5sums=('dd32fd1d7903b541ad8709794539b959'
'78058b7af0170654b877b02c37716cdf')
build() {
cd "${srcdir}/netcat-openbsd-${_pkgver}"
for i in $(cat ../debian/patches/series); do
echo "** patch ${i}" 1>&2
cat "../debian/patches/${i}"
done | patch -p1
make CFLAGS="${CFLAGS} -DDEBIAN_VERSION=\"\\\"${_pkgver_debrel}\\\"\" -I/usr/include/libbsd" \
LDFLAGS="$LDFLAGS -lbsd"
}
package() {
cd "${srcdir}/netcat-openbsd-${_pkgver}"
install -d "${pkgdir}/usr/bin"
install -d "${pkgdir}/usr/share/man/man1"
install nc "${pkgdir}/usr/bin/nc.openbsd"
install nc.1 "${pkgdir}/usr/share/man/man1/nc.openbsd.1"
}