update mouse-emul-git to pacman 4.1 and add systemd service

This commit is contained in:
Daniel Wallace 2013-04-08 13:24:21 -04:00
parent 1f4d88e570
commit ed9f3c504d
3 changed files with 35 additions and 30 deletions

View file

@ -1,45 +1,42 @@
# Maintainer: Kai Uwe Jesussek <kajot@gmx.net>
pkgname=mouse-emul-git
pkgver=20110618
pkgver=13.3b2012c
pkgver(){
cd $srcdir/mouse-emul
echo $(git rev-list --count master).$(git rev-parse --short master)
}
pkgrel=1
epoch=1
plugrel=1
pkgdesc="Tiny mouse emulator"
arch=('arm' 'i686' 'x86_64')
license=('GPL2')
provides=('mouse-emul')
source=("rc-d-mouse-emul" "conf-d-mouse-emul")
md5sums=('62030a3303c2f4eb93a30b8cb81859cd'
'9771ecbee361c73e6f50b64fe1083a38')
source=("rc-d-mouse-emul" "conf-d-mouse-emul"
"git://github.com/anarsoul/mouse-emul.git"
"mouse-emul.service")
url="https://github.com/anarsoul/mouse-emul"
makedepends=('git')
_gitroot=("https://github.com/anarsoul/mouse-emul.git")
_gitname=("mouse-emul")
md5sums=('SKIP')
_gitname=mouse-emul
build() {
cd ${srcdir}
## Git checkout
if [ -d ${srcdir}/${_gitname} ] ; then
msg "Git checkout: Updating existing tree"
cd ${_gitname} && git pull origin
msg "Git checkout: Tree has been updated"
else
msg "Git checkout: Retrieving sources"
git clone ${_gitroot}
fi
msg "Checkout completed"
## Build
rm -rf ${srcdir}/${_gitname}-build
cp -r ${srcdir}/${_gitname} ${srcdir}/${_gitname}-build
cd ${srcdir}/${_gitname}-build
make DESTDIR=${pkgdir} install
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
cd ${srcdir}/${_gitname}
make
}
package() {
true
cd ${srcdir}/${_gitname}
make PREFIX=/usr DESTDIR=${pkgdir} install
install -Dm755 ${srcdir}/rc-d-mouse-emul ${pkgdir}/etc/rc.d/mouse-emul
install -Dm644 ${srcdir}/conf-d-mouse-emul ${pkgdir}/etc/conf.d/mouse-emul
install -Dm644 "$srcdir/mouse-emul.service" "$pkgdir/usr/lib/systemd/system/mouse-emul.service"
touch ${pkgdir}/etc/mouse-emulrc
}
md5sums=('47b35f3d6281dd67add9ea9c62bfc782'
'9771ecbee361c73e6f50b64fe1083a38'
'SKIP'
'11c2e47a35bd62d380393b4042556d2b')

View file

@ -0,0 +1,8 @@
[Unit]
Description=Tiny Mouse Emulator
[Service]
ExecStart=/usr/bin/mouse-emul -d /dev/input/event0
[Install]
WantedBy=multi-user.target

View file

@ -11,7 +11,7 @@ echo "foo"
case "$1" in
start)
stat_busy "Starting mouse-emul"
/usr/local/bin/mouse-emul $MOUSE_DAEMON_ARGS&
/usr/bin/mouse-emul $MOUSE_DAEMON_ARGS&
add_daemon mouse-emul
stat_done
;;