summaryrefslogtreecommitdiff
path: root/system/net-tools/APKBUILD
blob: bbe35e72d1d0810a9bb615852ae9e270d11c2678 (plain) (blame)
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
# Contributor: Natanael Copa <ncopa@alpinelinux.org>
# Maintainer: Dan Theisen <djt@hxx.in>
pkgname=net-tools
pkgver=1.60_git20140218
_ver=${pkgver%_git*}
pkgrel=3
pkgdesc="Linux networking base tools"
url="https://sourceforge.net/projects/net-tools/"
arch="all"
license="GPL-2.0+"
depends="mii-tool"
depends_dev=""
# we need gettext for 'msgfmt'
makedepends="$depends_dev bash linux-headers bluez-dev"
options="!check"  # there is no testsuite for this package
install=""
subpackages="$pkgname-doc $pkgname-lang $pkgname-dbg mii-tool:mii_tool"
source="https://downloads.sourceforge.net/project/$pkgname/$pkgname-$_ver.tar.bz2
	git.patch
	musl-fixes.patch
	"

builddir="$srcdir"/$pkgname-$_ver
prepare() {
	cd "$builddir"
	default_prepare
	cat > config.make <<EOF
I18N=1
HAVE_AFUNIX=1
HAVE_AFINET=1
HAVE_AFINET6=1
# HAVE_AFIPX=0
# HAVE_AFATALK=0
# HAVE_AFAX25=0
HAVE_AFNETROM=1
# HAVE_AFROSE=0
# HAVE_AFX25=0
# HAVE_AFECONET=0
# HAVE_AFDECnet=0
# HAVE_AFASH=0
HAVE_AFBLUETOOTH=1
HAVE_HWETHER=1
# HAVE_HWARC=0
HAVE_HWSLIP=1
HAVE_HWPPP=1
HAVE_HWTUNNEL=1
# HAVE_HWSTRIP=0
# HAVE_HWTR=0
# HAVE_HWAX25=0
# HAVE_HWROSE=0
HAVE_HWNETROM=1
# HAVE_HWX25=0
# HAVE_HWFR=0
# HAVE_HWSIT=0
# HAVE_HWFDDI=0
# HAVE_HWHIPPI=0
# HAVE_HWASH=0
# HAVE_HWHDLCLAPB=0
HAVE_HWIRDA=1
# HAVE_HWEC=0
# HAVE_HWEUI64=0
# HAVE_HWIB=0
HAVE_FW_MASQUERADE=1
HAVE_IP_TOOLS=1
HAVE_MII=1
EOF
	sed -n -e 's/^\(HAVE.*\)=\(.*\)/#define \1 \2/p' config.make > config.h
}

build() {
	cd "$builddir"
	make
}

package() {
	cd "$builddir"
	make DESTDIR="$pkgdir" install
}

mii_tool() {
	pkgdesc="media-independent interface (MII) tool"
	depends=
	mkdir -p "$subpkgdir"/sbin
	mv "$pkgdir"/sbin/mii-tool "$subpkgdir"/sbin/
}

md5sums="888774accab40217dde927e21979c165  net-tools-1.60.tar.bz2
fe7b9dfa9f68adcf6ca23b9616decdb4  git.patch
d57bcd8c1aa8b92b1128a4fea4f033df  musl-fixes.patch"
sha256sums="7ae4dd6d44d6715f18e10559ffd270511b6e55a8900ca54fbebafe0ae6cf7d7b  net-tools-1.60.tar.bz2
6e0acc8f88135f2e12b79777914a732c64789b1f629ea97c1860ed324b21724c  git.patch
538f0115911867423d27ee9b3fcc1177e339b474c131332eb7758f5c220928e1  musl-fixes.patch"
sha512sums="8e1ae9bca726ad7d795a06c58388f9e11c1d617d94eebb9ed18bd11e5f34c6541e1ffe631706c407996db86e78df6e5cf1968a2d90b242b473596fda3b6d1eae  net-tools-1.60.tar.bz2
5edc92e8cf46da11898ac1999cfccb5b7ae3407f649c75c2da43c4264e1271b010eafbc84283e4c41219870bf89722e09666b25d28c84cb4ac60ceebee9adb2d  git.patch
08c9e7681e069a42f4da714faf0b93ad1c569cf942a94a1b41103e86850235b507c0291e2f3839c84dd02aba0b1a16d79580fbfc55dd2af8d09b0ff71d714e9f  musl-fixes.patch"