aboutsummaryrefslogtreecommitdiffstats
path: root/main/netcat-openbsd/APKBUILD
blob: 515f933ad560a457017d0265e1a8b84e8c9d3ded (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
38
39
40
41
42
43
44
45
46
47
48
49
# Maintainer: Leonardo Arena <rnalrd@alpinelinux.org>
pkgname=netcat-openbsd
pkgver=1.89
pkgrel=1
pkgdesc="The TCP/IP swiss army knife. OpenBSD variant."
url="http://packages.debian.org/sid/netcat-openbsd"
arch="all"
license="GPL"
depends=
depends_dev="glib-dev"
makedepends="$depends_dev"
install=
subpackages="$pkgname-doc"
source="http://ftp.debian.org/debian/pool/main/n/$pkgname/${pkgname}_${pkgver}.orig.tar.gz
	netcat-openbsd_1.89-4.diff"

_builddir="$srcdir"/$pkgname-$pkgver.orig

prepare() {
	cd "$_builddir"

	for i in ../*.diff
	do
		msg "Applying patch $i"
		patch -p1 -i $i || return 1
	done

	for i in `cat debian/patches/series`
	do
		echo "Applying patch $i" 1>&2
		patch -p1 -i "debian/patches/$i" || return 1
	done
}

build() {
	cd "$_builddir"
	make CFLAGS="$CFLAGS -DDEBIAN_VERSION=\"\\\"4\\\"\"" || return 1
}

package() {
	cd "$_builddir"
	install -d $pkgdir/usr/bin/
	install -d $pkgdir/usr/share/man/man1/
	install nc $pkgdir/usr/bin/nc
	install nc.1 $pkgdir/usr/share/man/man1/nc.openbsd.1
}

md5sums="7238ce15aae43069e96ba7faf03f153e  netcat-openbsd_1.89.orig.tar.gz
8e88cb91ca8cad6f9a75d3b84e028298  netcat-openbsd_1.89-4.diff"