You are not logged in.

#1 2007-01-05 04:06:11

loserMcloser
Member
From: Canada
Registered: 2004-12-15
Posts: 128

[PKGBUILD] linux-uvc

kernel module for newer Logitech webcams, see http://linux-uvc.berlios.de/ .

Note: to build it you need configured kernel sources with valid symlink to them at /lib/modules/_YOUR_KERNEL_VERSION_/build

PKGBUILD:

pkgname=uvcvideo
pkgver=rev75
pkgrel=1
pkgdesc="A kernel module to support UVC compliant USB video devices."
url="http://linux-uvc.berlios.de/"
depends=()
install=uvcvideo.install
source=(http://svn.berlios.de/svnroot/repos/linux-uvc/linux-uvc/trunk/{Makefile,uvc{video.h,_{compat.h,{ctrl,driver,queue,v4l2,video}.c}}})
md5sums=(c93028edc78c41858afaa4c926013ecc 20b105664b7c376c8bc7d24647f6bfcc
         469fb22f172897c3a2ba308bc414ec28 057884e70eec5c4098eacc9a9c63d7f8
         95f13ee4e2b8ab8b95d09d83485c21ca 4eb7b9be5f372024112b79dbeca3b09f
         f7acd3376d74f866222296c7d126c740 b76aefbafa94a10282a9fb705119cd2f)

build() {
  _kernver=`uname -r`
  cd ${startdir}/src/
  make || return 1
  install -D -m644 uvcvideo.ko ${startdir}/pkg/lib/modules/${_kernver}/kernel/drivers/media/video/usbvideo/uvcvideo.ko
  mkdir -p ${startdir}/pkg/usr/include/linux/uvcvideo
  install -D -m644 *.h ${startdir}/pkg/usr/include/linux/uvcvideo
  sed -i -e "s|_KVER_|${_kernver}|g" ${startdir}/uvcvideo.install
}

uvcvideo.install:

KERNEL_VERSION=_KVER_

# arg 1:  the new package version
post_install()
{
  /sbin/depmod -ae -v $KERNEL_VERSION > /dev/null 2>&1
}

# arg 1:  the new package version
# arg 2:  the old package version
post_upgrade()
{
  /sbin/depmod -ae -v $KERNEL_VERSION > /dev/null 2>&1
}

# arg 1:  the old package version
pre_remove() {
  /sbin/rmmod uvcvideo > /dev/null 2>&1
}

# arg 1:  the old package version
post_remove()
{
  /sbin/depmod -ae -v $KERNEL_VERSION > /dev/null 2>&1
}

op=$1
shift
$op $*

Simple tool to view web cam output.

pkgname=luvcview
pkgver=20060920
pkgrel=1
pkgdesc="Linux-UVC device viewer."
url="http://mxhaard.free.fr"
depends=(uvcvideo)
source=(http://mxhaard.free.fr/spca50x/Investigation/uvc/${pkgname}-${pkgver}.tar.gz)
md5sums=(f5fc267a572300a08f5728f231168ccb)

build() {
  cd ${startdir}/src/${pkgname}-${pkgver}
  sed -i -e 's|#include "uvcvideo.h"|#include <linux/uvcvideo/uvcvideo.h>|g' frmfmtenum.c
  cat /dev/null > v4l2_enumfrmfmt.h
  make || return 1
  install -D -m 755 luvcview ${startdir}/pkg/usr/local/bin/luvcview
}

Offline

#2 2007-01-06 05:18:02

twiistedkaos
Member
Registered: 2006-05-20
Posts: 666

Re: [PKGBUILD] linux-uvc

wrong section man, this should be posted in AUR

Offline

#3 2007-01-06 05:23:19

Snowman
Developer/Forum Fellow
From: Montreal, Canada
Registered: 2004-08-20
Posts: 5,212

Re: [PKGBUILD] linux-uvc

twiistedkaos wrote:

wrong section man, this should be posted in AUR

Actually, PKGBUILD should be submitted to AUR instead of being posted in the forum.

Offline

#4 2007-01-06 05:49:07

codemac
Member
From: Cliche Tech Place
Registered: 2005-05-13
Posts: 794
Website

Re: [PKGBUILD] linux-uvc

And why didn't you put `uname -r` in the .install instead of seding it in?

Offline

#5 2007-01-06 09:10:48

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: [PKGBUILD] linux-uvc

That source= line gives me the shivers  :shock: and your md5sums will be obsolete with the next upstream commit. Have a look at the Arch CVS/SVN packaging guidelines - they're in the wiki.

Standard practice for kernel module packages sets the _kernver variable to 2.6.19-ARCH outside the build function. Users can change it as required, to build for other kernels.

Offline

Board footer

Powered by FluxBB