summaryrefslogtreecommitdiffstats
path: root/abs/core-testing/ivtv-utils/PKGBUILD
blob: 5b272b181ff8226de3d8c543897eab047480eb9e (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
# $Id: PKGBUILD 356 2008-04-18 22:56:27Z aaron $
# Contributor: Sasha Zbrozek <kleptophobiac@gmail.com>
# Maintainer: Paul Mattal <paul@archlinux.org>

pkgname=ivtv-utils
pkgver=1.0.3
pkgrel=2
_kernver=2.6.26-ARCH
pkgdesc="Non-mainline kernel drivers and userspace utilities for Hauppauge PVR cards"
arch=('i586' 'i686' 'x86_64')
license=('GPL')
url="http://ivtvdriver.org"
source=("http://dl.ivtvdriver.org/ivtv/archive/1.0.x/ivtv-$pkgver.tar.gz" \
	'http://dl.ivtvdriver.org/ivtv/firmware/ivtv-firmware.tar.gz' )
depends=('gcc-libs')
md5sums=('2c0e04a861cb7409ea82a2935b1e0050' 'b9a871f1c569025be9c48a77b3515faf')

build() {
  # SET UP
  cd $startdir/src/ivtv-$pkgver || return 1

  # don't call depmod here
  sed -i 's|/sbin/depmod -a||' driver/Makefile i2c-drivers/Makefile || return 1

  # install the utils in /usr/bin, not /usr/local/bin
  sed -i "s%PREFIX = /usr/local%PREFIX = /usr%g" utils/Makefile || return 1

  #cd to utils as that is all we need since ivtv is now in the kernel
  cd  utils/

  # build
  make INSTALLDIR=/usr/bin || return 1

  # install
  make DESTDIR=$startdir/pkg install || return 1

  # remove the kernel modules in the utils package
  rm -rf $startdir/pkg/lib/modules || return 1

  # install the firmware
  cd $startdir/src || return 1
  for file in  v4l-cx2341x-dec.fw v4l-cx2341x-enc.fw v4l-cx2341x-init.mpg v4l-cx25840.fw v4l-pvrusb2-24xxx-01.fw v4l-pvrusb2-29xxx-01.fw
  do
	  install -D -m 0644 $file $startdir/pkg/lib/firmware/$file || return 1
  done
}