From 497f09a0252228d6a8e53a7830d0231b6d178f34 Mon Sep 17 00:00:00 2001 From: 0x5c Date: Wed, 27 Apr 2022 04:15:09 -0400 Subject: [PATCH] net-tools: update to 2.10, adopt. Also cleaned up the template and made the build system behave slightly better. --- srcpkgs/net-tools/template | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/srcpkgs/net-tools/template b/srcpkgs/net-tools/template index 384feba77fb9..b320c3183b32 100644 --- a/srcpkgs/net-tools/template +++ b/srcpkgs/net-tools/template @@ -1,15 +1,15 @@ # Template file for 'net-tools' pkgname=net-tools -version=1.60.20181103git +version=2.10 revision=1 -_githash=0eebece8c964e3cfa8a018f42b2e7e751a7009a0 -wrksrc="${pkgname}-${_githash}" +build_style="gnu-makefile" +make_use_env=yes short_desc="Basic networking tools" -maintainer="Orphaned " +maintainer="0x5c " license="GPL-2.0-or-later" homepage="https://github.com/ecki/net-tools" -distfiles="https://github.com/ecki/net-tools/archive/${_githash}.tar.gz" -checksum=795cb4dd2618ed7ff9a48b9cb63b33780b47dfd7464c8e52ba734e6796cbab17 +distfiles="https://github.com/ecki/net-tools/archive/refs/tags/v${version}.tar.gz" +checksum=8e186f65f0ff304989b3dc8b0067c3a07d36ae777da60667bdd6ccb2730908d2 alternatives=" ifconfig:ifconfig:/usr/bin/${pkgname}-ifconfig @@ -17,9 +17,10 @@ alternatives=" hostname:hostname:/usr/bin/${pkgname}-hostname hostname:/usr/share/man/man1/hostname.1:/usr/share/man/man8/${pkgname}-hostname.1" -pre_build() { - vsed -i "s#/sbin#/bin#" Makefile - vsed -i "s#/usr##" man/Makefile +post_patch() { + # Hacky and flaky, but upstream does not support $PREFIX ! + vsed -e "s|/sbin|/bin|" -i Makefile + vsed -e "s|/bin|/usr/bin|" -i Makefile case "$XBPS_TARGET_MACHINE" in *-musl) # HZ is defined in @@ -27,20 +28,18 @@ pre_build() { -e "/#include /a #include " vsed -i ${wrksrc}/netstat.c \ -e "/#include /a #include " - # Need for tty constants and structure vsed -i ${wrksrc}/slattach.c \ -e "/#include /a #include " esac } -do_build() { +do_configure() { replace_interpreter bash configure.sh - yes "" | make + yes "" | make config } -do_install() { - make DESTDIR=${DESTDIR}/usr update +post_install() { # Rename ifconfig for alternatives. mv ${DESTDIR}/usr/bin/{ifconfig,${pkgname}-ifconfig} mv ${DESTDIR}/usr/share/man/man8/{ifconfig,${pkgname}-ifconfig}.8