From 04c81665d5245dca3640a64a6ec3fb85f56b7463 Mon Sep 17 00:00:00 2001 From: Dominic Monroe Date: Fri, 28 Apr 2017 11:04:57 +0100 Subject: [PATCH] net-tools: Add hostname to alternatives --- srcpkgs/net-tools/template | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/srcpkgs/net-tools/template b/srcpkgs/net-tools/template index c945c18d446..177c494ccd7 100644 --- a/srcpkgs/net-tools/template +++ b/srcpkgs/net-tools/template @@ -1,7 +1,7 @@ # Template file for 'net-tools' pkgname=net-tools version=1.60.20150526git -revision=3 +revision=4 hostmakedepends="git" short_desc="Basic networking tools" maintainer="Juan RP " @@ -10,7 +10,9 @@ license="GPL-2" alternatives=" ifconfig:ifconfig:/usr/bin/${pkgname}-ifconfig - ifconfig:/usr/share/man/man1/ifconfig.1:/usr/share/man/man8/${pkgname}-ifconfig.8" + ifconfig:/usr/share/man/man1/ifconfig.1:/usr/share/man/man8/${pkgname}-ifconfig.8 + hostname:hostname:/usr/bin/${pkgname}-hostname + hostname:/usr/share/man/man1/hostname.1:/usr/share/man/man8/${pkgname}-hostname.1" do_fetch() { git clone git://git.code.sf.net/p/net-tools/code ${pkgname}-${version} @@ -51,9 +53,9 @@ do_install() { # Rename ifconfig for alternatives. mv ${DESTDIR}/usr/bin/{ifconfig,${pkgname}-ifconfig} mv ${DESTDIR}/usr/share/man/man8/{ifconfig,${pkgname}-ifconfig}.8 - # Remove hostname(1), conflicts with coreutils/busybox. - rm ${DESTDIR}/usr/bin/hostname - rm ${DESTDIR}/usr/share/man/man1/hostname.1 + # Rename hostname(1) for alternatives. + mv ${DESTDIR}/usr/bin/{hostname,${pkgname}-hostname} + mv ${DESTDIR}/usr/share/man/man1/{hostname,${pkgname}-hostname}.1 # Remove dnsdomainname(1), conflicts with busybox/inetutils. rm ${DESTDIR}/usr/bin/*domainname rm ${DESTDIR}/usr/share/man/man1/*domainname*