Update x11-drivers/wizardpen to 0.8.0.
[overlay.git] / x11-drivers / wizardpen / wizardpen-0.8.0.ebuild
1 # Copyright 1999-2005 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: $
4
5 inherit linux-mod eutils autotools
6
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"
10
11 DEPEND=""
12 RDEPEND="x11-base/xorg-server"
13
14 LICENSE="GPL-2"
15 SLOT="0"
16 KEYWORDS="~x86 ~amd64"
17 IUSE="hal udev"
18
19 RESTRICT="nomirror"
20
21 src_unpack() {
22         if kernel_is 2 4; then
23                 die "You must use 2.6.X kernel with ${PN}"
24         fi
25         if ! linux_chkconfig_module INPUT_EVDEV
26         then
27                 if ! linux_chkconfig_present INPUT_EVDEV
28                         then
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"
34                                                 eerror ""
35                                                 eerror "If compiled as modules add evdev to /etc/modules.autoload/kernel-2.6"
36                                                 die "Please build evdev support first"
37                 fi
38         fi
39         if ! linux_chkconfig_present USB_HID
40         then
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"
46                 eerror ""
47                 eerror "If compiled as modules add usbhid to /etc/modules.autoload/kernel-2.6"
48                 die "Please build USB HID support first"
49         fi
50         unpack ${A}
51         cd "${WORKDIR}/xorg-input-${PN}-${PV/_/-}"
52         rm aclocal.m4
53         eautoreconf
54 }
55
56 src_compile() {
57         cd "${WORKDIR}/xorg-input-${PN}-${PV/_/-}"
58         econf || die "econf failed"
59         emake || die "emake failed"
60 }
61
62 src_install() {
63         cd "${WORKDIR}/xorg-input-${PN}-${PV/_/-}"
64         exeinto /usr/lib/xorg/modules/drivers/
65         doexe src/.libs/wizardpen_drv.so
66
67         exeinto /usr/bin
68         doexe calibrate/wizardpen-calibrate
69
70         doman man/wizardpen.4
71
72         use udev && {
73                 insinto /etc/udev/rules.d
74                 doins udev/67-xorg-wizardpen.rules
75                 doins udev/70-xorg-wizardpen-settings.rules
76         }
77
78         use hal && {
79                 insinto /etc/hal/fdi/policy
80                 doins hal/10-wizardpen-devices.fdi
81                 doins hal/11-wizardpen-config.fdi
82         }
83 }
84
85 pkg_postinst() {
86         einfo ""
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."
89         einfo ""
90 }