summaryrefslogtreecommitdiff
blob: d89d8a586f6277e23cd53bc4db3c872adc01830f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# Copyright 1999-2002 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License, v2 or later
# Maintainer: Bart Lauwers <blauwers@gentoo.org>
# $Header: /var/cvsroot/gentoo-x86/app-misc/mouseremote/mouseremote-0.90.ebuild,v 1.1 2002/05/09 11:30:02 blauwers Exp $

DESCRIPTION="X10 MouseRemote"
HOMEPAGE="http://www4.pair.com/gribnif/ha/"
LICENSE="GPL-2"

SRC_URI="http://www4.pair.com/gribnif/ha/MouseRemote.tar.gz"

DEPEND=""
RDEPEND="dev-perl/Time-HiRes"

S=${WORKDIR}/MouseRemote

src_compile() {
	patch -p1 < ${FILESDIR}/${PN}-gentoo.diff || die
	cd MultiMouse && emake \
		PREFIX=/usr \
		LOCKDIR=/var/lock \
	    JMANDIR=/usr/share/man/ja_JP.ujis || die
}

src_install () {
	dobin MultiMouse/multimouse
	dosbin MultiMouse/multimoused

    dodoc README MultiMouse/README.jis MultiMouse/README.newstuff
	newdoc MultiMouse/README README.MultiMouse
	newdoc client/MouseRemote.conf MouseRemote.conf.dist
	newdoc client/MouseRemote.pl MouseRemote.pl.dist
	newdoc client/MouseRemoteKeys.pl MouseRemoteKeys.pl.dist

	exeinto /etc/init.d
	newexe ${FILESDIR}/mouseremote.start mouseremote
	insinto /etc/conf.d
	newins ${FILESDIR}/mouseremote.conf mouseremote
}

pkg_postinst() {
	[ -e /dev/mumse ] || mkfifo ${ROOT}/dev/mumse
	[ -e /dev/x10fifo ] || mkfifo ${ROOT}/dev/x10fifo

	einfo "To use the mouse function in X, add the following to your XF86Config"
	einfo "Section \"InputDevice\""
    einfo "	Identifier  \"MouseREM\""
    einfo "	Driver      \"mouse\""
    einfo "	Option      \"Protocol\"      \"MouseSystems\""
    einfo "	Option      \"Device\"        \"/dev/mumse\""
	einfo "EndSection"
	einfo
	einfo "Don't forget to add the new device to the section \"ServerLayout\""
	einfo "like:	InputDevice \"MouseREM\" \"SendCoreEvents\""
	einfo
	einfo "Enable the daemon with \"rc-update add mouseremote default\"."
	einfo
	einfo "Configure the daemon is run in /etc/conf.d/mouseremote."
	einfo
	einfo "See /usr/share/doc/${PF} on how to configure the buttons."
}