summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2015-11-24 16:14:54 -0500
committerMike Frysinger <vapier@gentoo.org>2015-11-24 17:01:27 -0500
commit733183e990df8ca3ab8d72a0fc8bf24b6c4b3d04 (patch)
tree59f9787c922351aa8bbfe1ca09ab3d41f8223c94 /sys-apps/net-tools
parentdev-lang/python: mark 3.4.3/2.7.10r1 arm64/m68k/s390/sh stable (diff)
downloadgentoo-733183e990df8ca3ab8d72a0fc8bf24b6c4b3d04.tar.gz
gentoo-733183e990df8ca3ab8d72a0fc8bf24b6c4b3d04.tar.bz2
gentoo-733183e990df8ca3ab8d72a0fc8bf24b6c4b3d04.zip
sys-apps/net-tools: add USE flags to control arp/hostname/nis/plipconfig/slattach programs #128538
Default the old crufty stuff to off (parallel port, serial port, and NIS/YP).
Diffstat (limited to 'sys-apps/net-tools')
-rw-r--r--sys-apps/net-tools/metadata.xml4
-rw-r--r--sys-apps/net-tools/net-tools-1.60_p20151124144947.ebuild36
-rw-r--r--sys-apps/net-tools/net-tools-9999.ebuild36
3 files changed, 70 insertions, 6 deletions
diff --git a/sys-apps/net-tools/metadata.xml b/sys-apps/net-tools/metadata.xml
index cd6f2273ff86..8ba2926c8a79 100644
--- a/sys-apps/net-tools/metadata.xml
+++ b/sys-apps/net-tools/metadata.xml
@@ -3,7 +3,11 @@
<pkgmetadata>
<herd>base-system</herd>
<use>
+ <flag name='arp'>build the arp and rarp tools (for manipulating the ARP cache)</flag>
+ <flag name='hostname'>build the hostname and dnsdomainname tools</flag>
<flag name='old-output'>use old ifconfig output style (useful for when new output breaks scripts)</flag>
+ <flag name='plipconfig'>build the plipconfig tool (for working with old PLIP hardware)</flag>
+ <flag name='slattach'>build the slattach tool (for working with old serial ports)</flag>
</use>
<upstream>
<remote-id type='sourceforge'>net-tools</remote-id>
diff --git a/sys-apps/net-tools/net-tools-1.60_p20151124144947.ebuild b/sys-apps/net-tools/net-tools-1.60_p20151124144947.ebuild
index 40970a43c2e1..059a1aaef1ad 100644
--- a/sys-apps/net-tools/net-tools-1.60_p20151124144947.ebuild
+++ b/sys-apps/net-tools/net-tools-1.60_p20151124144947.ebuild
@@ -19,16 +19,18 @@ HOMEPAGE="http://net-tools.sourceforge.net/"
LICENSE="GPL-2"
SLOT="0"
-IUSE="ipv6 nls selinux static"
+IUSE="+arp +hostname ipv6 nis nls plipconfig selinux slattach static"
-RDEPEND="!<sys-apps/openrc-0.9.9.3
- selinux? ( sys-libs/libselinux )"
+RDEPEND="selinux? ( sys-libs/libselinux )"
DEPEND="${RDEPEND}
selinux? ( virtual/pkgconfig )
app-arch/xz-utils"
if [[ ${PV} == "9999" ]]; then
DEPEND+=" nls? ( sys-devel/gettext )"
fi
+RDEPEND+="
+ hostname? ( !sys-apps/coreutils[hostname] )
+ !<sys-apps/openrc-0.9.9.3"
maint_pkg_create() {
cd /usr/local/src/net-tools
@@ -72,3 +74,31 @@ src_configure() {
tc-export AR CC
yes "" | ./configure.sh config.in || die
}
+
+src_install() {
+ default
+
+ # TODO: Make these into config knobs upstream.
+ if ! use arp ; then
+ rm "${ED}"/sbin/{,r}arp "${ED}"/usr/share/man/man8/{,r}arp.8* || die
+ fi
+ if ! use hostname ; then
+ if use nis ; then
+ # Since all the tools are symlinks, repoint them.
+ rm "${ED}"/bin/domainname || die
+ cp -p "${ED}"/bin/{host,domain}name || die
+ dosym domainname /bin/nisdomainname
+ dosym domainname /bin/ypdomainname
+ fi
+ rm "${ED}"/bin/{host,dnsdomain}name "${ED}"/usr/share/man/man1/{host,dnsdomain}name.1* || die
+ fi
+ if ! use nis ; then
+ rm "${ED}"/bin/{,nis,yp}domainname "${ED}"/usr/share/man/man1/{,nis,yp}domainname.1* || die
+ fi
+ if ! use plipconfig ; then
+ rm "${ED}"/sbin/plipconfig "${ED}"/usr/share/man/man8/plipconfig.8* || die
+ fi
+ if ! use slattach ; then
+ rm "${ED}"/sbin/slattach "${ED}"/usr/share/man/man8/slattach.8* || die
+ fi
+}
diff --git a/sys-apps/net-tools/net-tools-9999.ebuild b/sys-apps/net-tools/net-tools-9999.ebuild
index 40970a43c2e1..059a1aaef1ad 100644
--- a/sys-apps/net-tools/net-tools-9999.ebuild
+++ b/sys-apps/net-tools/net-tools-9999.ebuild
@@ -19,16 +19,18 @@ HOMEPAGE="http://net-tools.sourceforge.net/"
LICENSE="GPL-2"
SLOT="0"
-IUSE="ipv6 nls selinux static"
+IUSE="+arp +hostname ipv6 nis nls plipconfig selinux slattach static"
-RDEPEND="!<sys-apps/openrc-0.9.9.3
- selinux? ( sys-libs/libselinux )"
+RDEPEND="selinux? ( sys-libs/libselinux )"
DEPEND="${RDEPEND}
selinux? ( virtual/pkgconfig )
app-arch/xz-utils"
if [[ ${PV} == "9999" ]]; then
DEPEND+=" nls? ( sys-devel/gettext )"
fi
+RDEPEND+="
+ hostname? ( !sys-apps/coreutils[hostname] )
+ !<sys-apps/openrc-0.9.9.3"
maint_pkg_create() {
cd /usr/local/src/net-tools
@@ -72,3 +74,31 @@ src_configure() {
tc-export AR CC
yes "" | ./configure.sh config.in || die
}
+
+src_install() {
+ default
+
+ # TODO: Make these into config knobs upstream.
+ if ! use arp ; then
+ rm "${ED}"/sbin/{,r}arp "${ED}"/usr/share/man/man8/{,r}arp.8* || die
+ fi
+ if ! use hostname ; then
+ if use nis ; then
+ # Since all the tools are symlinks, repoint them.
+ rm "${ED}"/bin/domainname || die
+ cp -p "${ED}"/bin/{host,domain}name || die
+ dosym domainname /bin/nisdomainname
+ dosym domainname /bin/ypdomainname
+ fi
+ rm "${ED}"/bin/{host,dnsdomain}name "${ED}"/usr/share/man/man1/{host,dnsdomain}name.1* || die
+ fi
+ if ! use nis ; then
+ rm "${ED}"/bin/{,nis,yp}domainname "${ED}"/usr/share/man/man1/{,nis,yp}domainname.1* || die
+ fi
+ if ! use plipconfig ; then
+ rm "${ED}"/sbin/plipconfig "${ED}"/usr/share/man/man8/plipconfig.8* || die
+ fi
+ if ! use slattach ; then
+ rm "${ED}"/sbin/slattach "${ED}"/usr/share/man/man8/slattach.8* || die
+ fi
+}