summaryrefslogtreecommitdiff
path: root/testing/nouveau-drm-lts/PKGBUILD
blob: 1899ca19aec3475391e1f7b71f937d20e11dedbb (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
# $Id: PKGBUILD 142530 2011-11-11 16:57:55Z tpowa $
# Maintainer: Andreas Radke <andyrtr@archlinux.org>
# Contributor: buddabrod <buddabrod@gmail.com>

pkgname=nouveau-drm-lts
_snapdate=20100313
pkgver=0.0.16_${_snapdate} # see master/drivers/gpu/drm/nouveau/nouveau_drv.h for version
_extramodules=extramodules-2.6.32-lts
_kernver="$(cat /lib/modules/${_extramodules}/version)"
pkgrel=7
pkgdesc="nvidia opensource X driver"
arch=('i686' 'x86_64')
url="http://nouveau.freedesktop.org/"
depends=("kernel26-lts>=2.6.32" "kernel26-lts<2.6.33")
makedepends=("kernel26-lts-headers>=2.6.32" "kernel26-lts-headers<2.6.33")
# http://nouveau.freedesktop.org/wiki/InstallDRM#head-771a47a133fba6a5a70253656e76c61e9bff93bd
optdepends=('nouveau-firmware: needed for very new card (NV50 family and above) to work properly where the OSS replacement does not work well')
#makedepends=('git' 'autoconf' 'pkgconfig')
install=nouveau-drm.install
license=('GPL')
options=('!strip')
source=(ftp://ftp.archlinux.org/other/${pkgname/-lts//}/master-${_snapdate}.tar.gz 
	# http://people.freedesktop.org/~pq/nouveau-drm/master.tar.gz
	# get the Makefile from http://cgit.freedesktop.org/nouveau/linux-2.6/plain/nouveau/Makefile?h=master-compat
	Makefile)
md5sums=('ad7ad0fb73d56bcff3d2b54a70c3d511'
         'e7d5df80186d5c736e82b0a7d46216bc')

build() {
  cd ${srcdir}/master
  mkdir nouveau
  cp $srcdir/Makefile ${srcdir}/master/nouveau/
  cd nouveau
  make LINUXDIR=/lib/modules/${_kernver}/build DRM_MODULES="nouveau"
}

package() {
  install -D -m 0644 ${srcdir}/master/drivers/gpu/drm/drm.ko ${pkgdir}/lib/modules/${_extramodules}/updates/drm.ko
  install -D -m 0644 ${srcdir}/master/drivers/gpu/drm/drm_kms_helper.ko ${pkgdir}/lib/modules/${_extramodules}/updates/drm_kms_helper.ko
  install -D -m 0644 ${srcdir}/master/drivers/gpu/drm/nouveau/nouveau.ko ${pkgdir}/lib/modules/${_extramodules}/kernel/drivers/video/nouveau.ko
  install -D -m 0644 ${srcdir}/master/drivers/gpu/drm/ttm/ttm.ko ${pkgdir}/lib/modules/${_extramodules}/updates/ttm.ko
  install -D -m 0644 ${srcdir}/master/drivers/gpu/drm/i2c/ch7006.ko ${pkgdir}/lib/modules/${_extramodules}/updates/ch7006.ko

  # install script
  sed -i -e "s/EXTRAMODULES='.*'/EXTRAMODULES='${_extramodules}'/" ${startdir}/nouveau-drm.install
  # gzip -9 modules
  find "$pkgdir" -name '*.ko' -exec gzip -9 {} \;
}