summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBernard Cafarelli <voyageur@gentoo.org>2010-04-07 21:27:33 +0000
committerBernard Cafarelli <voyageur@gentoo.org>2010-04-07 21:27:33 +0000
commit44c6d7a4e948f6c1163f3907be175ad243df5246 (patch)
treeaa0382accde70eaec235c6225c27f633ff859e45 /app-misc/razertool/razertool-0.0.7-r3.ebuild
parentDrop accessibility requirement on qt. Per bug #309677 (diff)
downloadgentoo-2-44c6d7a4e948f6c1163f3907be175ad243df5246.tar.gz
gentoo-2-44c6d7a4e948f6c1163f3907be175ad243df5246.tar.bz2
gentoo-2-44c6d7a4e948f6c1163f3907be175ad243df5246.zip
plugdev is created by hal, use usb group by default instead
(Portage version: 2.2_rc67/cvs/Linux x86_64)
Diffstat (limited to 'app-misc/razertool/razertool-0.0.7-r3.ebuild')
-rw-r--r--app-misc/razertool/razertool-0.0.7-r3.ebuild63
1 files changed, 63 insertions, 0 deletions
diff --git a/app-misc/razertool/razertool-0.0.7-r3.ebuild b/app-misc/razertool/razertool-0.0.7-r3.ebuild
new file mode 100644
index 000000000000..78265e221acb
--- /dev/null
+++ b/app-misc/razertool/razertool-0.0.7-r3.ebuild
@@ -0,0 +1,63 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-misc/razertool/razertool-0.0.7-r3.ebuild,v 1.1 2010/04/07 21:27:33 voyageur Exp $
+
+EAPI=2
+inherit eutils
+
+DESCRIPTION="Unofficial tool for controlling the Razer Copperhead mouse"
+HOMEPAGE="http://razertool.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P/-/_}.orig.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="gtk"
+
+RDEPEND="=virtual/libusb-0*
+ gtk? (
+ >=gnome-base/librsvg-2.0
+ >=x11-libs/cairo-1.0.0
+ >=x11-libs/gtk+-2.8.0 )"
+DEPEND="${RDEPEND}
+ dev-util/pkgconfig"
+
+src_prepare() {
+ sed -i razertool.rules.example \
+ -e 's:ACTION=="add", ::;s:BUS=:SUBSYSTEMS=:;s:SYSFS{:ATTRS{:g' \
+ || die "sed razertool.rules.example action failed"
+
+ # plugdev group may not exist (created by hal), default to usb
+ sed -i razertool.rules.example \
+ -e 's:plugdev:usb:' \
+ || die "sed razertool.rules.example plugdev failed"
+}
+
+src_configure() {
+ econf $(use_enable gtk) || die "econf failed"
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die "emake install failed"
+
+ insinto /etc/udev/rules.d
+ newins razertool.rules.example 90-razertool.rules \
+ || die "newins failed"
+
+ dodoc AUTHORS ChangeLog NEWS README
+
+ # Icon and desktop entry
+ dosym /usr/share/${PN}/pixmaps/${PN}-icon.png /usr/share/pixmaps/${PN}-icon.png
+ make_desktop_entry "razertool-gtk" "RazerTool" ${PN}-icon "GTK;Settings;HardwareSettings"
+}
+
+pkg_postinst() {
+ elog "Razer Copperhead mice need firmware version 6.20 or higher"
+ elog "to work properly. Running ${PN} on mice with older firmwares"
+ elog "might lead to random USB-disconnects."
+ elog "To run as non-root, add yourself to the usb group:"
+ elog " gpasswd -a <user> usb"
+ elog "or adapt permissions/owner/group in:"
+ elog " /etc/udev/rules.d/90-razertool.rules"
+ elog "Then unplug and plug in the mouse."
+}