SHA256
1
0
forked from pool/spacenavd
spacenavd/spacenavd.spec
2016-10-27 14:34:29 +00:00

99 lines
2.5 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.6
Release: 0
Summary: Daemon for 3D connexion devices
Group: Hardware/Other
License: GPL-3.0+
URL: http://spacenav.sourceforge.net
Source: %{name}-%{version}.tar.gz
Source2: spnavrc
Source3: xinitrc-%{name}
SOurce4: %{name}.service
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: xorg-x11
BuildRequires: xorg-x11-devel
Requires: xdpyinfo
%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 644 %{SOURCE2} %{buildroot}%{_sysconfdir}/spnavrc
install -D -m 755 %{SOURCE3} %{buildroot}%{_sysconfdir}/X11/xinit/xinitrc.d/%{name}
ln -sf service $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
%if 0%{?has_systemd}
%{_unitdir}/%{name}.service
%endif
%{_sysconfdir}/X11/xinit/xinitrc.d/spacenavd
%changelog