File nvidia-xrun.spec of Package nvidia-xrun
#
# spec file for package nvidia-xrun
#
# Copyright (c) 2020 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
Name: nvidia-xrun
Version: 1
Release: 0
Summary: Run extra X with nvidia drivers
License: GPL
Group: Development/Libraries/C and C++
URL: https://github.com/Witko/nvidia-xrun
Source0: nvidia-xrun-%{version}.tgz
Requires: bumblebee
#Patch0: allinone.patch
Requires: openbox
BuildArch: noarch
%description
These utility scripts aim to make the life easier for nvidia cards users. It started with a revelation that bumblebee in current state offers very poor performance. This solution offers a bit more complicated procedure but offers a full GPU utilization(in terms of linux drivers).
%prep
%setup -q
# %patch0 -p1
%build
# %make_build
%install
# %make_install PREFIX=%{_prefix}
mkdir -p %{buildroot}/%{_bindir}
install -pm 755 nvidia-xrun %{buildroot}/%{_bindir}
mkdir -p %{buildroot}/%{_sysconfdir}/default/
install -pm 755 config/nvidia-xrun %{buildroot}/%{_sysconfdir}/default/
mkdir -p %{buildroot}/%{_sysconfdir}/X11/xinit/
install -pm 644 nvidia-xorg.conf %{buildroot}/%{_sysconfdir}/X11/
install -pm 755 nvidia-xinitrc %{buildroot}/%{_sysconfdir}/X11/xinit/
mkdir -p %{buildroot}%{_sysconfdir}/systemd/system
install -pm 0644 nvidia-xrun-pm.service %{buildroot}%{_sysconfdir}/systemd/system
mkdir -p %{buildroot}/%{_datadir}/xsessions/
install -pm 644 launchers/nvidia-xrun-openbox.desktop %{buildroot}/%{_datadir}/xsessions/
%post
%postun
%files
%license LICENSE
%doc README.md
%{_sysconfdir}/X11/xinit
%{_sysconfdir}/systemd
%{_sysconfdir}/systemd/system
%{_bindir}/nvidia-xrun
%{_sysconfdir}/X11/nvidia-xorg.conf
%{_sysconfdir}/X11/xinit/nvidia-xinitrc
%{_sysconfdir}/systemd/system/nvidia-xrun-pm.service
%{_sysconfdir}/default/nvidia-xrun
%{_datadir}/xsessions/nvidia-xrun-openbox.desktop
%changelog