updated on Thu Jan 26 16:09:46 UTC 2012
[aur-mirror.git] / lirc-nct677x / PKGBUILD
blobc2a5cbeb1feb43756e90d4186ecf25cbf18429d7
1 # Contributor: Andreas Schönfelder <passtschu at freenet dot de>
3 pkgname=lirc-nct677x
4 pkgver=1.0.4
5 pkgrel=5
6 _kernelver=2.6.35
7 _kernelname=ARCH
8 _lircver=0.8.6
9 _modulename=lirc_wb677
10 pkgdesc="lirc driver for Nuvoton NCT677x (ASROCK ION 330HT-BD)"
11 arch=(i686 x86_64)
12 url="http://www.asrock.com/nettop/overview.asp?Model=ION%20330HT-BD"
13 license=('GPL')
14 depends=('lirc' 'kernel26>=2.6.35' 'kernel26<2.6.36')
15 makedepends=('kernel26-headers>=2.6.35' 'kernel26-headers<2.6.36')
16 install=$pkgname.install
17 source=("http://europe.asrock.com/downloadsite/drivers/Nettop/Ubuntu/IR(9.10).zip"
18         "http://prdownloads.sourceforge.net/lirc/lirc-$_lircver.tar.bz2"
19         "http://repos.archlinux.org/wsvn/packages/lirc/repos/extra-i686/kernel-2.6.33.patch?op=dl"
20         "http://repos.archlinux.org/wsvn/packages/lirc/repos/extra-i686/kernel-2.6.35.patch?op=dl")
21 md5sums=('e5a009da601583143912bc50b945eec5'
22          '4ca24da6f5e7c2dcea74878c27a4a3f7'
23          'f029698154cf32bc51e5e69879d53a12'
24          'fdc37867570915123acc8daec03f7174')
26 build() {
27   cd "$srcdir"
29   # extract source
30   ar x "$pkgname-src-$pkgver-ubuntu9.10.deb" || return 1
31   tar -xf data.tar.gz || return 1
32   ar x "$pkgname-$pkgver-ubuntu9.10.deb" || return 1
33   tar -xf data.tar.gz || return 1
35   # patching lirc
36   cd "$srcdir/lirc-$_lircver"
37   patch -Np0 -i "$srcdir/kernel-2.6.33.patch?op=dl" || return 1
38   patch -Np0 -i "$srcdir/kernel-2.6.35.patch?op=dl" || return 1
39   
40   # build
41   cd "$srcdir/usr/src/$pkgname-src-$pkgver-ubuntu9.10/$_modulename"
42   sed -i "s|LIRC_DIR := .*|LIRC_DIR := $srcdir/lirc-$_lircver|" Makefile || return 1
43   sed -i "s|/usr/src|$srcdir|g" lirc_wb677_common_extern.h || return 1
44   ln -sf "$srcdir/lirc-$_lircver/drivers/" "$srcdir/lirc-$_lircver/drivers/lirc_dev/"
45   make || return 1
47   # install
48   install -d "$pkgdir/etc/lirc" \
49     "$pkgdir/usr/share/lirc/remotes/$_modulename" \
50     "$pkgdir/lib/modules/$_kernelver-$_kernelname/kernel/drivers/misc"
51   install -m644 "$srcdir/usr/share/$_modulename/lircrc_nuvoton" \
52     "$pkgdir/etc/lirc/lircrc" || return 1
53   install -m644 "$srcdir/usr/share/lirc/remotes/$_modulename/lircd.conf.wb677" \
54     "$pkgdir/usr/share/lirc/remotes/$_modulename" || return 1
55   install -m644 "$srcdir/usr/src/$pkgname-src-$pkgver-ubuntu9.10/$_modulename/$_modulename.ko" \
56     "$pkgdir/lib/modules/$_kernelver-$_kernelname/kernel/drivers/misc" || return 1
59 # vim:set ts=2 sw=2 et: