summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Johanson <latexer@gentoo.org>2004-02-29 04:21:59 +0000
committerPeter Johanson <latexer@gentoo.org>2004-02-29 04:21:59 +0000
commit22e2ac0b42c585f93b42d69028568fbcbc0c13a7 (patch)
treeb197a6b6af44ae2470c69889adb1e69e09abe315 /net-wireless
parentadded ~amd64 to keywords (diff)
downloadhistorical-22e2ac0b42c585f93b42d69028568fbcbc0c13a7.tar.gz
historical-22e2ac0b42c585f93b42d69028568fbcbc0c13a7.tar.bz2
historical-22e2ac0b42c585f93b42d69028568fbcbc0c13a7.zip
Initial commit. Still has 2.6 sandbox issues for now. bug # to work because there is already a "ndiswrapper" module. That is the reason for in the INSTALL and in my doc, on the forums, there was a module called "wlan0" created.
Diffstat (limited to 'net-wireless')
-rw-r--r--net-wireless/ndiswrapper/ChangeLog12
-rw-r--r--net-wireless/ndiswrapper/Manifest5
-rw-r--r--net-wireless/ndiswrapper/files/digest-ndiswrapper-0.41
-rw-r--r--net-wireless/ndiswrapper/files/ndiswrapper.modules.d14
-rw-r--r--net-wireless/ndiswrapper/metadata.xml11
-rw-r--r--net-wireless/ndiswrapper/ndiswrapper-0.4.ebuild108
6 files changed, 151 insertions, 0 deletions
diff --git a/net-wireless/ndiswrapper/ChangeLog b/net-wireless/ndiswrapper/ChangeLog
new file mode 100644
index 000000000000..f60b5bafa694
--- /dev/null
+++ b/net-wireless/ndiswrapper/ChangeLog
@@ -0,0 +1,12 @@
+# ChangeLog for net-wireless/ndiswrapper
+# Copyright 2000-2004 Gentoo Technologies, Inc.; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/net-wireless/ndiswrapper/ChangeLog,v 1.1 2004/02/29 04:21:59 latexer Exp $
+
+*ndiswrapper-0.4 (28 Feb 2004)
+
+ 28 Feb 2004; Peter Johanson <latexer@gentoo.org> metadata.xml,
+ ndiswrapper-0.4.ebuild, files/ndiswrapper.modules.d:
+ Initial commit. Roughly based on ebuild from #38017, with large cleanups by
+ me. Includes pkg_config() function for helping generate the needed
+ /etc/modules.d/ndiswrapper file.
+
diff --git a/net-wireless/ndiswrapper/Manifest b/net-wireless/ndiswrapper/Manifest
new file mode 100644
index 000000000000..b5f442d74805
--- /dev/null
+++ b/net-wireless/ndiswrapper/Manifest
@@ -0,0 +1,5 @@
+MD5 49de1b07262dfa906a9225eae866b418 ndiswrapper-0.4.ebuild 2922
+MD5 33114f1343dfde1cc3d07c3e7052053f ChangeLog 566
+MD5 0dfb45e6e16bf37b171169afca958121 metadata.xml 429
+MD5 922f4572dd8899c80920a0aea4485be9 files/digest-ndiswrapper-0.4 66
+MD5 f27b456e9b1d79f449548aa305378312 files/ndiswrapper.modules.d 379
diff --git a/net-wireless/ndiswrapper/files/digest-ndiswrapper-0.4 b/net-wireless/ndiswrapper/files/digest-ndiswrapper-0.4
new file mode 100644
index 000000000000..dc05861db1d0
--- /dev/null
+++ b/net-wireless/ndiswrapper/files/digest-ndiswrapper-0.4
@@ -0,0 +1 @@
+MD5 f650ae5fcde0ac4a64a2acdf89aa9c36 ndiswrapper-0.4.tar.gz 47443
diff --git a/net-wireless/ndiswrapper/files/ndiswrapper.modules.d b/net-wireless/ndiswrapper/files/ndiswrapper.modules.d
new file mode 100644
index 000000000000..ef75049e5a8f
--- /dev/null
+++ b/net-wireless/ndiswrapper/files/ndiswrapper.modules.d
@@ -0,0 +1,14 @@
+# Options for ndiswrapper.
+#
+
+# Set this alias to some device. Usually wlan0 unless you've got more than one
+# wireless card.
+
+#alias wlan0 ndiswrapper
+
+# loadndisdriver requires 4 parameters.
+#
+# Uncomment the following line after you've added the paths
+# to the .sys and .inf files from Windows(tm)
+#
+#post-install ndiswrapper loadndisdriver VENDORID DEVICEID foo.sys foo.inf
diff --git a/net-wireless/ndiswrapper/metadata.xml b/net-wireless/ndiswrapper/metadata.xml
new file mode 100644
index 000000000000..dc6d96484d39
--- /dev/null
+++ b/net-wireless/ndiswrapper/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>mobile</herd>
+<maintainer>
+ <email>latexer@gentoo.org</email>
+</maintainer>
+<longdescription>ndiswrapper provides a kernel module and utility for
+implementing the Windows(tm) Ndis API. This serves to provide drivers for
+wireless cards that have no naqtive support.</longdescription>
+</pkgmetadata>
diff --git a/net-wireless/ndiswrapper/ndiswrapper-0.4.ebuild b/net-wireless/ndiswrapper/ndiswrapper-0.4.ebuild
new file mode 100644
index 000000000000..83fbc2b74049
--- /dev/null
+++ b/net-wireless/ndiswrapper/ndiswrapper-0.4.ebuild
@@ -0,0 +1,108 @@
+# Copyright 1999-2004 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-wireless/ndiswrapper/ndiswrapper-0.4.ebuild,v 1.1 2004/02/29 04:21:59 latexer Exp $
+
+inherit kernel-mod
+
+S=${WORKDIR}/${PN}
+DESCRIPTION="Wrapper for using Windows drivers for some wireless cards"
+HOMEPAGE="http://ndiswrapper.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~x86"
+IUSE=""
+DEPEND="sys-devel/flex"
+
+src_unpack() {
+ check_KV
+ kernel-mod_getversion
+ unpack ${A}
+
+ # Fix path to kernel and KVERS
+ sed -i -e "s:^KSRC.*:KSRC=${ROOT}/usr/src/linux:" \
+ -e "s:^KVERS.*:KVERS=${KV_MAJOR}${KV_MINOR}:" \
+ ${S}/driver/Makefile
+}
+
+src_compile() {
+ # Unset ARCH for 2.5/2.6 kernel compiles
+ unset ARCH
+ emake || die
+}
+
+src_install() {
+ if [ ${KV_MINOR} -gt 4 ]
+ then
+ KV_OBJ="ko"
+ else
+ KV_OBJ="o"
+ fi
+
+ dobin ${S}/utils/loadndisdriver
+ dodoc ${S}/README ${S}/INSTALL ${S}/AUTHORS
+
+ insinto /lib/modules/${KV}/misc
+ doins ${S}/driver/ndiswrapper.${KV_OBJ}
+
+ insinto /etc/modules.d
+ newins ${FILESDIR}/ndiswrapper.modules.d ndiswrapper
+}
+
+pkg_postinst() {
+ kernel-mod_pkg_postinst
+
+ einfo
+ einfo "Part of the ${PN} module configuration can be done by running"
+ einfo "# ebuild /var/db/pkg/net-wiress/${P}/${P}.ebuild config"
+ einfo "Please consult /etc/modules.d/ndiswrapper to finish"
+ einfo "configuring the driver"
+ einfo
+ einfo "In particular, ndiswrapper requires .inf and .sys files from"
+ einfo "a Windows(tm) driver to function. Put these somewhere like"
+ einfo "/usr/lib/hotplug/drivers, edit /etc/modules.d/ndiswrapper to match,"
+ einfo "then run 'update-modules'"
+ einfo
+}
+
+pkg_config() {
+ if [ ! -f "/etc/modules.d/ndiswrapper" ]
+ then
+ eerror "/etc/modules.d/ndiswrapper not found. Please re-emerge"
+ eerror "${PN} to have this file installed, then re-run this script"
+ die "Driver configuration file not found"
+ fi
+
+ if ! egrep "VENDORID" /etc/modules.d/ndiswrapper
+ then
+ eerror "/etc/modules.d/ndiswrapper doesn't appear to be the one"
+ eerror "distributed by the ${PN} ebuild. To use this config script,"
+ eerror "Please re-emerge ${PN} and then re-run this script."
+ die "Driver configuration file not usable"
+ else
+ einfo "Found acceptable config file at /etc/modules.d/ndiswrapper"
+ fi
+
+ if [ `lspci -n | grep 'Class 0280:' | wc -l` -gt 1 ]
+ then
+ eerror "More than one suitable device detected. This script"
+ eerror "will only work with one suitable device present."
+ die "Too many potential devices found"
+ fi
+
+ I=`lspci -n | grep 'Class 0280:' | cut -d' ' -f4`
+
+ if [ -z "${I}" ]
+ then
+ die "No suitable devices found"
+ fi
+
+ VENDOR=`echo $I | cut -d':' -f1`
+ DEVICEID=`echo $I | cut -d':' -f2`
+
+ einfo "Setting the vendor ID to ${VENDOR} and the device ID to ${DEVICEID}"
+ sed -i -e "s:VENDORID:${VENDOR}:" \
+ -e "s:DEVICEID:${DEVICEID}:" \
+ /etc/modules.d/ndiswrapper
+}