bumblebee/bumblebee.spec

138 lines
4.3 KiB
RPMSpec

%define bumblebeegroupid 65430
%define bumblebeeuserid 65430
Name: bumblebee
Version: 3.2.1
Release: 3mamba
Summary: A project aiming to support NVIDIA Optimus technology under Linux.
Group: System/Kernel and Hardware
Vendor: openmamba
Distribution: openmamba
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
URL: https://www.bumblebee-project.org/
Source: http://bumblebee-project.org/bumblebee-%{version}.tar.gz
Source1: bumblebee.conf
Patch0: bumblebee-3.2.1-0001-bb_nvidia_modeset-detection_bug699_01.patch
Patch1: bumblebee-3.2.1-0002-bb_nvidia_modeset-detection_bug699_02.patch
Patch2: bumblebee-3.2.1-0003-bb_nvidia_umv_detection_bug699.patch
Patch3: bumblebee-3.2.1-0004-bb_nvidia_drm_detection_bug699_01.patch
Patch4: bumblebee-3.2.1-0005-bb_nvidia_drm_detection_bug699_02.patch
Patch5: bumblebee-3.2.1-0006-bb_hexadicimal_bug573.patch
Patch6: bumblebee-3.2.1-0007-bb_mutebblogger.patch
Patch7: bumblebee-3.2.1-0008-libglvnd.patch
License: GPL
## AUTOBUILDREQ-BEGIN
BuildRequires: glibc-devel
BuildRequires: libX11-devel
BuildRequires: libglib-devel
## AUTOBUILDREQ-END
Requires: virtualgl
BuildRoot: %{_tmppath}/%{name}-%{version}-root
%description
A project aiming to support NVIDIA Optimus technology under Linux.
%debug_package
%prep
%setup -q
%define _default_patch_fuzz 2
%patch0 -p1 -b .0001-bb_nvidia_modeset-detection_bug699_01
%patch1 -p1 -b .0002-bb_nvidia_modeset-detection_bug699_02
%patch2 -p1 -b .0003-bb_nvidia_umv_detection_bug699
%patch3 -p1 -b .0004-bb_nvidia_drm_detection_bug699_01
%patch4 -p1 -b .0005-bb_nvidia_drm_detection_bug699_02
%patch5 -p1 -b .0006-bb_hexadicimal_bug573
%patch6 -p1 -b .0007-bb_mutebblogger
%patch7 -p1 -b .0008-libglvnd
%build
export CFLAGS="%{optflags} -fcommon"
%configure \
CONF_DRIVER_MODULE_NVIDIA=nvidia \
--with-udev-rules=%{_udevrulesdir} \
--without-pidfile
%make
%install
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%makeinstall \
completiondir=%{_datadir}/bash-completion/completions
#install -D -m0755 scripts/systemd/bumblebeed.service %{buildroot}%{_unitdir}/bumblebeed.service
install -D -m0755 %{SOURCE1} %{buildroot}%{_modprobedir}/bumblebee.conf
# Install systemd unit
install -D -m0644 scripts/systemd/bumblebeed.service %{buildroot}%{_unitdir}/bumblebeed.service
# Fixes for bash completion
mv -v %{buildroot}%{_datadir}/bash-completion/completions/{bumblebee,optirun}
sed -i "s/have/_have/" %{buildroot}%{_datadir}/bash-completion/completions/optirun
%clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%pre
if [ $1 -ge 1 ]; then
/usr/sbin/groupadd bumblebee -g %{bumblebeegroupid} 2>/dev/null
/usr/sbin/useradd -u %{bumblebeeuserid} -c 'Bumblebee user' -d /dev/null -g bumblebee \
-s /bin/false bumblebee 2>/dev/null
fi
:
%preun
%systemd_preun bumblebeed.service
if [ $1 -eq 0 ]; then
/usr/sbin/groupdel bumblebee 2>/dev/null
/usr/sbin/userdel bumblebee 2>/dev/null
fi
:
%post
%systemd_post bumblebeed.service
:
%postun
%systemd_postun bumblebeed.service
:
%files
%defattr(-,root,root)
%config(noreplace) %{_sysconfdir}/bumblebee/bumblebee.conf
%{_sysconfdir}/bumblebee/xorg.conf.d/10-dummy.conf
%{_sysconfdir}/bumblebee/xorg.conf.nouveau
%{_sysconfdir}/bumblebee/xorg.conf.nvidia
%{_bindir}/bumblebee-bugreport
%{_bindir}/optirun
%{_sbindir}/bumblebeed
%{_unitdir}/bumblebeed.service
%{_modprobedir}/bumblebee.conf
%{_udevrulesdir}/99-bumblebee-nvidia-dev.rules
%{_datadir}/bash-completion/completions/optirun
%{_datadir}/doc/bumblebee/README.markdown
%{_datadir}/doc/bumblebee/RELEASE_NOTES_*
%{_mandir}/man1/bumblebeed.1*
%{_mandir}/man1/optirun.1*
%doc COPYING
%changelog
* Tue Nov 01 2022 Silvan Calarco <silvan.calarco@mambasoft.it> 3.2.1-3mamba
- add patches and fixes
* Sat Aug 02 2014 Silvan Calarco <silvan.calarco@mambasoft.it> 3.2.1-2mamba
- provide systemd init script
* Sun Apr 28 2013 Automatic Build System <autodist@mambasoft.it> 3.2.1-1mamba
- automatic version update by autodist
* Fri Apr 26 2013 Automatic Build System <autodist@mambasoft.it> 3.2-1mamba
- automatic version update by autodist
* Thu Apr 04 2013 Automatic Build System <autodist@mambasoft.it> 3.1-1mamba
- automatic version update by autodist
* Fri Jul 27 2012 Silvan Calarco <silvan.calarco@mambasoft.it> 3.0-1mamba
- package created by autospec