# Maintainer: speps <speps at aur dot archlinux dot org>
_kver=`uname -r | sed 's/\..-.//'`
pkgname=v4l2loopback
pkgver=0.6.2
pkgrel=1
pkgdesc="A kernel module to create V4L2 loopback devices"
arch=(i686 x86_64)
url="https://github.com/umlaeute/v4l2loopback/"
license=('GPL')
depends=('glibc')
makedepends=('linux-headers' 'help2man')
optdepends=('v4l-utils: for v4l2loopback-ctl and utils'
'gstreamer0.10: for v4l2loopback-ctl and utils')
install="$pkgname.install"
source=("${url}tarball/v$pkgver")
md5sums=('ecfce0b77673fdf91cb3827c9bdfcfde')
build() {
cd "$srcdir/umlaeute-$pkgname-"*
make
cd examples && make
}
package() {
cd "$srcdir/umlaeute-$pkgname-"*
make DESTDIR="$pkgdir/" PREFIX=/usr install-{man,utils}
# module
install -Dm644 $pkgname.ko \
"$pkgdir/usr/lib/modules/extramodules-$_kver/$pkgname.ko"
# docs
install -Dm644 doc/v4l2.html \
"$pkgdir/usr/share/doc/$pkgname/v4l2.html"
install -Dm644 README NEWS \
"$pkgdir/usr/share/doc/$pkgname"
# examples
install -d "$pkgdir/usr/share/$pkgname/examples"
install -Dm644 examples/{*.c,README,Makefile} \
"$pkgdir/usr/share/$pkgname/examples"
install -Dm755 examples/{yuv4mpeg_to_v4l2,restarting-writer.sh} \
"$pkgdir/usr/bin"
}
# vim:set ts=2 sw=2 et: