/[gentoo-x86]/net-misc/nforce-net/nforce-net-1.0.0261-r2.ebuild
Gentoo

Contents of /net-misc/nforce-net/nforce-net-1.0.0261-r2.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.8 - (hide annotations) (download)
Thu Oct 28 15:59:51 2004 UTC (15 years, 2 months ago) by dsd
Branch: MAIN
CVS Tags: HEAD
Changes since 1.7: +1 -1 lines
FILE REMOVED
Removing package.

1 agriffis 1.5 # Copyright 1999-2004 Gentoo Foundation
2 lanius 1.1 # Distributed under the terms of the GNU General Public License v2
3 dsd 1.8 # $Header: /var/cvsroot/gentoo-x86/net-misc/nforce-net/nforce-net-1.0.0261-r2.ebuild,v 1.7 2004/08/26 09:44:47 lanius Exp $
4 lanius 1.1
5 agriffis 1.4 inherit gcc kernel-mod eutils
6 lanius 1.1
7     NV_V="${PV/1.0./1.0-}"
8     NV_PACKAGE="NVIDIA_nforce-${NV_V}"
9     S="${WORKDIR}/nforce/nvnet"
10     DESCRIPTION="Linux kernel module for the NVIDIA's nForce network chip"
11     HOMEPAGE="http://www.nvidia.com/"
12     SRC_URI="http://download.nvidia.com/XFree86/nforce/${NV_V}/${NV_PACKAGE}.tar.gz"
13    
14     # The SLOT needs to be set to $KV to prevent unmerges of modules for other kernels
15     LICENSE="NVIDIA"
16     SLOT="${KV}"
17     KEYWORDS="-* x86"
18 agriffis 1.6 IUSE=""
19 lanius 1.1 RESTRICT="nostrip"
20    
21     DEPEND="virtual/linux-sources"
22    
23     src_compile() {
24 lanius 1.3 check_KV
25 lanius 1.2 if kernel-mod_is_2_5_kernel || kernel-mod_is_2_6_kernel
26     then
27     EPATCH_SINGLE_MSG="Applying 2.5/6 patch ..." \
28     epatch ${FILESDIR}/nforce-net-1.0.0261-kernel-2.6.patch.gz
29 lanius 1.7 if [ "$KV_PATCH" -ge 8 ]; then
30     sed -i -e "s:modpost:mod/modpost:" Makefile
31     fi
32 lanius 1.2 fi
33 lanius 1.1
34     make KERNSRC="/usr/src/linux" || die
35     }
36    
37     src_install() {
38     # The driver goes into the standard modules location
39     insinto /lib/modules/${KV}/kernel/drivers/net
40    
41 lanius 1.2 if kernel-mod_is_2_5_kernel || kernel-mod_is_2_6_kernel
42     then
43 lanius 1.1 doins nvnet.ko
44     else
45     doins nvnet.o
46     fi
47    
48     # Docs
49     dodoc ${S}/ReleaseNotes.html
50    
51     dodir /etc/modules.d
52     cat > ${D}/etc/modules.d/nvnet << EOF
53     # The nForce network driver supports two optimization modes:
54     # optimization=0 ; Throughput optimization
55     # optimization=1 ; CPU optimization
56     # CPU optimization mode ruduces the CPU utilization by using
57     # interrupt moderation. Throughput optimization mode maximizes
58     # the throughput. This mode has higher CPU consumption.
59     # By default, the driver runs in throughput optimization mode.
60    
61     # The "speed" module parameter can be used set the interface
62     # speed of the ethernet controller. By default the controller
63     # will autosense the interface speed, but also supports the
64     # following values:
65     # speed=0 ; auto
66     # speed=1 ; 10Mbps
67     # speed=2 ; 100Mpbs
68    
69     # The "duplex" module parameter can be used to specify the
70     # interface duplex. By default the controller will autoselect
71     # duplex, but also supports the following values:
72     # duplex=0 ; auto
73     # duplex=1 ; half duplex
74     # duplex=2 ; full duplex
75    
76     options nvnet optimization="1" speed="0" duplex="0"
77     EOF
78     }
79    
80     pkg_postinst() {
81     if [ "${ROOT}" = "/" ]
82     then
83     # Update module dependency
84     [ -x /usr/sbin/update-modules ] && /usr/sbin/update-modules
85     fi
86    
87     echo
88     einfo "You need to add \"nvnet\" to your /etc/modules.autoload to load"
89     einfo "this module when the system is started. Alternatively, you can"
90     einfo "use the 'hotplug' package ('emerge hotplug' then 'rc-update add"
91     einfo "hotplug default') to auto-detect and load \"nvnet\" on startup."
92     echo
93     einfo "Edit /etc/modules.d/nvnet and run \"update-modules\" to configure"
94     einfo "the \"nvnet\" driver for throughput optimization the next time it"
95     einfo "is loaded."
96     }

  ViewVC Help
Powered by ViewVC 1.1.20