updated on Thu Jan 26 16:09:46 UTC 2012
[aur-mirror.git] / qc-usb / PKGBUILD
blob3740bacd69b448485e48f8fc5daeb1bcc2b95d29
1 # $Id: PKGBUILD,v 1.25 2009/04/09 09:51:54 sergej Exp $
2 # Maintainer: Paulo Matias <matiasΘarchlinux-br·org>
3 # Contributor: Sergej Pupykin <pupykin.s+arch@gmail.com>
4 # Contributor: Pulphix <pulphix@crazysource.org>
6 pkgname="qc-usb"
7 pkgver=0.6.6
8 pkgrel=19
9 pkgdesc="QuickCam Express Driver"
10 arch=('i686' 'x86_64')
11 url="http://qce-ga.sourceforge.net"
12 license=('GPL2')
13 depends=('kernel26')
14 makedepends=('kernel26-headers')
15 install='qc-usb.install'
16 source=("http://downloads.sourceforge.net/sourceforge/qce-ga/$pkgname-$pkgver.tar.gz"
17         'qc-usb-0.6.6-kcompat-2.6.24.patch'
18         'qc-usb-0.6.6-kcompat-2.6.26.patch'
19         'qc-usb-0.6.6-kcompat-2.6.27.patch'
20         'qc-usb-0.6.6-kcompat-2.6.28.patch'
21         'qc-usb-0.6.6-kcompat-2.6.37.patch')
22 md5sums=('9eab8fb3a75326d1565d59b0c7256075'
23          '6676d575b98bc5078f7886db45cb1107'
24          '4e43b6a8e44470e7e919c7d3c362b27f'
25          '6cd5ac406272dd88e38862043dd3233c'
26          'de414ddb84ed15d5e353fc49f4162506'
27          '6049764a50a68965c2f8bba390eb79e7')
29 build() {
30   _kernver=`pacman -Q kernel26 | cut -d . -f 3 | cut -f 1 -d -`
31   depends=("kernel26>=2.6.${_kernver}" "kernel26<2.6.`expr ${_kernver} + 1`")
33   cd "${srcdir}/${pkgname}-${pkgver}"
35   patch -Np1 -i '../qc-usb-0.6.6-kcompat-2.6.24.patch'
36   patch -Np1 -i '../qc-usb-0.6.6-kcompat-2.6.26.patch'
37   patch -Np1 -i '../qc-usb-0.6.6-kcompat-2.6.27.patch'
38   patch -Np1 -i '../qc-usb-0.6.6-kcompat-2.6.28.patch'
39   patch -Np1 -i '../qc-usb-0.6.6-kcompat-2.6.37.patch'
41   make all
43   install -D -m644 quickcam.ko "${pkgdir}/lib/modules/2.6.${_kernver}/kernel/drivers/usb/media/quickcam.ko"
44   install -D -m755 qcset "${pkgdir}/usr/bin/qcset"
45   sed -i -e "s/KERNEL_VERSION='.*'/KERNEL_VERSION='2.6.${_kernver}'/" "${startdir}/${pkgname}.install"