summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Hambrecht2015-06-29 23:20:53 +0200
committerJan Hambrecht2015-06-29 23:20:53 +0200
commit71da0b7e13d0bf1535e5484cdcabf9ffc280d4a5 (patch)
tree68cf82ff8dca110a846d2755d41e9752a651cae5
downloadaur-71da0b7e13d0bf1535e5484cdcabf9ffc280d4a5.tar.gz
Migrate to AUR 4
-rw-r--r--.SRCINFO22
-rw-r--r--PKGBUILD32
-rw-r--r--spacenavd38
-rw-r--r--spacenavd.service11
4 files changed, 103 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..9cc8f8b8b2f2
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,22 @@
+# Generated by makepkg 4.2.0
+# Thu Jan 8 22:47:42 UTC 2015
+pkgbase = spacenavd
+ pkgdesc = The spacenav project provides a free, compatible alternative, to the proprietary 3Dconnexion device driver and SDK, for their 3D input devices (called 'space navigator', 'space pilot', 'space traveller', etc).
+ pkgver = 0.6
+ pkgrel = 1
+ url = http://spacenav.sourceforge.net/
+ arch = i686
+ arch = x86_64
+ license = GPL
+ optdepends = libx11
+ provides = spacenavd
+ backup = etc/spnavrc
+ source = http://downloads.sourceforge.net/spacenav/spacenavd-0.6.tar.gz
+ source = spacenavd
+ source = spacenavd.service
+ md5sums = 7e2c04fb8dbb7d39b9ee7b64565e0c4f
+ md5sums = 27a739300d4de07920879af2d2bdd47f
+ md5sums = 4d9314d72b4b4e8a7f5100f69f1fdba3
+
+pkgname = spacenavd
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..aed58aa6c497
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,32 @@
+# Maintainer: Jan Hambrecht <jaham at gmx dot net>
+
+pkgname=spacenavd
+pkgver=0.6
+pkgrel=1
+pkgdesc="The spacenav project provides a free, compatible alternative, to the proprietary 3Dconnexion device driver and SDK, for their 3D input devices (called 'space navigator', 'space pilot', 'space traveller', etc)."
+arch=('i686' 'x86_64')
+url="http://spacenav.sourceforge.net/"
+license=('GPL')
+optdepends=("libx11")
+provides=('spacenavd')
+backup=('etc/spnavrc')
+options=()
+install=
+source=(http://downloads.sourceforge.net/spacenav/$pkgname-$pkgver.tar.gz spacenavd spacenavd.service)
+
+md5sums=('7e2c04fb8dbb7d39b9ee7b64565e0c4f'
+ '27a739300d4de07920879af2d2bdd47f'
+ '4d9314d72b4b4e8a7f5100f69f1fdba3')
+
+build() {
+ cd ${pkgname}-${pkgver}
+ ./configure --prefix=/usr
+ make || return 1
+}
+
+package() {
+ cd ${pkgname}-${pkgver}
+ make DESTDIR="${pkgdir}" install || return 1
+ install -D -m755 ${srcdir}/spacenavd ${pkgdir}/etc/rc.d/spacenavd || return 1
+ install -D -m644 ${srcdir}/spacenavd.service ${pkgdir}/etc/systemd/system/spacenavd.service || return 1
+}
diff --git a/spacenavd b/spacenavd
new file mode 100644
index 000000000000..61946197c40b
--- /dev/null
+++ b/spacenavd
@@ -0,0 +1,38 @@
+#!/bin/bash
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+
+DAEMON=/usr/bin/spacenavd
+
+PID=`pidof -o %PPID $DAEMON`
+case "$1" in
+ start)
+ stat_busy "Starting Spacenavigator Daemon"
+ [ -z "$PID" ] && $DAEMON
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ add_daemon spacenavd
+ stat_done
+ fi
+ ;;
+ stop)
+ stat_busy "Stopping Spacenavigator Daemon"
+ [ ! -z "$PID" ] && kill $PID &> /dev/null
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ rm_daemon spacenavd
+ stat_done
+ fi
+ ;;
+ restart)
+ $0 stop
+ sleep 1
+ $0 start
+ ;;
+ *)
+ echo "usage: $0 {start|stop|restart}"
+esac
+exit 0
diff --git a/spacenavd.service b/spacenavd.service
new file mode 100644
index 000000000000..1798f5e8fb3d
--- /dev/null
+++ b/spacenavd.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=Userspace Daemon of the spacenav driver.
+
+[Service]
+Type=forking
+PIDFile=/var/run/spnavd.pid
+ExecStart=/usr/bin/spacenavd
+
+[Install]
+WantedBy=multi-user.target
+