summaryrefslogtreecommitdiff
path: root/community/openbsd-netcat/PKGBUILD
blob: bcc1f52f60e89326cc059e8e10de835d007e7c0b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# $Id: PKGBUILD 70324 2012-05-04 10:32:12Z spupykin $
# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Contributor: Andrej Gelenberg <andrej.gelenberg@udo.edu>

pkgname="openbsd-netcat"
pkgver=1.105
pkgrel=3
_patch=6
pkgdesc="TCP/IP swiss army knife. OpenBSD variant."
arch=('i686' 'x86_64' 'mips64el')
url="http://packages.debian.org/sid/netcat-openbsd"
license=('BSD')
depends=('libbsd')
makedepends=('gcc' 'make')
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}-${_patch}.debian.tar.gz")
md5sums=('7e67b22f1ad41a1b7effbb59ff28fca1'
         '1928b269b86d404ffb8ff57d3ead1d2c')

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=\"\\\"${pkgrel}\\\"\" -I/usr/include/libbsd" \
	LDFLAGS="$LDFLAGS -lbsd"
}

package() {
  cd $srcdir/netcat-openbsd-${pkgver}
  install -Dm0755 nc $pkgdir/usr/bin/nc.openbsd
  install -Dm0644 nc.1 $pkgdir/usr/share/man/man1/nc.openbsd.1
  install -dm0755 $pkgdir/usr/share/licenses/$pkgname/
  head -n28 netcat.c | tail -n+2 >$pkgdir/usr/share/licenses/$pkgname/LICENSE
}