updated on Sun Jan 22 20:01:29 UTC 2012
[aur-mirror.git] / acerhk / PKGBUILD
blobae57c3a6831ed3065c29432ff048f6c16d85e0e3
1 # $Id: PKGBUILD 23215 2010-08-08 21:04:28Z cbrannon $
2 # Maintainer: Corrado Primier <bardo@aur.archlinux.org>
3 # Contributor: Marco Fister <marco@rda26.net>
5 pkgname=acerhk
6 pkgver=0.5.35
7 pkgrel=26
8 pkgdesc="Acer hotkey driver"
9 url="http://www.cakey.de/acerhk/"
10 arch=('i686') # Unavailable for x86_64
11 license=('GPL')
12 depends=('linux>=3.0.0')
13 makedepends=('linux-headers>=3.0.0')
14 source=(http://www.cakey.de/acerhk/archives/${pkgname}-${pkgver}.tgz acerhk.rc
15         2.6.30.patch kernelversion.patch 5100.patch 2.6.36.patch)
16 install=acerhk.install
17 _kernver=3.0-ARCH
19 build() {
20   cd "${srcdir}/${pkgname}-${pkgver}"
21   sed -i 's/CFLAGS/EXTRA_CFLAGS/' Makefile
22   patch -Np1 -i "${srcdir}/5100.patch" || return 1
23   patch -Np1 -i "${srcdir}/2.6.30.patch" || return 1
24   patch -Np0 -i "${srcdir}/2.6.36.patch" || return 1
25   patch -N -p1 < "$srcdir/kernelversion.patch" || return 1
26   sed -i 's@linux/config.h@linux/input.h@' "${srcdir}/${pkgname}-${pkgver}/acerhk.c"
27   # Set KERNELSRC.  The makefile tries to autodetect it with uname,
28   # but that is unreliable.
29   make CONFIG_FUNCTION_TRACER= KERNELSRC="/lib/modules/${_kernver}/build" acerhk.ko || return 1
30   install -Dm644 "${srcdir}/${pkgname}-${pkgver}/acerhk.ko" \
31     "${pkgdir}/lib/modules/${_kernver}/kernel/drivers/block/acerhk.ko" || return 1
32   install -Dm755 "${srcdir}/acerhk.rc" "${pkgdir}/etc/rc.d/acerhk" || return 1
35 # vim:set ts=2 sw=2 et:
36 md5sums=('05255919f312cb76af473a760c284433'
37          '935584b3e4bfbb3af8460558e5b98bb5'
38          '2a0bc99e5b12e25096441df4d53d7df7'
39          'fd2ef062ecbc9d670e1b42aa5866d32d'
40           '8966a93e66200a535179cf9eb689fe4d'
41           'd257a4e9223ebfde48b9608805df9c99')