summaryrefslogtreecommitdiff
path: root/repo/util/net-tools.xibuild
blob: af7cf619ddbd64c30a93714f555f63ab93fb87a7 (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
58
59
60
61
62
63
64
65
66
67
68
69
70
#!/bin/sh

MAKEDEPS="make "
DEPS="pam libcap readline ncurses libxcrypt utmps iana-etc net-tools"

PKG_VER=2.10
SOURCE=https://downloads.sourceforge.net/project/net-tools/net-tools-$PKG_VER.tar.xz
ADDITIONAL="
    musl-fixes.patch
"

DESC="Linux networking base tools"

prepare () {
    apply_patches
    cat > config.make <<EOF
# I18N=0
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=0
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=0
# HAVE_HWEC=0
# HAVE_HWEUI64=0
# HAVE_HWIB=0
HAVE_FW_MASQUERADE=1
HAVE_ARP_TOOLS=1
HAVE_HOSTNAME_TOOLS=1
HAVE_HOSTNAME_SYMLINKS=1
HAVE_IP_TOOLS=1
HAVE_MII=1
HAVE_PLIP_TOOLS=1
HAVE_SERIAL_TOOLS=1
EOF
	sed -n -e 's/^\(HAVE.*\)=\(.*\)/#define \1 \2/p' config.make > config.h
}

build () {
    make
}

package () {
    make DESTDIR=$PKG_DEST install 
}