aboutsummaryrefslogtreecommitdiffstats
path: root/main/netcat-openbsd/APKBUILD
blob: 1d98c0be317146fd903c11311840d0bc3afb2431 (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
50
51
52
53
54
55
56
57
# Maintainer: Leonardo Arena <rnalrd@alpinelinux.org>
pkgname=netcat-openbsd
pkgver=1.89
pkgrel=2
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://distfiles.alpinelinux.org/distfiles/${pkgname}_$pkgver.orig.tar.gz
	netcat-openbsd_1.89-4.diff
	fix-cdefs.patch
	"

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

prepare() {
	local i

	cd "$_builddir"
	for i in $source; do
		case $i in
		*.patch|*.diff) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
		esac
	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
c9161b439eb4c4a75295be39ad32d1ac  fix-cdefs.patch"
sha256sums="72e844dde8a2a7cba61971d493758dbea9ef0b164bccef15fd4a36490dc77f2b  netcat-openbsd_1.89.orig.tar.gz
4faa7854302889e06a376f03b2113beeae5443de59bdc0de155ab1e0902e28e9  netcat-openbsd_1.89-4.diff
4bf424667b7321a895e48bb9fafcc7b85b578fcecd27d1b982f9e28350429b6c  fix-cdefs.patch"
sha512sums="4e18289c507461fb8257e466ab082a2b18489218c3065af5b4626369cd3acb378f68eb69cfe77ff46d5fba222c12e2bc30dc71c0a88d2921a7e513b926b8b75d  netcat-openbsd_1.89.orig.tar.gz
8ec30df716d91ec26102ecf76a47d456cd287511516319d28a6b99467e256e158789bc2bfafbd5e13b3effd9237c158eefd6cfd5ba014570395813bccf469ef1  netcat-openbsd_1.89-4.diff
b70e19344c358ece0c5edcafc2be3df3b09c0fcbef95dc21e0bf8fe31593905a3191870cc9bb5eb707d12748d727276a19918c3998277d6f0a9a10954931a0a0  fix-cdefs.patch"