updated on Thu Jan 12 08:01:00 UTC 2012
[aur-mirror.git] / lirc-ck / PKGBUILD
blob9b3697277253c7eec8beb1137ec0ffed2931da79
1 # Maintainer: graysky <graysky AT archlinux DOT us>
2 # Contributer: Paul Mattal <paul@archlinux.org>
4 pkgname=lirc-ck
5 pkgver=0.9.0
6 pkgrel=3
7 _extramodules=extramodules-3.2-ck
8 _kernver="$(cat /lib/modules/${_extramodules}/version)"
9 arch=('i686' 'x86_64')
10 url="http://www.lirc.org/"
11 license=('GPL')
12 makedepends=('help2man' 'linux-ck-headers>=3.2' 'linux-ck-headers<3.3' 'alsa-lib' 'libx11' 'libftdi' 'libirman' 'python2')
13 options=('!makeflags' '!strip')
14 source=(http://prdownloads.sourceforge.net/lirc/lirc-${pkgver}.tar.bz2
15         lirc_wpc8769l.patch
16         lircd-handle-large-config.patch
17         lirc_atiusb-kfifo.patch
18         kernel-2.6.39.patch)
20 build() {
21   cd "${srcdir}/lirc-${pkgver}"
22   patch -Np1 -i "${srcdir}/lirc_wpc8769l.patch"
23   patch -Np1 -i "${srcdir}/lircd-handle-large-config.patch"
24   patch -Np1 -i "${srcdir}/lirc_atiusb-kfifo.patch"
25   patch -Np1 -i "${srcdir}/kernel-2.6.39.patch"
27   sed -i '/AC_PATH_XTRA/d' configure.ac
28   sed -e 's/@X_CFLAGS@//g' \
29       -e 's/@X_LIBS@//g' \
30       -e 's/@X_PRE_LIBS@//g' \
31       -e 's/@X_EXTRA_LIBS@//g' -i Makefile.am tools/Makefile.am
32   libtoolize
33   autoreconf
35   PYTHON=python2 ./configure --enable-sandboxed --prefix=/usr \
36       --with-driver=all --with-kerneldir=/usr/src/linux-${_kernver}/ \
37       --with-moduledir=/lib/modules/${_kernver}/kernel/drivers/misc \
38       --with-transmitter
40   # Remove drivers already in kernel
41   sed -e "s:lirc_dev::" -e "s:lirc_bt829::" -e "s:lirc_igorplugusb::" \
42       -e "s:lirc_imon::" -e "s:lirc_parallel::" -e "s:lirc_sasem::" \
43       -e "s:lirc_serial::" -e "s:lirc_sir::" -e "s:lirc_ttusbir::" \
44       -i Makefile drivers/Makefile drivers/*/Makefile tools/Makefile 
45   make
48 package() {
49   pkgdesc="Linux Infrared Remote Control kernel modules for linux-ck."
50   depends=('lirc-utils' 'linux-ck>=3.2' 'linux-ck<3.3')
51         replaces=('lirc+pctv')
52   install=$pkgname.install
54   cd "${srcdir}/lirc-${pkgver}/drivers"
55   make DESTDIR="${pkgdir}" moduledir="/lib/modules/${_extramodules}" install
57   # set the kernel we've built for inside the install script
58   sed -i -e "s/EXTRAMODULES=.*/EXTRAMODULES=${_extramodules}/g" "${startdir}/$pkgname.install"
59   # gzip -9 modules
60   find "${pkgdir}" -name '*.ko' -exec gzip -9 {} \;
62 sha256sums=('6323afae6ad498d4369675f77ec3dbb680fe661bea586aa296e67f2e2daba4ff'
63             '137b1169810d1b66c5fe058aaffc2043ecbb4ef6cfce62050f9b418fa924b9ba'
64             '474b5709e6604ef2815e6e1a611d77665e3d33be05cd09110330a81a846bc69f'
65             'f2a83e2a32c8eb963453214d0337589a293b2327291290ec047f4d78782fb310'
66             '3dddd4e9f093ee6fe75b3408da269744a4ffcd5255ea2382f077fb32079a2352')