1 # Copyright 1999-2005 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
5 inherit linux-mod eutils autotools
7 DESCRIPTION="Driver for Genius Wizardpen Tablets"
8 HOMEPAGE="http://code.google.com/p/linuxgenius/"
9 SRC_URI="http://launchpad.net/wizardpen/trunk/0.8/+download/xorg-input-wizardpen-0.8.0.tar.gz"
12 RDEPEND="x11-base/xorg-server"
16 KEYWORDS="~x86 ~amd64"
22 if kernel_is 2 4; then
23 die "You must use 2.6.X kernel with ${PN}"
25 if ! linux_chkconfig_module INPUT_EVDEV
27 if ! linux_chkconfig_present INPUT_EVDEV
29 eerror "${PN} requires evdev support for USB tablets"
30 eerror "In your .config: CONFIG_INPUT_EVDEV=y or CONFIG_INPUT_EVDEV=m"
31 eerror "Through 'make menuconfig':"
32 eerror "Device Drivers-> Input device support-> [*] Event interface or"
33 eerror "Device Drivers-> Input device support-> [M] Event interface"
35 eerror "If compiled as modules add evdev to /etc/modules.autoload/kernel-2.6"
36 die "Please build evdev support first"
39 if ! linux_chkconfig_present USB_HID
41 eerror "${PN} requires USB Human Interface Device support for USB tablets"
42 eerror "In your .config: CONFIG_USB_HID=y or CONFIG_USB_HID=m"
43 eerror "Through 'make menuconfig':"
44 eerror "Device Drivers-> USB support-> [*] USB Human Interface Device (full HID) support or"
45 eerror "Device Drivers-> USB support-> [M] USB Human Interface Device (full HID) support"
47 eerror "If compiled as modules add usbhid to /etc/modules.autoload/kernel-2.6"
48 die "Please build USB HID support first"
51 cd "${WORKDIR}/xorg-input-${PN}-${PV/_/-}"
57 cd "${WORKDIR}/xorg-input-${PN}-${PV/_/-}"
58 econf || die "econf failed"
59 emake || die "emake failed"
63 cd "${WORKDIR}/xorg-input-${PN}-${PV/_/-}"
64 exeinto /usr/lib/xorg/modules/drivers/
65 doexe src/.libs/wizardpen_drv.so
68 doexe calibrate/wizardpen-calibrate
73 insinto /etc/udev/rules.d
74 doins udev/67-xorg-wizardpen.rules
75 doins udev/70-xorg-wizardpen-settings.rules
79 insinto /etc/hal/fdi/policy
80 doins hal/10-wizardpen-devices.fdi
81 doins hal/11-wizardpen-config.fdi
87 einfo "You can set tablet working area useing wizardpen-calibrate tool, see"
88 einfo "README and INSTALL files from /usr/share/doc/${P} for more details."