summaryrefslogtreecommitdiff
blob: 2bfa973f51063b6c2baa324b17cb91a6c0e1b1ad (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/media-sound/nforce-audio/nforce-audio-1.0.0310.ebuild,v 1.2 2006/02/04 23:29:09 weeve Exp $

inherit eutils linux-mod

PKG_V="pkg1"
NV_V="${PV/1.0./1.0-}"
X86_NV_PACKAGE="NFORCE-Linux-x86-${NV_V}"
AMD64_NV_PACKAGE="NFORCE-Linux-x86_64-${NV_V}"

DESCRIPTION="Linux kernel module for the NVIDIA's nForce SoundStorm audio chipset"
HOMEPAGE="http://www.nvidia.com/"
SRC_URI="x86? ( http://download.nvidia.com/XFree86/nforce/${NV_V}/${X86_NV_PACKAGE}-${PKG_V}.run )
	amd64? ( http://download.nvidia.com/XFree86/nforce/amd64/${NV_V}/${AMD64_NV_PACKAGE}-${PKG_V}.run )"

if use x86; then
	NV_PACKAGE="${X86_NV_PACKAGE}"
elif use amd64; then
	NV_PACKAGE="${AMD64_NV_PACKAGE}"
fi

S=${WORKDIR}/${NV_PACKAGE}-${PKG_V}/nvsound

LICENSE="NVIDIA"
SLOT="0"
KEYWORDS="-* ~x86 ~amd64"
RESTRICT="nostrip"
IUSE=""

MODULE_NAMES="nvsound(:${S}/main)"
BUILD_PARAMS="SYSSRC=${KV_DIR}"
BUILD_TARGETS=" "

src_unpack() {
	unpack ${A}

	cd ${WORKDIR}
	bash ${DISTDIR}/${NV_PACKAGE}-${PKG_V}.run --extract-only
}

src_compile() {
	cd ${S}/main

	if kernel_is 2 6
	then
		rm makefile
		ln -snf Makefile.kbuild Makefile
	fi

	linux-mod_src_compile
}

src_install() {
	linux-mod_src_install
	dobin nvmixer nvmix-reg
	dohtml ${S}/ReleaseNotes.html
}

pkg_postinst() {
	linux-mod_pkg_postinst

	einfo "If you want to restore your volume settings between sessions add this line to your"
	einfo "/etc/conf.d/local.start:"
	einfo "/usr/bin/nvmix-reg -f /etc/nvmixrc -L >/dev/null 2>&1"
	einfo "And this line to your /etc/conf.d/local.stop"
	einfo "/usr/bin/nvmix-reg -f /etc/nvmixrc -S >/dev/null 2>&1"
}