summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'sys-apps/nictools/nictools-20030719.ebuild')
-rw-r--r--sys-apps/nictools/nictools-20030719.ebuild59
1 files changed, 59 insertions, 0 deletions
diff --git a/sys-apps/nictools/nictools-20030719.ebuild b/sys-apps/nictools/nictools-20030719.ebuild
new file mode 100644
index 000000000000..d238f50abf0e
--- /dev/null
+++ b/sys-apps/nictools/nictools-20030719.ebuild
@@ -0,0 +1,59 @@
+# Copyright 1999-2003 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/nictools/nictools-20030719.ebuild,v 1.1 2003/07/20 04:07:37 robbat2 Exp $
+
+DESCRIPTION="nictools - diagnostic tools for a variety of ISA and PCI network cards"
+HOMEPAGE="http://www.scyld.com/diag/index.html"
+# The tarball is a slightly modified version compiled of the _latest_ versions
+# of the files from all of the debian package, and the entirely of the Scyld
+# website.
+# It has a vastly modified Makefile to make it easy to build on Gentoo
+SRC_URI="mirrors:/gentoo/${P}.tbz2"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~x86"
+IUSE="static"
+DEPEND=""
+
+S=${WORKDIR}/${P}
+
+nictools_grabvar() {
+ gmake VAR="${1}" printvar
+}
+
+nictools_setupcards() {
+ if [ -z "${NICTOOLS_CARDS}" ]; then
+ NICTOOLS_CARDS="pci isa"
+ fi
+ for card in ${NICTOOLS_CARDS}; do
+ UPPER=`echo ${card} | tr '[:lower:]' '[:upper:]'`
+ NICTOOLS_INSTALL="${NICTOOLS_INSTALL} `nictools_grabvar ${UPPER}`"
+ NICTOOLS_INSTALL="${NICTOOLS_INSTALL} `nictools_grabvar ${card}`"
+ done
+ NICTOOLS_INSTALL="${NICTOOLS_INSTALL} `nictools_grabvar UTILS`"
+ NICTOOLS_INSTALL="`echo ${NICTOOLS_INSTALL} | xargs -n1 | sort | uniq |xargs`"
+}
+
+pkg_setup() {
+ einfo "If you want the configuration tools for only PCI or ISA cards, "
+ einfo "do: 'NICTOOLS_CARDS=\"pci\" emerge nictools' or 'NICTOOLS_CARDS=\"isa\" emerge nictools'"
+}
+
+src_compile() {
+ nictools_setupcards
+ use static && CFLAGS="${CFLAGS} -static"
+ emake ${NICTOOLS_INSTALL} || die "emake failed"
+}
+
+src_install() {
+ nictools_setupcards
+ # we do this as the user might not have /usr mounted and they might want
+ # the tool to configure the network card so they can use it!
+ into /
+ for i in ${NICTOOLS_INSTALL}; do
+ dosbin ${i}
+ done
+ into /usr
+ doman netdiag.8
+}
+