Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:MaxxedSUSE
optimus-manager
optimus-manager.spec
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File optimus-manager.spec of Package optimus-manager
# # spec file for package optimus-manager # # Copyright (c) 2023 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/ # %define realname optimus-manager %define realver 1.5 %define realext .tar.gz Name: optimus-manager Version: 1.5 Release: 1 Summary: Management utility to handle GPU switching for Optimus laptops (Git version) License: MIT URL: https://github.com/Askannz/optimus-manager Source0: https://github.com/Askannz/optimus-manager/archive/refs/tags/v%{version}.tar.gz#/%{realname}-%{realver}%{realext} Patch0: fix-python-env.patch BuildArch: noarch BuildRequires: python311 BuildRequires: python3-setuptools BuildRequires: python3-wheel BuildRequires: python3-installer BuildRequires: python3-build BuildRequires: python311-dbus-python BuildRequires: libX11-devel BuildRequires: libXrandr-devel BuildRequires: dbus-1-devel BuildRequires: dkms BuildRequires: fdupes Requires: acpid Requires: acpi Requires: bbswitch Requires: xf86-video-intel Conflicts: optimus-manager Provides: optimus-manager = %{version} %{?systemd_requires} BuildRequires: libsystemd0 Recommends: optimus-manager-qt %description Management utility to handle GPU switching for Optimus laptops (Git version). %prep %autosetup -p1 %build python3 -m build --wheel --no-isolation %install %{__mkdir_p} %{buildroot}%{_unitdir} %{__install} -D -m 644 LICENSE %{buildroot}/usr/share/licenses/%{name}/LICENSE %{__install} -D -m 644 modules/optimus-manager.conf %{buildroot}/usr/lib/modprobe.d/optimus-manager.conf cp systemd/optimus-manager.service $RPM_BUILD_ROOT%{_unitdir}/optimus-manager.service %{__install} -D -m 644 optimus-manager.conf %{buildroot}/usr/share/optimus-manager.conf %{__install} -D -m 644 systemd/logind/10-optimus-manager.conf %{buildroot}/usr/lib/systemd/logind.conf.d/10-optimus-manager.conf %{__mkdir_p} %{buildroot}/var/lib/optimus-manager/persistent %{__install} -D -m 644 var/requested_mode %{buildroot}/var/lib/optimus-manager/persistent/requested_mode %{__install} -D -m 644 var/startup_mode %{buildroot}/var/lib/optimus-manager/persistent/startup_mode %{__install} -D -m 755 systemd/suspend/optimus-manager.py %{buildroot}/usr/lib/systemd/system-sleep/optimus-manager.py %{__install} -D -m 644 login_managers/sddm/20-optimus-manager.conf %{buildroot}/etc/sddm.conf.d/20-optimus-manager.conf %{__install} -D -m 644 login_managers/lightdm/20-optimus-manager.conf %{buildroot}/etc/lightdm/lightdm.conf.d/20-optimus-manager.conf %{__install} -D -m 644 config/xorg/integrated-mode/integrated-gpu.conf %{buildroot}/etc/optimus-manager/xorg/integrated-mode/integrated-gpu.conf %{__install} -D -m 644 config/xorg/nvidia-mode/integrated-gpu.conf %{buildroot}/etc/optimus-manager/xorg/nvidia-mode/integrated-gpu.conf %{__install} -D -m 644 config/xorg/nvidia-mode/nvidia-gpu.conf %{buildroot}/etc/optimus-manager/xorg/nvidia-mode/nvidia-gpu.conf %{__install} -D -m 644 config/xorg/hybrid-mode/integrated-gpu.conf %{buildroot}/etc/optimus-manager/xorg/hybrid-mode/integrated-gpu.conf %{__install} -D -m 644 config/xorg/hybrid-mode/nvidia-gpu.conf %{buildroot}/etc/optimus-manager/xorg/hybrid-mode/nvidia-gpu.conf %{__install} -D -m 755 config/xsetup-nvidia.sh %{buildroot}/etc/optimus-manager/xsetup-nvidia.sh %{__install} -D -m 755 config/xsetup-hybrid.sh %{buildroot}/etc/optimus-manager/xsetup-hybrid.sh %{__install} -D -m 755 config/xsetup-integrated.sh %{buildroot}/etc/optimus-manager/xsetup-integrated.sh %{__install} -D -m 755 config/nvidia-enable.sh %{buildroot}/etc/optimus-manager/nvidia-enable.sh %{__install} -D -m 755 config/nvidia-disable.sh %{buildroot}/etc/optimus-manager/nvidia-disable.sh python3 -m installer --destdir=%{buildroot} dist/*.whl chmod +x %{buildroot}/usr/lib/python3.11/site-packages/optimus_manager/client/__init__.py chmod +x %{buildroot}/usr/lib/python3.11/site-packages/optimus_manager/daemon.py %fdupes %{buildroot} %pre %service_add_pre optimus-manager.service %post %service_add_post optimus-manager.service %preun %systemd_preun optimus-manager.service %postun %systemd_postun_with_restart optimus-manager.service %files %defattr(-,root,root,-) %license LICENSE %{_bindir}/optimus-manager %config /etc/sddm.conf.d/ %config /etc/lightdm/ %config /etc/optimus-manager/ %exclude /usr/lib/python3.11/site-packages/optimus_manager-1.5.dist-info/LICENSE /var/lib/optimus-manager/ /usr/bin/prime-offload /usr/bin/prime-switch /usr/lib/python3.11/site-packages/optimus_manager-1.5.dist-info/ /usr/lib/python3.11/site-packages/optimus_manager/ /usr/lib/modprobe.d/optimus-manager.conf /usr/share/optimus-manager.conf /usr/lib/systemd/logind.conf.d/ /usr/lib/systemd/system-sleep/ %{_unitdir}/%{name}.service %changelog
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor