net-tools: update to 2.10, adopt.
Also cleaned up the template and made the build system behave slightly better.
This commit is contained in:
parent
169fd21d38
commit
f0bf25dda1
|
@ -1,15 +1,15 @@
|
||||||
# Template file for 'net-tools'
|
# Template file for 'net-tools'
|
||||||
pkgname=net-tools
|
pkgname=net-tools
|
||||||
version=1.60.20181103git
|
version=2.10
|
||||||
revision=1
|
revision=1
|
||||||
_githash=0eebece8c964e3cfa8a018f42b2e7e751a7009a0
|
build_style="gnu-makefile"
|
||||||
wrksrc="${pkgname}-${_githash}"
|
make_use_env=yes
|
||||||
short_desc="Basic networking tools"
|
short_desc="Basic networking tools"
|
||||||
maintainer="Orphaned <orphan@voidlinux.org>"
|
maintainer="0x5c <dev@0x5c.io>"
|
||||||
license="GPL-2.0-or-later"
|
license="GPL-2.0-or-later"
|
||||||
homepage="https://github.com/ecki/net-tools"
|
homepage="https://github.com/ecki/net-tools"
|
||||||
distfiles="https://github.com/ecki/net-tools/archive/${_githash}.tar.gz"
|
distfiles="https://github.com/ecki/net-tools/archive/refs/tags/v${version}.tar.gz"
|
||||||
checksum=795cb4dd2618ed7ff9a48b9cb63b33780b47dfd7464c8e52ba734e6796cbab17
|
checksum=8e186f65f0ff304989b3dc8b0067c3a07d36ae777da60667bdd6ccb2730908d2
|
||||||
|
|
||||||
alternatives="
|
alternatives="
|
||||||
ifconfig:ifconfig:/usr/bin/${pkgname}-ifconfig
|
ifconfig:ifconfig:/usr/bin/${pkgname}-ifconfig
|
||||||
|
@ -17,9 +17,10 @@ alternatives="
|
||||||
hostname:hostname:/usr/bin/${pkgname}-hostname
|
hostname:hostname:/usr/bin/${pkgname}-hostname
|
||||||
hostname:/usr/share/man/man1/hostname.1:/usr/share/man/man8/${pkgname}-hostname.1"
|
hostname:/usr/share/man/man1/hostname.1:/usr/share/man/man8/${pkgname}-hostname.1"
|
||||||
|
|
||||||
pre_build() {
|
post_patch() {
|
||||||
vsed -i "s#/sbin#/bin#" Makefile
|
# Hacky and flaky, but upstream does not support $PREFIX !
|
||||||
vsed -i "s#/usr##" man/Makefile
|
vsed -e "s|/sbin|/bin|" -i Makefile
|
||||||
|
vsed -e "s|/bin|/usr/bin|" -i Makefile
|
||||||
case "$XBPS_TARGET_MACHINE" in
|
case "$XBPS_TARGET_MACHINE" in
|
||||||
*-musl)
|
*-musl)
|
||||||
# HZ is defined in <asm/param.h>
|
# HZ is defined in <asm/param.h>
|
||||||
|
@ -27,20 +28,18 @@ pre_build() {
|
||||||
-e "/#include <sys\/param.h>/a #include <asm\/param.h>"
|
-e "/#include <sys\/param.h>/a #include <asm\/param.h>"
|
||||||
vsed -i ${wrksrc}/netstat.c \
|
vsed -i ${wrksrc}/netstat.c \
|
||||||
-e "/#include <sys\/param.h>/a #include <asm\/param.h>"
|
-e "/#include <sys\/param.h>/a #include <asm\/param.h>"
|
||||||
|
|
||||||
# Need <termios.h> for tty constants and structure
|
# Need <termios.h> for tty constants and structure
|
||||||
vsed -i ${wrksrc}/slattach.c \
|
vsed -i ${wrksrc}/slattach.c \
|
||||||
-e "/#include <limits.h>/a #include <termios.h>"
|
-e "/#include <limits.h>/a #include <termios.h>"
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
do_build() {
|
do_configure() {
|
||||||
replace_interpreter bash configure.sh
|
replace_interpreter bash configure.sh
|
||||||
yes "" | make
|
yes "" | make config
|
||||||
}
|
}
|
||||||
|
|
||||||
do_install() {
|
post_install() {
|
||||||
make DESTDIR=${DESTDIR}/usr update
|
|
||||||
# Rename ifconfig for alternatives.
|
# Rename ifconfig for alternatives.
|
||||||
mv ${DESTDIR}/usr/bin/{ifconfig,${pkgname}-ifconfig}
|
mv ${DESTDIR}/usr/bin/{ifconfig,${pkgname}-ifconfig}
|
||||||
mv ${DESTDIR}/usr/share/man/man8/{ifconfig,${pkgname}-ifconfig}.8
|
mv ${DESTDIR}/usr/share/man/man8/{ifconfig,${pkgname}-ifconfig}.8
|
||||||
|
|
Loading…
Reference in New Issue
Block a user