summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app-misc')
-rw-r--r--app-misc/spacenavd/ChangeLog70
-rw-r--r--app-misc/spacenavd/Manifest11
-rw-r--r--app-misc/spacenavd/files/99-space-navigator.rules6
-rw-r--r--app-misc/spacenavd/files/99-space-navigator.rules.systemd7
-rw-r--r--app-misc/spacenavd/files/spacenavd-0.5-custom-flags.patch67
-rw-r--r--app-misc/spacenavd/files/spacenavd-0.5-destdir.patch16
-rw-r--r--app-misc/spacenavd/files/spacenavd-0.5-no-x11.patch13
-rw-r--r--app-misc/spacenavd/files/spnavd27
-rw-r--r--app-misc/spacenavd/files/spnavd.service13
-rw-r--r--app-misc/spacenavd/metadata.xml22
-rw-r--r--app-misc/spacenavd/spacenavd-0.5-r5.ebuild79
11 files changed, 331 insertions, 0 deletions
diff --git a/app-misc/spacenavd/ChangeLog b/app-misc/spacenavd/ChangeLog
new file mode 100644
index 0000000..eb0bce5
--- /dev/null
+++ b/app-misc/spacenavd/ChangeLog
@@ -0,0 +1,70 @@
+# ChangeLog for app-misc/spacenavd
+# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/app-misc/spacenavd/ChangeLog,v 1.15 2013/03/17 17:03:15 hwoarang Exp $
+
+*spacenavd-0.5-r5 (26 Mar 2014)
+
+ 26 Mar 2014; Anthoine Bourgeois <anthoine.bourgeois@gmail.com> +spacenavd-0.5-r5.ebuild:
+ Add systemd service file and adapt the udev rules file according to.
+
+ 17 Mar 2013; Markos Chandras <hwoarang@gentoo.org> metadata.xml:
+ Add proxy-maintainers to metadata.xml
+
+ 12 Feb 2013; Agostino Sarubbo <ago@gentoo.org> spacenavd-0.5-r4.ebuild:
+ Stable for ppc64, wrt bug #456454
+
+ 10 Feb 2013; Agostino Sarubbo <ago@gentoo.org> spacenavd-0.5-r4.ebuild:
+ Stable for amd64, wrt bug #456454
+
+ 10 Feb 2013; Agostino Sarubbo <ago@gentoo.org> spacenavd-0.5-r4.ebuild:
+ Stable for x86, wrt bug #456454
+
+ 16 Nov 2012; Samuli Suominen <ssuominen@gentoo.org> -spacenavd-0.5-r3.ebuild:
+ old
+
+*spacenavd-0.5-r4 (16 Nov 2012)
+
+ 16 Nov 2012; Samuli Suominen <ssuominen@gentoo.org> +spacenavd-0.5-r4.ebuild:
+ Use udev.eclass to read correct udevdir from udev.pc pkg-config file. It is
+ never correct to hardcode the path.
+
+ 30 Sep 2012; Agostino Sarubbo <ago@gentoo.org> spacenavd-0.5-r2.ebuild:
+ Stable for amd64, wrt bug #436576
+
+*spacenavd-0.5-r3 (30 Sep 2012)
+
+ 30 Sep 2012; Sebastian Pipping <sping@gentoo.org> +spacenavd-0.5-r3.ebuild:
+ Put udev rules into /usr/lib/udev/rules.d/ rather than /etc/udev/rules.d (bug
+ #436658)
+
+ 30 Sep 2012; Anthony G. Basile <blueness@gentoo.org> spacenavd-0.5-r2.ebuild:
+ stable ppc64, bug #436576
+
+ 29 Sep 2012; Anthony G. Basile <blueness@gentoo.org> spacenavd-0.5-r2.ebuild:
+ keyword ~ppc64, bug #436566
+
+ 22 Mar 2012; Sebastian Pipping <sping@gentoo.org> spacenavd-0.5-r2.ebuild,
+ +files/spacenavd-0.5-no-x11.patch:
+ Fix compilation for USE=-X (bug #409143) reported by Piotr Szymaniak, patch
+ by Anthoine Bourgeois
+
+ 20 Feb 2012; Mike Gilbert <floppym@gentoo.org> metadata.xml:
+ Drop no-herd.
+
+ 11 Feb 2012; Sebastian Pipping <sping@gentoo.org> spacenavd-0.5-r2.ebuild:
+ Check for CONFIG_INPUT_EVDEV, not CONFIG_HOTPLUG; patch by Anthoine Bourgeois
+
+*spacenavd-0.5-r2 (09 Feb 2012)
+
+ 09 Feb 2012; Sebastian Pipping <sping@gentoo.org>
+ +files/99-space-navigator.rules, -spacenavd-0.5-r1.ebuild,
+ +spacenavd-0.5-r2.ebuild:
+ Add udev rule
+
+*spacenavd-0.5-r1 (06 Feb 2012)
+
+ 06 Feb 2012; Sebastian Pipping <sping@gentoo.org> +spacenavd-0.5-r1.ebuild,
+ +files/spacenavd-0.5-custom-flags.patch, +files/spacenavd-0.5-destdir.patch,
+ +files/spnavd, +metadata.xml:
+ New package, needed for libspnav (bug #390427), co-operation with Anthoine
+ Bourgeois
diff --git a/app-misc/spacenavd/Manifest b/app-misc/spacenavd/Manifest
new file mode 100644
index 0000000..68325f5
--- /dev/null
+++ b/app-misc/spacenavd/Manifest
@@ -0,0 +1,11 @@
+AUX 99-space-navigator.rules 442 SHA256 648add933b7775f02d8a54d9070a7505098d41b8e5b605bb56b11419cddb099b SHA512 4288cd27d909d0a8463d936dbaf7aa569dbe880d64505522048b9c76a8d465f3a196af696ba49c177e1b419fbd2cd6994a2c75552051625380a1808765786072 WHIRLPOOL fa245e4ccd1828147582806ad5e3b6c93d58661b516b0f4aff586aeb9e52d6c9c4ac6772ef70ede13211a810713eaac8b452ed63ff3b1e10cb57dd1ac571cb5e
+AUX 99-space-navigator.rules.systemd 460 SHA256 091ac987ca55b4176cbec4ce339541aec74313ec41eeaecc4ed4731320f7a7a6 SHA512 c5b6067a73a7bbc80077f89bc934f427ddf3c8af9c6b5bad70337a765812020ceb60155fbfe04d6eb51241fd4ae467e83944baa9814375606bb63a496af1d12e WHIRLPOOL 064b270fb48c601c1889076c1d445d2fa7394f2fb5c05369afe81e107539d7231c239982af70046bbff185839e8997aaef732157d8f8ae0f9b8b7ef4129fc2de
+AUX spacenavd-0.5-custom-flags.patch 2008 SHA256 78c8aebbd33f0c135501e6dea132c4f6edd9068bfddf741bfc8fe11d5269f546 SHA512 547d9f3098846901418acb71be996cec39bf18616e4a7eee5fc09bc201bfb2a534ff70f38d515b0f6c685330d002ea277c03b448ba70de4a3df65e6286780174 WHIRLPOOL da8e4d838d91e8334b7adb16751e928193ac27dde496d2304a9fa4f9412f70791ff2df785ee0662dde805ff813f7e17f83291671629f54e704544725e6dd9466
+AUX spacenavd-0.5-destdir.patch 649 SHA256 df58f5006d3b1be15a40182ca91ea964d62572a6e0a47b05c037958674db5366 SHA512 4330ae7b49e661a60f01931716f9924c01cade4e169b3de48ec08039099ce10c6dfe5c8df9a3b01c1890ccb83b3c92d45ea06f5fd9465c3f1514902cc375e1f0 WHIRLPOOL d90f63eb471509eae6cc3bd4e28e08f56882ae8e8a04b5867b75afba271c938da424d7625ead6166bfdfd31039cc482ccef53748bb055260bf2de9088dec59e9
+AUX spacenavd-0.5-no-x11.patch 388 SHA256 1c4a16f41176da31e61cb4a0984d4d3b158d334e598325c2eda9e8f6ab6ef933 SHA512 d6cb2d6337b3e19ef56f5e0ccbfdc731b038009df852b3d1f7272001aa18e70a1701c3af2d1b4976cac7392a6176c0f4cee787d2c9b4b96ba029d1cc0db3d7ae WHIRLPOOL 7ea4516dc404900377d44dc056b2056b32c066759ebdf3363fc43379069d90b4eaecc32f3156173a9a030b1bc392c7665d33b11749fc05bec50a781b5c1f94ef
+AUX spnavd 579 SHA256 2ad811c9c2de7ffa054e22a3d1a8c597b0a1cdc9fda719a7cc94a4fd8ca7ad42 SHA512 9088928719172ac114d86cfdde0bd3c435fec51538334b8f8beaa7945848fcb89373577b1daaa446f43c01f3f9e3d6e03cdea53d153530a8f8508552e14b8fa9 WHIRLPOOL 45e40c8a59013a6f24e466ebaac60126113e85dee89c719a4df496c9da0f45ecc2d4aa17ce828618fb043e8d5b1bb1007043cade553e98ce08741c8beafc53dd
+AUX spnavd.service 245 SHA256 b6c7f4f8b2ff85dc94b1cf60214f0a5b1ed9a8ad2d4b73a6b092d9a9edded0cd SHA512 d6f9c3482ca74fcc853ed860eea85d2ed6894021f28adc68fc41f99ea86b699bbd541194e63a470a603091c22972b8a8072da2478e06c21cf845df9a7414bde5 WHIRLPOOL 4fa34d6cfcd229526fa11ecb569eeb4de9b390e4c858a2a083757aa2d55eba50f1901c42b14fe0ff3ad71cb09fb4e377a42d62b72a35be0cd71774287872cc76
+DIST spacenavd-0.5.tar.gz 41746 SHA256 0eecc5b5ad47ee6376d1521f2bc7c8f8fc02904cf3fede3f77e59f4795b592e3 SHA512 908f598e4ba5febbc1191cc32cd444817acd40c22e79b1f139c50787e1e25d4cd8328dc3fd6d9dde09bb80232b52f0e75ae429fb3345eb51fbe5a47577b038e2 WHIRLPOOL e2cf70c7e9cc4b8e32b15ab79dae565c8c2a4bc32a6485a0a1857ea4d4667859ac0bb82e32cd54b722d51c34b9ea094fe8bcb1459a9f60077bde8a01207ab910
+EBUILD spacenavd-0.5-r5.ebuild 2136 SHA256 a982bc09c1b1fd4d9466255a5e8a821157e7dafe96d50ced5a9e00e2f8651406 SHA512 f86e2f61bd3a0fce51a98c4165a3d21a16e02af17af788923dd69ef7c919c2ff181b1a3a32b49699ad0d5c8fb7dda2b0187dbc9c8e7de20cd53e43faa07ced4a WHIRLPOOL 739a586bef87b24bb2b0e55530eca90f0152bbbcc0f178984a8893db4bb2a04aa61cf05dd97cb71e5c66b24ec6387ca25d8924f09c42cc3ca48e3e6fe6775b13
+MISC ChangeLog 2607 SHA256 1207587237f9a4af3fccbe342d7642bab70f1eb600f91595fcf5f92e65595951 SHA512 3b9d6e30c29de3356eee4455bfb0d51d6f61f0e285a2d867e6dd8508eb8622d1562d10be17f01b7f101635f674bcfea5f4d75b1ee9b45a131e947525cf4f41cc WHIRLPOOL 63d38fb99cc4a78c422080029bf8d959b930f4b7301aa8859bfd7813f0f6c057c7c726e1d7fd03328de1068a5aa83a6e49a30e79a9a3175c56bb6ed8d00652ac
+MISC metadata.xml 853 SHA256 ce9a9943bd9e35ed71fbb9d2d40b42c1e7331b2bde217e4fc7b25e7972541e31 SHA512 7bb805662eebb527d733641385f33ebd2f5a7680e3911b77bc3f324ab760930d34b2f97f245901d99f63bd180d987e4d28d6116c15f18bc0899500ee07361d39 WHIRLPOOL 0fa61f2aa608d8b5aaabc5ed27558084907330e86d85258b1e359ab0a7b58231e5ae861dc3af17f30a073f42b0b2060530a7056747d6e9e162373feae28ce9ef
diff --git a/app-misc/spacenavd/files/99-space-navigator.rules b/app-misc/spacenavd/files/99-space-navigator.rules
new file mode 100644
index 0000000..972b49d
--- /dev/null
+++ b/app-misc/spacenavd/files/99-space-navigator.rules
@@ -0,0 +1,6 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2 or later
+# $Header: /var/cvsroot/gentoo-x86/app-misc/spacenavd/files/99-space-navigator.rules,v 1.1 2012/02/09 03:46:36 sping Exp $
+
+# Start daemon on insertion of a SpaceNavigator device
+SUBSYSTEM=="usb", ACTION=="add", ATTRS{manufacturer}=="3Dconnexion", ATTRS{product}=="Space Navigator", RUN+="/etc/init.d/spacenavd --quiet start"
diff --git a/app-misc/spacenavd/files/99-space-navigator.rules.systemd b/app-misc/spacenavd/files/99-space-navigator.rules.systemd
new file mode 100644
index 0000000..e8f6fb2
--- /dev/null
+++ b/app-misc/spacenavd/files/99-space-navigator.rules.systemd
@@ -0,0 +1,7 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2 or later
+# $Header: /var/cvsroot/gentoo-x86/app-misc/spacenavd/files/99-space-navigator.rules,v 1.1 2014/26/03 03:46:36 abourgeois Exp $
+
+# Start daemon on insertion of a SpaceNavigator device
+SUBSYSTEM=="usb", ACTION=="add", ATTRS{manufacturer}=="3Dconnexion", ATTRS{product}=="SpaceNavigator", TAG+="systemd", ENV{SYSTEMD_WANTS}+="spacenavd.service"
+
diff --git a/app-misc/spacenavd/files/spacenavd-0.5-custom-flags.patch b/app-misc/spacenavd/files/spacenavd-0.5-custom-flags.patch
new file mode 100644
index 0000000..3b834a4
--- /dev/null
+++ b/app-misc/spacenavd/files/spacenavd-0.5-custom-flags.patch
@@ -0,0 +1,67 @@
+diff -Npur spacenavd-0.5.orig/Makefile.in spacenavd-0.5/Makefile.in
+--- spacenavd-0.5.orig/Makefile.in 2012-01-31 22:22:20.460368687 +0100
++++ spacenavd-0.5/Makefile.in 2012-01-31 22:23:18.170367675 +0100
+@@ -6,8 +6,8 @@ ctl = spnavd_ctl
+
+ CC = gcc
+ INSTALL = install
+-CFLAGS = -pedantic -Wall $(dbg) $(opt) -fno-strict-aliasing -I$(srcdir)/src
+-LDFLAGS = $(xlib)
++CFLAGS = $(opt) -fno-strict-aliasing -I$(srcdir)/src
++LDFLAGS = $(ldopt) $(xlib)
+
+ $(bin): $(obj)
+ $(CC) -o $@ $(obj) $(LDFLAGS)
+diff -Npur spacenavd-0.5.orig/configure spacenavd-0.5/configure
+--- spacenavd-0.5.orig/configure 2012-01-31 22:22:20.460368687 +0100
++++ spacenavd-0.5/configure 2012-01-31 22:22:49.257368187 +0100
+@@ -28,6 +28,7 @@ test_kver() {
+
+ PREFIX=/usr/local
+ OPT=yes
++LDOPT=yes
+ DBG=yes
+ X11=yes
+ HOTPLUG=yes
+@@ -70,6 +71,11 @@ for arg; do
+ --disable-opt)
+ OPT=no;;
+
++ --enable-ldopt)
++ LDOPT=yes;;
++ --disable-ldopt)
++ LDOPT=no;;
++
+ --enable-debug)
+ DBG=yes;;
+ --disable-debug)
+@@ -95,6 +101,8 @@ for arg; do
+ echo ' --disable-hotplug: disable hotplug, fallback to polling for the device'
+ echo ' --enable-opt: enable speed optimizations (default)'
+ echo ' --disable-opt: disable speed optimizations'
++ echo ' --enable-ldopt: enable link optimizations (default)'
++ echo ' --disable-ldopt: disable link optimizations'
+ echo ' --enable-debug: include debugging symbols (default)'
+ echo ' --disable-debug: do not include debugging symbols'
+ echo 'all invalid options are silently ignored'
+@@ -105,6 +113,7 @@ done
+
+ echo " prefix: $PREFIX"
+ echo " optimize for speed: $OPT"
++echo " optimize link: $LDOPT"
+ echo " include debugging symbols: $DBG"
+ echo " x11 communication method: $X11"
+ echo " use hotplug: $HOTPLUG"
+@@ -128,7 +137,11 @@ if [ "$DBG" = 'yes' ]; then
+ fi
+
+ if [ "$OPT" = 'yes' ]; then
+- echo 'opt = -O3' >>Makefile
++ echo "opt = ${CFLAGS:--O3}" >>Makefile
++fi
++
++if [ "$LDOPT" = 'yes' ]; then
++ echo "ldopt = ${LDFLAGS}" >>Makefile
+ fi
+
+ if [ "$X11" = 'yes' ]; then
diff --git a/app-misc/spacenavd/files/spacenavd-0.5-destdir.patch b/app-misc/spacenavd/files/spacenavd-0.5-destdir.patch
new file mode 100644
index 0000000..5b23722
--- /dev/null
+++ b/app-misc/spacenavd/files/spacenavd-0.5-destdir.patch
@@ -0,0 +1,16 @@
+diff -Npur spacenavd-0.5.orig/Makefile.in spacenavd-0.5/Makefile.in
+--- spacenavd-0.5.orig/Makefile.in 2011-11-16 21:43:53.210859753 +0100
++++ spacenavd-0.5/Makefile.in 2011-11-16 21:45:36.386857932 +0100
+@@ -24,9 +24,9 @@ clean:
+
+ .PHONY: install
+ install: $(bin)
+- $(INSTALL) -d $(PREFIX)/bin
+- $(INSTALL) -m 755 $(bin) $(PREFIX)/bin/$(bin)
+- $(INSTALL) -m 755 $(srcdir)/$(ctl) $(PREFIX)/bin/$(ctl)
++ $(INSTALL) -d $(DESTDIR)$(PREFIX)/bin
++ $(INSTALL) -m 755 $(bin) $(DESTDIR)$(PREFIX)/bin/$(bin)
++ $(INSTALL) -m 755 $(srcdir)/$(ctl) $(DESTDIR)$(PREFIX)/bin/$(ctl)
+ cd $(srcdir) && ./setup_init --no-install
+
+ # [ -d /etc/hal/fdi/policy ] && \
diff --git a/app-misc/spacenavd/files/spacenavd-0.5-no-x11.patch b/app-misc/spacenavd/files/spacenavd-0.5-no-x11.patch
new file mode 100644
index 0000000..bbdd7d6
--- /dev/null
+++ b/app-misc/spacenavd/files/spacenavd-0.5-no-x11.patch
@@ -0,0 +1,13 @@
+diff -Npur spacenavd-0.5.old/src/event.c spacenavd-0.5/src/event.c
+--- src/event.c 2012-03-21 22:15:37.093401293 +0100
++++ src/event.c 2012-03-21 22:14:10.734401301 +0100
+@@ -20,7 +20,9 @@ along with this program. If not, see <h
+ #include <stdlib.h>
+ #include "event.h"
+ #include "client.h"
++#ifdef USE_X11
+ #include "proto_x11.h"
++#endif
+ #include "proto_unix.h"
+ #include "spnavd.h"
+
diff --git a/app-misc/spacenavd/files/spnavd b/app-misc/spacenavd/files/spnavd
new file mode 100644
index 0000000..383a2ad
--- /dev/null
+++ b/app-misc/spacenavd/files/spnavd
@@ -0,0 +1,27 @@
+#!/sbin/runscript
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License, v2 or later
+
+depend() {
+ need localmount
+ after bootmisc
+}
+
+start() {
+ ebegin "Starting Spacenav system daemon"
+
+ start-stop-daemon --start --pidfile /var/run/spnavd.pid --exec /usr/bin/spacenavd
+ eend $?
+}
+
+stop() {
+ local retval
+
+ ebegin "Stopping Spacenav system daemon"
+
+ start-stop-daemon --stop --pidfile /var/run/spnavd.pid
+ retval=$?
+
+ eend ${retval}
+ return ${retval}
+}
diff --git a/app-misc/spacenavd/files/spnavd.service b/app-misc/spacenavd/files/spnavd.service
new file mode 100644
index 0000000..e399ec6
--- /dev/null
+++ b/app-misc/spacenavd/files/spnavd.service
@@ -0,0 +1,13 @@
+[Unit]
+Description=3Dconnexion Input Devices Userspace Driver
+After=syslog.target
+StopWhenUnneeded=true
+
+[Service]
+Type=forking
+PIDFile=/var/run/spnavd.pid
+ExecStart=/usr/bin/spacenavd
+StandardError=syslog
+
+[Install]
+WantedBy=multi-user.target
diff --git a/app-misc/spacenavd/metadata.xml b/app-misc/spacenavd/metadata.xml
new file mode 100644
index 0000000..07f8545
--- /dev/null
+++ b/app-misc/spacenavd/metadata.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>proxy-maintainers</herd>
+ <maintainer>
+ <email>anthoine.bourgeois@gmail.com</email>
+ <name>Anthoine Bourgeois</name>
+ </maintainer>
+ <maintainer>
+ <email>sping@gentoo.org</email>
+ <name>Sebastian Pipping</name>
+ </maintainer>
+ <longdescription>
+ The spacenavd daemon can be used directly as a drop-in replacement
+ to the 3DxWare daemon. It can communicate with the official magellan
+ SDK, and thus any program compiled with it can work with spacenavd
+ transparently without any change or need of recompilation.
+ Also, spacenavd provides an alternative communication protocol, for
+ programs that use libspnav, that doesn't require an X server, as the
+ original protocol does.
+ </longdescription>
+</pkgmetadata>
diff --git a/app-misc/spacenavd/spacenavd-0.5-r5.ebuild b/app-misc/spacenavd/spacenavd-0.5-r5.ebuild
new file mode 100644
index 0000000..937bdc1
--- /dev/null
+++ b/app-misc/spacenavd/spacenavd-0.5-r5.ebuild
@@ -0,0 +1,79 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-misc/spacenavd/spacenavd-0.5-r4.ebuild,v 1.6 2013/02/12 16:51:06 ago Exp $
+
+EAPI="4"
+
+inherit eutils linux-info toolchain-funcs udev systemd
+
+MY_PN='spacenav'
+DESCRIPTION="The spacenavd daemon provides free alternative to the 3dxserv daemon."
+HOMEPAGE="http://spacenav.sourceforge.net/"
+SRC_URI="mirror://sourceforge/project/${MY_PN}/${MY_PN}%20daemon/${PN}%20${PV}/${P}.tar.gz"
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="amd64 ppc64 x86"
+IUSE="X"
+
+RDEPEND="X? ( x11-apps/xdpyinfo )"
+DEPEND="${RDEPEND}"
+
+pkg_setup() {
+ CONFIG_CHECK="~INPUT_EVDEV"
+ ERROR_CFG="Your kernel needs INPUT_EVDEV for the spacenavd to work properly"
+ check_extra_config
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-destdir.patch
+ epatch "${FILESDIR}"/${P}-custom-flags.patch
+ epatch "${FILESDIR}"/${P}-no-x11.patch
+}
+
+src_configure() {
+ econf \
+ --enable-opt --enable-ldopt \
+ $(use_enable X x11)
+}
+
+src_compile() {
+ emake CC="$(tc-getCC)"
+}
+
+src_install() {
+ # Config file
+ insinto /etc
+ newins "${S}/doc/example-spnavrc" spnavrc.sample
+
+ if ! systemd_is_booted; then
+ udev_newrules "${FILESDIR}"/99-space-navigator.rules 99-space-navigator.rules
+ newinitd "${FILESDIR}/spnavd" spacenavd
+ else
+ udev_newrules "${FILESDIR}"/99-space-navigator.rules.systemd 99-space-navigator.rules
+ systemd_newunit "${FILESDIR}"/spnavd.service "${PN}.service"
+ fi
+
+ # Daemon
+ dobin "${S}/spacenavd"
+ use X && dobin "${S}/spnavd_ctl"
+}
+
+pkg_postinst() {
+ if ! systemd_is_booted; then
+ elog "To start the Spacenav daemon system-wide by default"
+ elog "you should add it to the default runlevel :"
+ elog "\`rc-update add spacenavd default\`"
+ elog
+ fi
+ if use X; then
+ elog "To start generating Spacenav X events by default"
+ elog "you should add this command in your user startup"
+ elog "scripts such as .gnomerc or .xinitrc :"
+ elog "\`spnavd_ctl x11 start\`"
+ elog
+ fi
+ if ! systemd_is_booted; then
+ ewarn "You must restart spnavd \`/etc/init.d/spacenavd restart\` to run"
+ ewarn "the new version of the daemon."
+ fi
+}