SHA256
1
0
forked from pool/spacenavd

Accepting request 198201 from home:hgraeber

Daemon needed for the use of spcacenavigator and other devices from 3Dconnexion. The client library libspnav is already part of openSUSE since 12.3. Its devel project is KDE:Distro:Factory and should be moved into the hardware repository, too.

OBS-URL: https://build.opensuse.org/request/show/198201
OBS-URL: https://build.opensuse.org/package/show/hardware/spacenavd?expand=0&rev=1
This commit is contained in:
Cristian Rodríguez 2013-09-13 22:51:08 +00:00 committed by Git OBS Bridge
commit b2bfd7b8b1
9 changed files with 294 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
.osc

103
init-spacenavd Normal file
View File

@ -0,0 +1,103 @@
#!/bin/sh
#
# /etc/init.d/spacenavd
# and its symbolic link
# /usr/sbin/rcspacenavd
#
### BEGIN INIT INFO
# Provides: spacenavd
# Required-Start: $syslog $remote_fs
# Should-Start:
# Required-Stop: $syslog $remote_fs
# Should-Stop:
# Default-Start: 3 5
# Default-Stop: 0 1 2 6
# Short-Description: spacenavd daemon for 3d connexion devices
# Description: Start spacenavd to control 3d connexion devices
### END INIT INFO
#
# Check for missing binaries (stale symlinks should not happen)
# Note: Special treatment of stop for LSB conformance
SPACENAVD_BIN=/usr/sbin/spacenavd
test -x $SPACENAVD_BIN || { echo "$SPACENAVD_BIN not installed";
if [ "$1" = "stop" ]; then exit 0;
else exit 5; fi; }
# Check for existence of needed config file and read it
#SPACENAVD_CONFIG=/etc/sysconfig/spacenavd
#test -r $SPACENAVD_CONFIG || { echo "$SPACENAVD_CONFIG not existing";
# if [ "$1" = "stop" ]; then exit 0;
# else exit 6; fi; }
# Read config
#. $SPACENAVD_CONFIG
. /etc/rc.status
# Reset status of this service
rc_reset
case "$1" in
start)
echo -n "Starting spacenavd"
/sbin/startproc $SPACENAVD_BIN
# Remember status and be verbose
rc_status -v
;;
stop)
echo -n "Shutting down spacenavd"
/sbin/killproc -TERM $SPACENAVD_BIN
# Remember status and be verbose
rc_status -v
;;
try-restart|condrestart)
if test "$1" = "condrestart"; then
echo "${attn} Use try-restart ${done}(LSB)${attn} rather than condrestart ${warn}(RH)${norm}"
fi
$0 status
if test $? = 0; then
$0 restart
else
rc_reset # Not running is not a failure.
fi
# Remember status and be quiet
rc_status
;;
restart)
$0 stop
$0 start
# Remember status and be quiet
rc_status
;;
force-reload)
echo -n "Reload service spacenavd"
## if it supports it:
/sbin/killproc -HUP $SPACENAVD_BIN
touch /var/run/spnavd.pid
rc_status -v
;;
reload)
# If it supports signaling:
echo -n "Reload service spacenavd"
/sbin/killproc -HUP $SPACENAVD_BIN
touch /var/run/spnavd.pid
rc_status -v
;;
status)
echo -n "Checking for service spacenavd"
/sbin/checkproc $SPACENAVD_BIN
rc_status -v
;;
probe)
test /etc/spnavrc -nt /var/run/spnavd.pid && echo reload
;;
*)
echo "Usage: $0 {start|stop|status|try-restart|restart|force-reload|reload|probe}"
exit 1
;;
esac
rc_exit

3
spacenavd-0.5.tar.bz2 Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:b172eb02d53965bf2704580c562a48ec273e4d792fafe3303352a570b5b62d24
size 36811

27
spacenavd.changes Normal file
View File

@ -0,0 +1,27 @@
-------------------------------------------------------------------
Sun Sep 8 13:59:19 UTC 2013 - herbert@graeber-clan.de
- Change license into SPDX format
- Add systemd support
- Spec file cleanup
-------------------------------------------------------------------
Mon Jan 24 19:49:46 UTC 2011 - herbert@graeber-clan.de
- Update to version 0.5
- Use separate changes file
-------------------------------------------------------------------
Sun Mar 22 00:00:00 UTC 2009 - herbert@graeber-clan.de
- Added rcspacenavd link
- Fixed xinitrc script
-------------------------------------------------------------------
Sat Mar 21 00:00:00 UTC 2009 - herbert@graeber-clan.de
- Initial package
- Add new init-script
- Add commented configuration file
- Add xinitrc script

11
spacenavd.service Normal file
View File

@ -0,0 +1,11 @@
[Unit]
Description=Userspace Daemon of the spacenav driver.
[Service]
Type=forking
PIDFile=/var/run/spnavd.pid
ExecStart=/usr/sbin/spacenavd
StandardError=syslog
[Install]
WantedBy=multi-user.target

100
spacenavd.spec Normal file
View File

@ -0,0 +1,100 @@
#
# spec file for package spacenavd
#
# Copyright (c) 2009,2011,2013 Herbert Graeber
#
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
# norootforbuild
Name: spacenavd
Version: 0.5
Release: 0
Summary: Daemon for 3D connexion devices
Group: Hardware/Other
License: GPL-3.0+
URL: http://spacenav.sourceforge.net
Source: %{name}-%{version}.tar.bz2
Source1: init-%{name}
Source2: spnavrc
Source3: xinitrc-%{name}
SOurce4: %{name}.service
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: xorg-x11
BuildRequires: xorg-x11-devel
%if 0%{?suse_version} > 1140
BuildRequires: pkgconfig(systemd)
%{?systemd_requires}
%define has_systemd 1
%endif
%description
Spacenavd is a free software replacement user-space driver (daemon), for
3Dconnexion's space-something 6dof input devices. It's compatible with the
original 3dxsrv proprietary daemon provided by 3Dconnexion, and works perfectly
with any program that was written foSpacenavd, is a free software replacement
user-space driver (daemon), for 3Dconnexion's space-something 6dof input devices.
It's compatible with the original 3dxsrv proprietary daemon provided by 3Dconnexion,
and works perfectly with any program that was written for the 3Dconnexion driver.
For more info on the spacenav project, visit: http://spacenav.sourceforge.net
%prep
%setup -q
%build
%configure
%__make opt="$RPM_OPT_FLAGS"
%install
install -D -m 755 %{name} %{buildroot}%{_sbindir}/%{name}
install -D -m 755 spnavd_ctl %{buildroot}%{_bindir}/spnavd_ctl
install -D -m 755 %{SOURCE1} %{buildroot}%{_sysconfdir}/init.d/%{name}
install -D -m 644 %{SOURCE2} %{buildroot}%{_sysconfdir}/spnavrc
install -D -m 755 %{SOURCE3} %{buildroot}%{_sysconfdir}/X11/xinit/xinitrc.d/%{name}
ln -s ../..%{_sysconfdir}/init.d/%{name} $RPM_BUILD_ROOT%{_sbindir}/rc%{name}
%if 0%{?has_systemd}
install -D -m 644 %{SOURCE4} %{buildroot}%{_unitdir}/%{name}.service
%endif
%post
%fillup_only -n %{name}
%if 0%{?has_systemd}
%service_add_post %{name}.service
%endif
%postun
%restart_on_update %{name}
%insserv_cleanup
%if 0%{?has_systemd}
%service_del_postun %{name}.service
%endif
%pre
%if 0%{?has_systemd}
%service_add_pre %{name}.service
%endif
%preun
%stop_on_removal %{name}
%if 0%{?has_systemd}
%service_del_preun %{name}.service
%endif
%files
%defattr(-,root,root)
%doc COPYING README
%{_sbindir}/%{name}
%{_sbindir}/rc%{name}
%{_bindir}/spnavd_ctl
%config(noreplace) %{_sysconfdir}/spnavrc
%{_sysconfdir}/init.d/%{name}
%if 0%{?has_systemd}
%{_unitdir}/%{name}.service
%endif
%{_sysconfdir}/X11/xinit/xinitrc.d/spacenavd
%changelog

24
spnavrc Normal file
View File

@ -0,0 +1,24 @@
#
# dead zone.
# Sensor values below this do not generate events
#
dead-zone = 2
#
# sensitivity
# Factor multiplied to senosr values
#
sensitivity = 1.0
#
# invert-rot/invert-trans
# Axes enumerated here (x, y and/or z) will be inverted
#
invert-rot =
invert-trans =
#
# led
# Specifies if the blue led should be on or of, when spacenavd is running
#
led = on

2
xinitrc-spacenavd Normal file
View File

@ -0,0 +1,2 @@
#!/bin/sh
test -f /usr/run/spacenavd.pid && /usr/sbin/spacenav_ctl x11 start