/[packages]/backports/4/bumblebee/current/SPECS/bumblebee.spec
ViewVC logotype

Annotation of /backports/4/bumblebee/current/SPECS/bumblebee.spec

Parent Directory Parent Directory | Revision Log Revision Log


Revision 584592 - (hide annotations) (download)
Thu Feb 6 15:01:30 2014 UTC (10 years, 2 months ago) by akien
Original Path: cauldron/bumblebee/current/SPECS/bumblebee.spec
File size: 4082 byte(s)
Remove %triggerpostun needed only for bumblebee < 3.0-9 (never submitted to a stable mga release)
1 shlomif 265469 # Use nouveau driver by default
2 akien 584591 %bcond_with nvidia
3 shlomif 261203
4 akien 584591 Name: bumblebee
5     Summary: Support for NVIDIA Optimus laptops on Linux
6     Group: System/Kernel and hardware
7     Version: 3.2.1
8     Release: %mkrel 3
9     License: GPLv3+
10     URL: https://github.com/Bumblebee-Project/bumblebee
11 shlomif 261203 # source from git repo git://github.com/Bumblebee-Project/Bumblebee.git
12 akien 584591 Source0: https://github.com/downloads/Bumblebee-Project/Bumblebee/%{name}-%{version}.tar.gz
13     BuildRequires: pkgconfig(x11)
14     BuildRequires: pkgconfig(glib-2.0)
15     BuildRequires: pkgconfig(libbsd)
16     BuildRequires: help2man
17     Requires(pre): rpm-helper
18     Requires(pre): update-alternatives
19     Requires(post): systemd-units
20 shlomif 261203 Requires(preun):systemd-units
21 akien 584591 Requires: virtualgl
22     Requires: %mklibname virtualgl
23     # Suggests: primus
24 shlomif 261203 %if %{with nvidia}
25 akien 584591 Suggests: x11-driver-video-nvidia-current
26 shlomif 261203 %else
27 akien 584591 Requires: x11-driver-video-nouveau
28 shlomif 261203 %endif
29 akien 584591 Requires: kmod(bbswitch)
30 akien 565728 # Seems broken with current kernels (maybe not needed anymore?)
31 akien 584591 # Requires: kmod(acpi_call)
32 shlomif 261203
33     %description
34 akien 584591 Bumblebee is an effort to make NVIDIA Optimus enabled laptops work in
35     GNU/Linux systems. These laptops are built in such a way that the NVIDIA
36     graphics card can be used on demand so that battery life is improved and
37     temperature is kept low.
38 shlomif 261203
39 akien 584591 It disables the discrete graphics card if no client is detected, and start
40     an X server making use of NVIDIA card if requested then let software GL
41     implementations (such as VirtualGL or primus) copy frames to the visible
42     display that runs on the intergrated graphics. The ability to use discrete
43     graphics depends on the driver: open source nouveau and proprietary nvidia.
44    
45 shlomif 261203 %files
46 akien 565729 %doc README.markdown doc/RELEASE_NOTES_3_2_1
47 shlomif 261203 %{_sysconfdir}/bash_completion.d/bumblebee
48     %dir %{_sysconfdir}/bumblebee/
49     %config(noreplace) %{_sysconfdir}/bumblebee/bumblebee.conf
50 akien 565729 %config(noreplace) %{_sysconfdir}/bumblebee/xorg.conf.d/10-dummy.conf
51 shlomif 261203 %config(noreplace) %{_sysconfdir}/bumblebee/xorg.conf.nouveau
52     %config(noreplace) %{_sysconfdir}/bumblebee/xorg.conf.nvidia
53 akien 565729 /lib/udev/rules.d/99-bumblebee-nvidia-dev.rules
54 shlomif 261203 /lib/systemd/system/bumblebeed.service
55     %{_sbindir}/bumblebeed
56     %{_bindir}/optirun
57     %{_bindir}/bumblebee-bugreport
58     %{_mandir}/man1/bumblebeed.1.*
59     %{_mandir}/man1/optirun.1.*
60    
61     %pre
62     %_pre_groupadd %{name}
63 shlomif 265738 if [ "$1" -eq "1" ];then
64     users=$(getent passwd | awk -F: '$3 >= 500 && $3 < 60000 {print $1}')
65     for user in $users; do
66 shlomif 261203 gpasswd -a $user bumblebee
67 shlomif 265738 done
68 shlomif 261203 /usr/sbin/update-alternatives --set gl_conf %{_sysconfdir}/ld.so.conf.d/GL/standard.conf
69     fi
70    
71     %post
72     %_post_service bumblebeed
73     # Simple: still needs this since in release 3 services were not set
74     # enabled and seams that still isnt properly handeled in %%_post_service
75 shlomif 265738 if [ "$1" -ge "1" ]; then
76 shlomif 261203 # Enable (but don't start) the unit by default
77     /bin/systemctl enable bumblebeed.service
78     # Start bumblebeed service
79     /bin/systemctl start bumblebeed.service
80     fi
81    
82     %preun
83     %_preun_service bumblebeed
84    
85     %postun
86     # We need this since "%%_postun_groupdel %%{name}" doesnt remove the group if
87     # set to a user
88 shlomif 265738 if [ "$1" -eq "0" ];then
89     /usr/sbin/groupdel bumblebee
90     fi
91 shlomif 261203
92     #--------------------------------------------------------------------
93     %prep
94 akien 565728 %setup -q
95 shlomif 261203
96     %build
97     %configure2_5x \
98     %if %{with nvidia}
99     CONF_DRIVER=nvidia \
100 shlomif 265607 CONF_DRIVER_MODULE_NVIDIA=nvidia-current \
101 shlomif 265469 %else
102 shlomif 265607 CONF_DRIVER=nouveau \
103 shlomif 261203 %endif
104     %ifarch x86_64
105     CONF_LDPATH_NVIDIA=%{_usr}/lib/nvidia-current:%{_libdir}/nvidia-current \
106 akien 584591 CONF_MODPATH_NVIDIA=%{_usr}/lib/nvidia-current/xorg,%{_libdir}/nvidia-current/xorg,%{_usr}/lib/xorg/modules,%{_libdir}/xorg/modules,%{_usr}/lib/xorg/extra-modules,%{_libdir}/xorg/extra-modules
107 akien 565729 # CONF_PRIMUS_LD_PATH=%%{_usr}/lib/primus:%%{_libdir}/primus
108 shlomif 261203 %else
109 akien 584591 CONF_LDPATH_NVIDIA=%{_libdir}/nvidia-current \
110     CONF_MODPATH_NVIDIA=%{_libdir}/nvidia-current/xorg,%{_libdir}/xorg/modules,%{_libdir}/xorg/extra-modules
111     # CONF_PRIMUS_LD_PATH=%%{_libdir}/primus
112 shlomif 261203 %endif
113    
114 akien 565728 %make CFLAGS="%{optflags}"
115 shlomif 261203
116     %install
117     %makeinstall_std
118    
119     install -D -m644 scripts/systemd/bumblebeed.service %{buildroot}/lib/systemd/system/bumblebeed.service

  ViewVC Help
Powered by ViewVC 1.1.30