Add ~amd64 keyword to x11-drivers/wizardpen.
[overlay.git] / x11-drivers / wizardpen / wizardpen-0.7.1-r1.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
6
7 DESCRIPTION="Driver for Genius Wizardpen Tablets"
8 HOMEPAGE="http://code.google.com/p/linuxgenius/"
9 SRC_URI="http://gentoo.pterodactylus.net/distfiles/wizardpen-0.7.1.tar.bz2"
10
11 DEPEND=""
12 RDEPEND="x11-base/xorg-server"
13
14 LICENSE="GPL-2"
15 SLOT="0"
16 KEYWORDS="~x86 ~amd64"
17
18 RESTRICT="nomirror"
19
20 src_unpack() {
21         if kernel_is 2 4; then
22                 die "You must use 2.6.X kernel with ${PN}"
23         fi
24         if ! linux_chkconfig_module INPUT_EVDEV
25         then
26                 if ! linux_chkconfig_present INPUT_EVDEV
27                         then
28                         eerror "${PN} requires evdev support for USB tablets"
29                         eerror "In your .config: CONFIG_INPUT_EVDEV=y or CONFIG_INPUT_EVDEV=m"
30                         eerror "Through 'make menuconfig':"
31                                                 eerror "Device Drivers-> Input device support-> [*] Event interface or"
32                                                 eerror "Device Drivers-> Input device support-> [M] Event interface"
33                                                 eerror ""
34                                                 eerror "If compiled as modules add evdev to /etc/modules.autoload/kernel-2.6"
35                                                 die "Please build evdev support first"
36                 fi
37         fi
38         if ! linux_chkconfig_present USB_HID
39         then
40                 eerror "${PN} requires USB Human Interface Device support for USB tablets"
41                 eerror "In your .config: CONFIG_USB_HID=y or CONFIG_USB_HID=m"
42                 eerror "Through 'make menuconfig':"
43                 eerror "Device Drivers-> USB support-> [*] USB Human Interface Device (full HID) support or"
44                 eerror "Device Drivers-> USB support-> [M] USB Human Interface Device (full HID) support"
45                 eerror ""
46                 eerror "If compiled as modules add usbhid to /etc/modules.autoload/kernel-2.6"
47                 die "Please build USB HID support first"
48         fi
49         unpack ${A}
50         cd ${S}
51 }
52
53 src_compile() {
54         cd "${WORKDIR}/${PN}-${PV/_/-}"
55         econf || die "econf failed"
56         emake || die "emake failed"
57 }
58
59 src_install() {
60         cd "${WORKDIR}/${PN}-${PV/_/-}"
61         exeinto /usr/lib/xorg/modules/drivers/
62         doexe src/.libs/wizardpen_drv.so
63
64         exeinto /usr/bin
65         doexe calibrate/wizardpen-calibrate
66
67         dodoc README-XOrgConfig INSTALL
68         newdoc calibrate/readme README.calibrate
69         newdoc calibrate/ChangeLog ChangeLog.calibrate
70
71         doman man/wizardpen.4
72
73         insinto /etc/hal/fdi/policy
74         newins ${FILESDIR}/wizardpen.fdi 45-wizardpen.fdi
75 }
76
77 pkg_postinst() {
78         einfo ""
79         einfo "You can set tablet working area useing wizardpen-calibrate tool, see"
80         einfo "README and INSTALL files from /usr/share/doc/${P} for more details."
81         einfo ""
82 }