updated on Tue Jan 17 08:05:08 UTC 2012
[aur-mirror.git] / avld / PKGBUILD
blob3dd4d0458bd20f338b225c5cebe7eb0b317f1afe
1 # Maintainer: SpepS < dreamspepser at yahoo dot it>
3 _kver=`uname -r | sed 's/\..-.//'`
4 pkgname=avld
5 pkgver=0.1.4
6 pkgrel=5
7 pkgdesc="A V4L dummy video device built to simulate an input video device like a webcam or a video capture card."
8 arch=('i686' 'x86_64')
9 url="http://allonlinux.free.fr/Projets/AVLD/"
10 license=('GPL')
11 depends=('v4l-utils')
12 makedepends=('linux-headers')
13 source=("${url}src/${pkgname}_${pkgver}.tar.bz2"
14         "${pkgname}_${pkgver}.patch" "bad.patch"
15         "libv4l1-videodev.h")
16 install="${pkgname}.install"
17 md5sums=('dbe16be302293cd0b286f5bef8b33c5f'
18          '926ab9d4e3c3ee2c7d0441ce546b2b9c'
19          'beb282a1f21ba556cbd6436bf8de3d00'
20          '7eda710e3032c0fe27d2063e2d0b51eb')
22 build() {
23   cd "$srcdir/${pkgname}_${pkgver}"
25   # Patching for newer kernels and memcpy issue (prevent high cpu usage)
26   patch video_device.c ../${pkgname}_${pkgver}.patch
27   patch video_device.c ../bad.patch
29   # build using v4l-utils headers
30   sed -i 's/<linux\/\(videodev.h\)>/"libv4l1-\1"/' video_device.c
32   # remove old constants
33   sed -i '347,350d;358,361d' video_device.c
35   # use patched libv4l1-videodev.h header
36   cp ../libv4l1-videodev.h .
38   make EXTRA_CFLAGS="-I."
41 package() {
42   cd "$srcdir/${pkgname}_${pkgver}"
44   install -Dm644 avld.ko "${pkgdir}/lib/modules/extramodules-$_kver/avld.ko"