/[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 565729 - (hide annotations) (download)
Wed Jan 8 23:35:55 2014 UTC (10 years, 3 months ago) by akien
Original Path: cauldron/bumblebee/current/SPECS/bumblebee.spec
File size: 4289 byte(s)
- Update to upstream 3.2.1: https://raw.github.com/Bumblebee-Project/Bumblebee/master/doc/RELEASE_NOTES_3_2_1
- Changelog for 3.1: https://raw.github.com/Bumblebee-Project/Bumblebee/master/doc/RELEASE_NOTES_3_2
- Changelog for 3.2: https://raw.github.com/Bumblebee-Project/Bumblebee/master/doc/RELEASE_NOTES_3_1

1 shlomif 265469 # Use nouveau driver by default
2     %bcond_with nvidia
3 shlomif 261203
4     Name: bumblebee
5     Summary: Support for NVidia Optimus laptops on Linux
6     Group: System/Kernel and hardware
7 akien 565729 Version: 3.2.1
8     Release: %mkrel 3
9 akien 565728 License: GPLv3+
10 shlomif 261203 URL: https://github.com/Bumblebee-Project/bumblebee
11     # source from git repo git://github.com/Bumblebee-Project/Bumblebee.git
12 akien 565728 Source0: https://github.com/downloads/Bumblebee-Project/Bumblebee/%{name}-%{version}.tar.gz
13 shlomif 261203 BuildRequires: pkgconfig(x11)
14     BuildRequires: pkgconfig(glib-2.0)
15     BuildRequires: pkgconfig(libbsd)
16     BuildRequires: help2man
17     Requires(pre): update-alternatives
18     Requires(post): systemd-units
19     Requires(preun):systemd-units
20     Requires(pre): rpm-helper
21     Requires: virtualgl
22 shlomif 288592 Requires: %mklibname virtualgl
23 akien 565729 # Suggests: primus
24 shlomif 261203 %if %{with nvidia}
25 tmb 262387 Suggests: x11-driver-video-nvidia-current
26 shlomif 261203 %else
27     Requires: x11-driver-video-nouveau
28     %endif
29     Requires: kmod(bbswitch)
30 akien 565728 # Seems broken with current kernels (maybe not needed anymore?)
31 akien 565729 # Requires: kmod(acpi_call)
32 shlomif 261203
33     %description
34     Bumblebee daemon is a rewrite of the original Bumblebee service, providing
35     an elegant and stable means of managing Optimus hybrid graphics chip sets.
36     A primary goal of this project is to not only enable use of the discrete
37     GPU for rendering, but also to enable smart power management of the dGPU
38     when it's not in use.
39    
40     %files
41 akien 565729 %doc README.markdown doc/RELEASE_NOTES_3_2_1
42 shlomif 261203 %{_sysconfdir}/bash_completion.d/bumblebee
43     %dir %{_sysconfdir}/bumblebee/
44     %config(noreplace) %{_sysconfdir}/bumblebee/bumblebee.conf
45 akien 565729 %config(noreplace) %{_sysconfdir}/bumblebee/xorg.conf.d/10-dummy.conf
46 shlomif 261203 %config(noreplace) %{_sysconfdir}/bumblebee/xorg.conf.nouveau
47     %config(noreplace) %{_sysconfdir}/bumblebee/xorg.conf.nvidia
48 akien 565729 /lib/udev/rules.d/99-bumblebee-nvidia-dev.rules
49 shlomif 261203 /lib/systemd/system/bumblebeed.service
50     %{_sbindir}/bumblebeed
51     %{_bindir}/optirun
52     %{_bindir}/bumblebee-bugreport
53     %{_mandir}/man1/bumblebeed.1.*
54     %{_mandir}/man1/optirun.1.*
55    
56     %pre
57     %_pre_groupadd %{name}
58 shlomif 265738 if [ "$1" -eq "1" ];then
59     users=$(getent passwd | awk -F: '$3 >= 500 && $3 < 60000 {print $1}')
60     for user in $users; do
61 shlomif 261203 gpasswd -a $user bumblebee
62 shlomif 265738 done
63 shlomif 261203 /usr/sbin/update-alternatives --set gl_conf %{_sysconfdir}/ld.so.conf.d/GL/standard.conf
64     fi
65    
66     %post
67     %_post_service bumblebeed
68     # Simple: still needs this since in release 3 services were not set
69     # enabled and seams that still isnt properly handeled in %%_post_service
70 shlomif 265738 if [ "$1" -ge "1" ]; then
71 shlomif 261203 # Enable (but don't start) the unit by default
72     /bin/systemctl enable bumblebeed.service
73     # Start bumblebeed service
74     /bin/systemctl start bumblebeed.service
75     fi
76    
77     %preun
78     %_preun_service bumblebeed
79    
80     %postun
81     # We need this since "%%_postun_groupdel %%{name}" doesnt remove the group if
82     # set to a user
83 shlomif 265738 if [ "$1" -eq "0" ];then
84     /usr/sbin/groupdel bumblebee
85     fi
86 shlomif 261203
87 akien 565728 # Simple: we need to ensure bumblebee group isn't removed when upgrading
88 shlomif 265765 # This doesnt need exist for Mageia 2
89     %triggerpostun -- %{name} < 3.0-9
90     %_pre_groupadd %{name}
91     users=$(getent passwd | awk -F: '$3 >= 500 && $3 < 60000 {print $1}')
92     for user in $users; do
93     gpasswd -a $user bumblebee
94     done
95    
96 shlomif 261203 #--------------------------------------------------------------------
97     %prep
98 akien 565728 %setup -q
99 shlomif 261203
100     %build
101     %configure2_5x \
102     %if %{with nvidia}
103     CONF_DRIVER=nvidia \
104 shlomif 265607 CONF_DRIVER_MODULE_NVIDIA=nvidia-current \
105 shlomif 265469 %else
106 shlomif 265607 CONF_DRIVER=nouveau \
107 shlomif 261203 %endif
108     %ifarch x86_64
109     CONF_LDPATH_NVIDIA=%{_usr}/lib/nvidia-current:%{_libdir}/nvidia-current \
110     CONF_MODPATH_NVIDIA=%{_usr}/lib/nvidia-current/xorg,%{_libdir}/nvidia-current/xorg,%{_usr}/lib/xorg/modules,%{_libdir}/xorg/modules,%{_usr}/lib/xorg/extra-modules,%{_usr}/xorg/extra-modules
111 akien 565729 # CONF_MODPATH_NVIDIA=%%{_usr}/lib/nvidia-current/xorg,%%{_libdir}/nvidia-current/xorg,%%{_usr}/lib/xorg/modules,%%{_libdir}/xorg/modules,%%{_usr}/lib/xorg/extra-modules,%%{_usr}/xorg/extra-modules \
112     # CONF_PRIMUS_LD_PATH=%%{_usr}/lib/primus:%%{_libdir}/primus
113 shlomif 261203 %else
114     CONF_LDPATH_NVIDIA=%{_usr}/lib/nvidia-current \
115     CONF_MODPATH_NVIDIA=%{_usr}/lib/nvidia-current/xorg,%{_usr}/lib/xorg/modules,%{_usr}/lib/xorg/extra-modules
116 akien 565729 # CONF_MODPATH_NVIDIA=%%{_usr}/lib/nvidia-current/xorg,%%{_usr}/lib/xorg/modules,%%{_usr}/lib/xorg/extra-modules \
117     # CONF_PRIMUS_LD_PATH=%%{_usr}/lib/primus
118 shlomif 261203 %endif
119    
120 akien 565728 %make CFLAGS="%{optflags}"
121 shlomif 261203
122     %install
123     %makeinstall_std
124    
125     install -D -m644 scripts/systemd/bumblebeed.service %{buildroot}/lib/systemd/system/bumblebeed.service

  ViewVC Help
Powered by ViewVC 1.1.30