summaryrefslogtreecommitdiff
path: root/core/iproute2/MAKEPKG
blob: 9b8dac23d706df9db7404d3c5101e82bf7655800 (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
#!/bin/mkpkg
# description: IP routing utilities
# url: https://wiki.linuxfoundation.org/networking/iproute2

name=iproute2
version=7.2.0
release=1
depends=(libcap2 libmnl libelf)
makedeps=(bison pkgconf)
source=(https://www.kernel.org/pub/linux/utils/net/$name/$name-$version.tar.xz
        0001-fix-musl-missing-types.patch)
sha256sums=(
    "4c2fa124c2cf0afd7ca34d1eeacba6ba048a56f6374e2aab93dafbdbd4eea9c0"
    "1b8b38a59c5b49eb5319939135c2ddf1dee36a15aca71d5f9a0634429714727a"
)

patch() {
    cd $name-$version
    patch -p1 -i $SRC/0001-fix-musl-missing-types.patch
}

build() {
    cd $name-$version
    CC=clang ./configure \
        --color never \
        --libbpf_force off \
        --prefix=/
    make CC=clang HOSTCC=clang HAVE_TIRPC=n V=1
    make CC=clang HOSTCC=clang HAVE_TIRPC=n DESTDIR=$PKG SBINDIR=/bin install
    rm -f $PKG/bin/arpd $PKG/bin/dcb $PKG/bin/devlink $PKG/bin/genl
    rm -f $PKG/bin/ifstat $PKG/bin/lnstat $PKG/bin/ctstat $PKG/bin/rtstat
    rm -f $PKG/bin/netshaper $PKG/bin/nstat $PKG/bin/rdma $PKG/bin/routel
    rm -f $PKG/bin/rtacct $PKG/bin/rtmon $PKG/bin/tipc $PKG/bin/vdpa
    rm -rf $PKG/usr
    rm -rf $PKG/share
    rm -rf $PKG/lib/bash-completion
}

signify() {
    untrusted comment: public key
    RWTZ9IduCSQ/mL8337TEUinPwT92xFEUpD92hkS7IxcOnzTt9QdpohT3
}

# vim: filetype=sh