This repository has been archived by the owner on Apr 12, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathfedora-prime.spec
53 lines (42 loc) · 1.61 KB
/
fedora-prime.spec
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
Name: fedora-prime
Version: 0.1
Release: 2%{?dist}
Summary: Provides GPU (nvidia/intel) selection for NVIDIA optimus laptops
License: GPLv2
URL: https://github.com/paltas/FedoraPrime
Source0: https://github.com/paltas/FedoraPrime/archive/master.zip
BuildArch: noarch
BuildRequires: systemd-units
Requires: akmod-nvidia
%define fedora_prime_dir %{_sysconfdir}/fedora-prime
%description
A collection of shell scripts that makes it possible to use the
NVIDIA GPU on a Optimus Laptop. The switching is similar to
the feature provided by the nvidia-prime package in Ubuntu.
However, no such package has been made for other distributions.
This is exactly the functionality this package provide.
%prep
%autosetup -n FedoraPrime-master
%install
mkdir -p %{buildroot}%{fedora_prime_dir}
install -p -m 0644 xorg.conf.template %{buildroot}%{fedora_prime_dir}/
install -p -m 0755 xinitrc.nvidia %{buildroot}%{fedora_prime_dir}/
mkdir -p %{buildroot}%{_sbindir}
install -p -m 0755 fedora-prime-select %{buildroot}%{_sbindir}/
mkdir -p %{buildroot}%{_unitdir}
install -p -m 0644 fedora-prime.service %{buildroot}%{_unitdir}/
%post
systemctl enable fedora-prime.service
%preun
systemctl disable fedora-prime.service
%files
%doc README.md LICENSE
%{fedora_prime_dir}/xinitrc.nvidia
%{fedora_prime_dir}/xorg.conf.template
%{_sbindir}/fedora-prime-select
%{_unitdir}/fedora-prime.service
%changelog
* Sat Oct 17 2015 Bo Simonsen <bo@geekworld.dk> 0.1-2
- Git master ref e9ec3d6, backing up files before switching
* Thu Apr 16 2015 Bo Simonsen <bo@geekworld.dk> 0.1-1
- Initial version