summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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
+}