blob: 909491a86f8062af9bfbdf85169fdf69c75390ca (
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
69
|
# $Id$
# Maintainer: Felix Yan <felixonmars@archlinux.org>
# Contributor: Thomas Baechler <thomas@archlinux.org>
pkgbase=nvidia-304xx
pkgname=(nvidia-304xx nvidia-304xx-dkms)
pkgver=304.128
_extramodules=extramodules-3.18-ARCH
pkgrel=3
arch=('i686' 'x86_64')
url="http://www.nvidia.com/"
makedepends=('nvidia-304xx-libgl' "nvidia-304xx-utils=${pkgver}" 'linux' 'linux-headers>=3.18' 'linux-headers<3.19')
conflicts=('nvidia')
license=('custom')
options=(!strip)
source=("http://us.download.nvidia.com/XFree86/Linux-x86/${pkgver}/NVIDIA-Linux-x86-${pkgver}.run"
"http://us.download.nvidia.com/XFree86/Linux-x86_64/${pkgver}/NVIDIA-Linux-x86_64-${pkgver}-no-compat32.run"
'nv-drm.patch')
sha512sums=('9822b61872ae28751cd5c41714048612f7ddf0fd9f02e6340598150afbea43dddeba88482a8c88bcf893b015d14b2a2cf5157ed60583da57fdfe183ecb620c90'
'fa7a81edaba92561314b4874635e639607cf2f9bcde10609764528a35bb2d4a6916c7ea2be2cdcb9e2abf5ac7455f54287ff7218f3e57acc67bdeae18a208db2'
'aaa36ef7179acdc86850381de145a3aebab22273cd3c702a9d1343dc3415192c74a35da692312555f36193c5d46a1771ce07ea9508113cb9d0698873064aa19f')
[[ "$CARCH" = "i686" ]] && _pkg="NVIDIA-Linux-x86-${pkgver}"
[[ "$CARCH" = "x86_64" ]] && _pkg="NVIDIA-Linux-x86_64-${pkgver}-no-compat32"
prepare() {
cd "${srcdir}"
sh "${_pkg}.run" --extract-only
cd "${_pkg}"
# patches here
patch -p0 -i "$srcdir/nv-drm.patch"
}
build() {
_kernver="$(cat /usr/lib/modules/${_extramodules}/version)"
cd "${_pkg}/kernel"
make SYSSRC=/usr/lib/modules/"${_kernver}/build" module
}
package_nvidia-304xx() {
pkgdesc="NVIDIA drivers for linux, 304xx legacy branch"
depends=('linux>=3.18' 'linux<3.19' 'libgl' "nvidia-304xx-utils=${pkgver}")
conflicts+=('nvidia-304xx-dkms')
install=nvidia-304xx.install
install -D -m644 "${srcdir}/${_pkg}/kernel/nvidia.ko" \
"${pkgdir}/usr/lib/modules/${_extramodules}/nvidia.ko"
install -d -m755 "${pkgdir}/usr/lib/modprobe.d"
echo "blacklist nouveau" >> "${pkgdir}/usr/lib/modprobe.d/nvidia.conf"
sed -i -e "s/EXTRAMODULES='.*'/EXTRAMODULES='${_extramodules}'/" "${startdir}/${pkgname}.install"
gzip "${pkgdir}/usr/lib/modules/${_extramodules}/nvidia.ko"
# the license file is part of nvidia-304xx-utils - the module depends on it, so we don't ship it another time.
}
package_nvidia-304xx-dkms() {
pkgdesc="NVIDIA driver sources for linux, 304xx legacy branch"
depends=('dkms' "nvidia-304xx-utils=$pkgver")
optdepends=('linux-headers: Build the module for Arch kernel'
'linux-lts-headers: Build the module for LTS Arch kernel')
conflicts+=('nvidia-304xx')
install=nvidia-304xx-dkms.install
cd ${_pkg}
make -C kernel clean
install -dm 755 "${pkgdir}"/usr/{lib/modprobe.d,src}
cp -dr --no-preserve='ownership' kernel "${pkgdir}"/usr/src/nvidia-${pkgver}
echo 'blacklist nouveau' > "${pkgdir}"/usr/lib/modprobe.d/nvidia.conf
}
|