updated on Thu Jan 26 00:18:00 UTC 2012
[aur-mirror.git] / wacom-next-linux-git / PKGBUILD
blob9fbf98c57100906fb833dbef1e9b4bf8d0ccc81b
1 # Maintainer:  Andrzej Giniewicz <gginiu@gmail.com>
3 pkgname=wacom-next-linux-git
4 pkgver=20120107
5 pkgrel=1
6 pkgdesc="Kernel drivers for Wacom tablets, next branch"
7 arch=('i686' 'x86_64')
8 url="http://linuxwacom.sourceforge.net/"
9 license=('GPL')
10 depends=('linux')
11 makedepends=('linux-headers')
12 options=('!libtool')
13 conflicts=('linuxwacom-cvs' 'input-wacom' 'input-wacom-cvs' 'linuxwacom-baboo-cth-ctl'
14            'wacom-mainline-linux-git' 'wacom-linux-git')
15 install=wacom-next-linux-git.install
17 _gitrepo="linux/kernel/git/next"
18 _gitname="linux-next.git"
19 _gitroot="git://git.kernel.org/pub/scm/$_gitrepo/$_gitname"
21 function _get_source() {
22   _dir=$1
23   _file=$2
24   msg "Downloading $_dir/$_file"
25   wget -q "http://git.kernel.org/?p=$_gitrepo/$_gitname;a=blob_plain;f=drivers/$_dir/$_file;hb=HEAD" -O $_file
28 build() {
29   cd "$srcdir"
30   _get_source "input/tablet" "wacom.h"
31   _get_source "input/tablet" "wacom_wac.h"
32   _get_source "input/tablet" "wacom_wac.c"
33   _get_source "input/tablet" "wacom_sys.c"
34   _get_source "input/touchscreen" "wacom_w8001.c"
35 #  _get_source "hid" "hid-core.c"
36 #  _get_source "hid" "hid-input.c"
37 #  _get_source "hid" "hidraw.c"
38 #  _get_source "hid" "hid-debug.c"
39 #  _get_source "hid" "hid-ids.h"
40 #  _get_source "hid" "hid-wacom.c"
42   echo "# generated by PKGBUILD" > Makefile
43 #  echo "hid-y := hid-core.o hid-input.o hidraw.o" >> Makefile
44 #  echo "hid-objs := hid-debug.o" >> Makefile
45   echo "wacom-objs := wacom_sys.o wacom_wac.o" >> Makefile
46 #  echo "obj-m += hid.o" >> Makefile
47 #  echo "obj-m += hid-wacom.o" >> Makefile
48   echo "obj-m += wacom.o" >> Makefile
49   echo "obj-m += wacom_w8001.o" >> Makefile
50   make -C /lib/modules/$(uname -r)/build SUBDIRS="$(pwd)" modules
53 function _install_module() {
54   rm -rf "$1.ko.gz"
55   gzip -9 "$1.ko"
56   install -D -m 644 "$1.ko.gz" "${pkgdir}"/lib/modules/$(uname -r)/updates/"$1.ko.gz"
59 package() {
60 #  _install_module "hid"
61 #  _install_module "hid-wacom"
62   _install_module "wacom"
63   _install_module "wacom_w8001"