added mouse-emul initscript

This commit is contained in:
Kai 2011-06-18 10:21:23 +00:00
parent c3bf8527e8
commit 65495d9a27
3 changed files with 42 additions and 2 deletions

View file

@ -1,13 +1,17 @@
# Maintainer: Kai Uwe Jesussek <kajot@gmx.net> # Maintainer: Kai Uwe Jesussek <kajot@gmx.net>
pkgname=mouse-emul-git pkgname=mouse-emul-git
pkgver=20110611 pkgver=20110618
pkgrel=1 pkgrel=1
plugrel=1 plugrel=1
pkgdesc="Tiny mouse emulator" pkgdesc="Tiny mouse emulator"
arch=('arm' 'i686' 'x86_64') arch=('arm' 'i686' 'x86_64')
license=('GPL2') license=('GPL2')
provides=('mouse-emul') provides=('mouse-emul')
source=("rc-d-mouse-emul" "conf-d-mouse-emul")
md5sums=('62030a3303c2f4eb93a30b8cb81859cd'
'9771ecbee361c73e6f50b64fe1083a38')
url="https://github.com/anarsoul/mouse-emul"
makedepends=('git') makedepends=('git')
_gitroot=("https://github.com/anarsoul/mouse-emul.git") _gitroot=("https://github.com/anarsoul/mouse-emul.git")
_gitname=("mouse-emul") _gitname=("mouse-emul")
@ -31,7 +35,9 @@ build() {
cp -r ${srcdir}/${_gitname} ${srcdir}/${_gitname}-build cp -r ${srcdir}/${_gitname} ${srcdir}/${_gitname}-build
cd ${srcdir}/${_gitname}-build cd ${srcdir}/${_gitname}-build
make DESTDIR=${pkgdir} install make DESTDIR=${pkgdir} install
mkdir ${pkgdir}/etc/ mkdir -p ${pkgdir}/etc/rc.d ${pkgdir}/etc/conf.d
cp ${srcdir}/rc-d-mouse-emul ${pkgdir}/etc/rc.d/mouse-emul
cp ${srcdir}/conf-d-mouse-emul ${pkgdir}/etc/conf.d/mouse-emul
touch ${pkgdir}/etc/mouse-emulrc touch ${pkgdir}/etc/mouse-emulrc
} }
package() { package() {

View file

@ -0,0 +1 @@
MOUSE_DAEMON_ARGS="-d /dev/input/event0"

View file

@ -0,0 +1,33 @@
#!/bin/bash
. /etc/rc.conf
. /etc/rc.d/functions
[ -f /etc/conf.d/mouse-emul ] && . /etc/conf.d/mouse-emul
function call_mouseemul() {
echo "foo"
}
case "$1" in
start)
stat_busy "Starting mouse-emul"
/usr/local/bin/mouse-emul $MOUSE_DAEMON_ARGS&
add_daemon mouse-emul
stat_done
;;
stop)
stat_busy "Stopping mouse-emul"
killall mouse-emul
rm_daemon mouse-emul
stat_done
;;
restart)
$0 stop
sleep 1
$0 start
;;
*)
echo "usage: $0 {start|stop|restart}"
esac
exit 0