Gentoo Archives: gentoo-commits

From: "Tony Vroon (chainsaw)" <chainsaw@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in app-misc/g15daemon: ChangeLog g15daemon-1.9.5.3-r1.ebuild
Date: Mon, 08 Sep 2008 11:44:06
Message-Id: E1KcfA3-0006hY-4S@stork.gentoo.org
1 chainsaw 08/09/08 11:44:03
2
3 Modified: ChangeLog
4 Added: g15daemon-1.9.5.3-r1.ebuild
5 Log:
6 Hotplug support by Tais M. Hansen <tais.hansen@×××.dk>, closes bug #236422.
7 (Portage version: 2.2_rc8/cvs/Linux 2.6.27-rc5-00131-g5f17cfc-dirty x86_64)
8
9 Revision Changes Path
10 1.22 app-misc/g15daemon/ChangeLog
11
12 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-misc/g15daemon/ChangeLog?rev=1.22&view=markup
13 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-misc/g15daemon/ChangeLog?rev=1.22&content-type=text/plain
14 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-misc/g15daemon/ChangeLog?r1=1.21&r2=1.22
15
16 Index: ChangeLog
17 ===================================================================
18 RCS file: /var/cvsroot/gentoo-x86/app-misc/g15daemon/ChangeLog,v
19 retrieving revision 1.21
20 retrieving revision 1.22
21 diff -u -r1.21 -r1.22
22 --- ChangeLog 29 May 2008 15:41:32 -0000 1.21
23 +++ ChangeLog 8 Sep 2008 11:44:02 -0000 1.22
24 @@ -1,6 +1,13 @@
25 # ChangeLog for app-misc/g15daemon
26 # Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2
27 -# $Header: /var/cvsroot/gentoo-x86/app-misc/g15daemon/ChangeLog,v 1.21 2008/05/29 15:41:32 hawking Exp $
28 +# $Header: /var/cvsroot/gentoo-x86/app-misc/g15daemon/ChangeLog,v 1.22 2008/09/08 11:44:02 chainsaw Exp $
29 +
30 +*g15daemon-1.9.5.3-r1 (08 Sep 2008)
31 +
32 + 08 Sep 2008; <chainsaw@g.o> +files/99-g15daemon.rules,
33 + +files/g15daemon-hotplug, +g15daemon-1.9.5.3-r1.ebuild:
34 + Hotplug support by Tais M. Hansen <tais.hansen@×××.dk>, closes bug
35 + #236422.
36
37 29 May 2008; Ali Polatel <hawking@g.o> g15daemon-1.2.6a-r1.ebuild,
38 g15daemon-1.2.7.ebuild, g15daemon-1.2.7-r1.ebuild,
39
40
41
42 1.1 app-misc/g15daemon/g15daemon-1.9.5.3-r1.ebuild
43
44 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-misc/g15daemon/g15daemon-1.9.5.3-r1.ebuild?rev=1.1&view=markup
45 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-misc/g15daemon/g15daemon-1.9.5.3-r1.ebuild?rev=1.1&content-type=text/plain
46
47 Index: g15daemon-1.9.5.3-r1.ebuild
48 ===================================================================
49 # Copyright 1999-2008 Gentoo Foundation
50 # Distributed under the terms of the GNU General Public License v2
51 # $Header: /var/cvsroot/gentoo-x86/app-misc/g15daemon/g15daemon-1.9.5.3-r1.ebuild,v 1.1 2008/09/08 11:44:02 chainsaw Exp $
52
53 inherit eutils linux-info perl-module python multilib
54
55 DESCRIPTION="G15daemon takes control of the G15 keyboard, through the linux kernel uinput device driver"
56 HOMEPAGE="http://g15daemon.sourceforge.net/"
57 SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
58
59 LICENSE="GPL-2"
60 SLOT="0"
61 KEYWORDS="~amd64 ~ppc ~ppc64 ~x86"
62 IUSE="perl python"
63
64 DEPEND="dev-libs/libusb
65 >=dev-libs/libg15-1.2.4
66 >=dev-libs/libg15render-1.2
67 perl? ( >=dev-perl/Inline-0.4 )
68 python? ( dev-lang/python )"
69
70 RDEPEND="${DEPEND}
71 perl? ( dev-perl/GDGraph )"
72
73 uinput_check() {
74 ebegin "Checking for uinput support"
75 linux_chkconfig_present INPUT_UINPUT
76 eend $?
77
78 if [[ $? -ne 0 ]] ; then
79 eerror "To use g15daemon, you need to compile your kernel with uinput support."
80 eerror "Please enable uinput support in your kernel config, found at:"
81 eerror
82 eerror "Device Drivers -> Input Device ... -> Miscellaneous devices -> User level driver support."
83 eerror
84 eerror "Once enabled, you should have the /dev/input/uinput device."
85 eerror "g15daemon will not work without the uinput device."
86 die "INPUT_UINPUT support not detected!"
87 fi
88 }
89
90 pkg_setup() {
91 linux-info_pkg_setup
92 uinput_check
93 }
94
95 src_unpack() {
96 unpack ${A}
97 if use perl; then
98 unpack "./${P}/lang-bindings/perl-G15Daemon-0.2.tar.gz"
99 fi
100 if use python; then
101 unpack "./${P}/lang-bindings/pyg15daemon-0.0.tar.bz2"
102 fi
103 }
104
105 src_compile() {
106 econf || die "configure failed"
107
108 emake || die "make failed"
109
110 if use perl; then
111 cd "${WORKDIR}/G15Daemon-0.2"
112 perl-module_src_compile
113 fi
114 }
115
116 src_install() {
117 emake DESTDIR="${D}" \
118 docdir=/usr/share/doc/${PF} install || die "make install failed"
119
120 # remove odd docs installed my make
121 rm "${D}/usr/share/doc/${PF}/"{LICENSE,README.usage}
122
123 insinto /usr/share/${PN}/contrib
124 doins contrib/xmodmaprc
125 doins contrib/xmodmap.sh
126 if use perl; then
127 doins contrib/testbindings.pl
128 fi
129
130 newconfd "${FILESDIR}/${PN}-1.2.7.confd" ${PN}
131 newinitd "${FILESDIR}/${PN}-1.2.7-r2.initd" ${PN}
132 dobin "${FILESDIR}/g15daemon-hotplug"
133 insinto /etc/udev/rules.d
134 doins "${FILESDIR}/99-g15daemon.rules"
135
136 if use perl; then
137 ebegin "Installing Perl Bindings (G15Daemon.pm)"
138 cd "${WORKDIR}/G15Daemon-0.2"
139 docinto perl
140 perl-module_src_install
141 fi
142
143 if use python; then
144 ebegin "Installing Python Bindings (g15daemon.py)"
145 cd "${WORKDIR}/pyg15daemon"
146 python_version
147
148 insinto /usr/$(get_libdir)/python${PYVER}/site-packages/g15daemon
149 doins g15daemon.py
150
151 docinto python
152 dodoc AUTHORS
153 fi
154
155 prepalldocs
156 }
157
158 pkg_postinst() {
159 if use python; then
160 python_version
161 python_mod_optimize /usr/$(get_libdir)/python${PYVER}/site-packages/g15daemon
162 echo ""
163 fi
164
165 elog "To use g15daemon, you need to add g15daemon to the default runlevel."
166 elog "This can be done with:"
167 elog "# /sbin/rc-update add g15daemon default"
168 elog "You can edit some g15daemon options at /etc/conf.d/g15daemon"
169 elog ""
170 elog "To have all new keys working in X11, you'll need create a "
171 elog "specific xmodmap in your home directory or edit the existent one."
172 elog ""
173 elog "Create the xmodmap:"
174 elog "cp /usr/share/g15daemon/contrib/xmodmaprc ~/.Xmodmap"
175 elog ""
176 elog "Adding keycodes to an existing xmodmap:"
177 elog "cat /usr/share/g15daemon/contrib/xmodmaprc >> ~/.Xmodmap"
178 }
179
180 pkg_postrm() {
181 if use python; then
182 python_mod_cleanup "/usr/$(get_libdir)/python*/site-packages/g15daemon"
183 fi
184 }