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

  ViewVC Help
Powered by ViewVC 1.1.30