summaryrefslogtreecommitdiffstats
path: root/abs/core-testing/lirc/PKGBUILD
blob: eb62b7d240c878c6e634583cde08c5e0363eff91 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# $Id: PKGBUILD 14978 2008-10-11 21:04:37Z tpowa $
# Maintainer: Paul Mattal <paul@archlinux.org>

pkgname=lirc
pkgver=0.8.5CVS
pkgrel=3
_kernver=2.6.28-LinHES
pkgdesc="Linux Infrared Remote Control kernel modules for stock arch kernel"
arch=(i686 x86_64)
url="http://www.lirc.org/"
license=('GPL')
depends=('lirc-utils=0.8.5CVS' 'kernel26>=2.6.27' 'kernel26<2.6.29')
#makedepends=('help2man')
replaces=('lirc+pctv')
options=('!makeflags')
install=$pkgname.install
source=(http://www.blushingpenguin.com/mark/lmilk/lirc-0.8.5-CVS-pvr150.tar.bz2 \
	kernel-2.6.26.patch
	kernel-2.6.27.patch
	lirc_atiusb.patch
	http://superb-east.dl.sourceforge.net/sourceforge/mod-mce/lirc_mod_mce-0.2.0.tar.bz2
	lirc_mod_mce.patch)

build() {
	# configure
	cd $startdir/src/lirc-0.8.5-CVS-pvr150 || return 1
#	patch -Np1 -i ../kernel-2.6.26.patch || return 1
#	patch -Np1 -i ../kernel-2.6.27.patch || return 1
	patch -Np1 -i ../lirc_atiusb.patch || return 1

	./configure --enable-sandboxed --prefix=/usr \
		--with-driver=all --with-kerneldir=/usr/src/linux-${_kernver}/ \
		--with-moduledir=/lib/modules/${_kernver}/kernel/drivers/misc \
	        --with-transmitter \
		|| return 1

	# disable parallel and bt829
        # because of incompatibility with smp systems
        sed -i -e "s:lirc_parallel::" -e "s:lirc_bt829::" \
		Makefile drivers/Makefile drivers/*/Makefile tools/Makefile \
                || return 1
	# disable lirc_gpio due to brokeness of kernel 2.6.23
	sed -i -e "s:lirc_gpio::" \
		Makefile drivers/Makefile drivers/*/Makefile tools/Makefile \
                || return 1

	# build
	cd drivers || return 1
	make || return 1
	make DESTDIR=$startdir/pkg install || return 1

	# set the kernel we've built for inside the install script
	sed -i -e "s/KERNEL_VERSION=.*/KERNEL_VERSION=${_kernver}/g" \
		$startdir/lirc.install || return 1
	cd $startdir/src/lirc_mod_mce
	cp ../lirc-0.8.5-CVS-pvr150/drivers/lirc_dev/lirc_dev.h .
	patch -p1 < ../lirc_mod_mce.patch
	make KDIR=/usr/src/linux-2.6.28-LinHES/
	cp lirc_mod_mce.ko $startdir/pkg/lib/modules/2.6.28-LinHES/kernel/drivers/misc/
	mv $startdir/pkg/lib/modules/2.6.28-LinHES/kernel/drivers/misc/lirc_mceusb2.ko $startdir/pkg/lib/modules/2.6.28-LinHES/kernel/drivers/misc/lirc_mceusb2.ko.not
}
md5sums=('8f3ba7eb57529992f3991d6981a3feb6'
         '1753acd774f50b638e6173d364de53fd'
         '6f151eb4e81fc7776a06c9063e6ad9a5'
	 '563f992342df81317fe4ae2b1157cc5e'
	 'a966b297a0768386f845348f736c6db3')