SHA256
1
0
forked from pool/spacenavd
Files
spacenavd/spacenavd.spec
Cristian Rodríguez b2bfd7b8b1 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
2013-09-13 22:51:08 +00:00

101 lines
2.7 KiB
RPMSpec

#
# 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