diff --git a/rpm-spec/nvidia-xrun.spec b/rpm-spec/nvidia-xrun.spec index 43b3551..6672023 100644 --- a/rpm-spec/nvidia-xrun.spec +++ b/rpm-spec/nvidia-xrun.spec @@ -1,34 +1,37 @@ -%define nvidia_xrun_pm_version 0.3.2 +%define version 0.3.2 Name: nvidia-xrun-pm -Version: %{nvidia_xrun_pm_version} -Release: 1%{?dist} +Version: %{version} +Release: 2%{?dist} Summary: Utility to run separate X with discrete nvidia graphics with full performance. License: GNU GPLv2 buildroot: %{_tmppath}/%{name}-root BuildArch: noarch Conflicts: nvidia-xrun -# The "systemd" package is required for the %{_unitdir} macro. -BuildRequires: git systemd +# This forces the remote source code to be downloaded during the rpmbuild. +# It is ignored on Fedora COPR. A source RPM must be built elsewhere +# before being uploaded to be built as a binary RPM. +%undefine _disable_source_fetch +Source0: https://github.com/michelesr/nvidia-xrun-pm/archive/%{version}.tar.gz +# The "systemd" package is required for the "_unitdir" macro. +BuildRequires: systemd %description This fork provides the benefits of nvidia-xrun without the extra dependency of bumblebee for power management. 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. -%build -rm -rf nvidia-xrun-pm -# SSL verification is turned off to temporarily workaround openSUSE Leap build issues on COPR. -git -c http.sslVerify=false clone --depth 1 --single-branch --branch %{nvidia_xrun_pm_version}\ - https://github.com/michelesr/nvidia-xrun-pm.git +%prep +# Extract the source tarball to ~/rpmbuild/BUILD/. +%setup -q %install mkdir -p %{buildroot}/%{_bindir} -install -pm 755 nvidia-xrun-pm/nvidia-xrun %{buildroot}/%{_bindir} +install -pm 755 %{_builddir}/nvidia-xrun-pm-%{version}/nvidia-xrun %{buildroot}/%{_bindir} mkdir -p %{buildroot}/%{_sysconfdir}/X11/xinit/ -install -pm 644 nvidia-xrun-pm/nvidia-xorg.conf %{buildroot}/%{_sysconfdir}/X11/ -install -pm 755 nvidia-xrun-pm/nvidia-xinitrc %{buildroot}/%{_sysconfdir}/X11/xinit/ +install -pm 644 %{_builddir}/nvidia-xrun-pm-%{version}/nvidia-xorg.conf %{buildroot}/%{_sysconfdir}/X11/ +install -pm 755 %{_builddir}/nvidia-xrun-pm-%{version}/nvidia-xinitrc %{buildroot}/%{_sysconfdir}/X11/xinit/ mkdir -p %{buildroot}/%{_sysconfdir}/default -install -pm 644 nvidia-xrun-pm/config/nvidia-xrun %{buildroot}/%{_sysconfdir}/default/ +install -pm 644 %{_builddir}/nvidia-xrun-pm-%{version}/config/nvidia-xrun %{buildroot}/%{_sysconfdir}/default/ mkdir -p %{buildroot}/%{_unitdir}/ -install -pm 644 nvidia-xrun-pm/nvidia-xrun-pm.service %{buildroot}/%{_unitdir}/ +install -pm 644 %{_builddir}/nvidia-xrun-pm-%{version}/nvidia-xrun-pm.service %{buildroot}/%{_unitdir}/ %files %{_bindir}/nvidia-xrun @@ -39,6 +42,9 @@ install -pm 644 nvidia-xrun-pm/nvidia-xrun-pm.service %{buildroot}/%{_unitdir}/ %{_unitdir}/nvidia-xrun-pm.service %changelog +* Thu Apr 25 2019 Luke Short 0.3.2-2 +- Use GitHub release tarballs instead of a git clone + * Wed Apr 24 2019 Luke Short 0.3.2-1 - Use the git version tag for the RPM - Add the new default nvidia-xrun configuration file