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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 584591 - (show annotations) (download)
Thu Feb 6 15:00:19 2014 UTC (10 years, 2 months ago) by akien
Original Path: cauldron/bumblebee/current/SPECS/bumblebee.spec
File size: 4378 byte(s)
- Replace description with Debian's
- SILENT: clean spec

1 # Use nouveau driver by default
2 %bcond_with nvidia
3
4 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 # source from git repo git://github.com/Bumblebee-Project/Bumblebee.git
12 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 Requires(preun):systemd-units
21 Requires: virtualgl
22 Requires: %mklibname virtualgl
23 # Suggests: primus
24 %if %{with nvidia}
25 Suggests: x11-driver-video-nvidia-current
26 %else
27 Requires: x11-driver-video-nouveau
28 %endif
29 Requires: kmod(bbswitch)
30 # Seems broken with current kernels (maybe not needed anymore?)
31 # Requires: kmod(acpi_call)
32
33 %description
34 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
39 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 %files
46 %doc README.markdown doc/RELEASE_NOTES_3_2_1
47 %{_sysconfdir}/bash_completion.d/bumblebee
48 %dir %{_sysconfdir}/bumblebee/
49 %config(noreplace) %{_sysconfdir}/bumblebee/bumblebee.conf
50 %config(noreplace) %{_sysconfdir}/bumblebee/xorg.conf.d/10-dummy.conf
51 %config(noreplace) %{_sysconfdir}/bumblebee/xorg.conf.nouveau
52 %config(noreplace) %{_sysconfdir}/bumblebee/xorg.conf.nvidia
53 /lib/udev/rules.d/99-bumblebee-nvidia-dev.rules
54 /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 if [ "$1" -eq "1" ];then
64 users=$(getent passwd | awk -F: '$3 >= 500 && $3 < 60000 {print $1}')
65 for user in $users; do
66 gpasswd -a $user bumblebee
67 done
68 /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 if [ "$1" -ge "1" ]; then
76 # 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 if [ "$1" -eq "0" ];then
89 /usr/sbin/groupdel bumblebee
90 fi
91
92 # Simple: we need to ensure bumblebee group isn't removed when upgrading
93 # This doesnt need exist for Mageia 2
94 %triggerpostun -- %{name} < 3.0-9
95 %_pre_groupadd %{name}
96 users=$(getent passwd | awk -F: '$3 >= 500 && $3 < 60000 {print $1}')
97 for user in $users; do
98 gpasswd -a $user bumblebee
99 done
100
101 #--------------------------------------------------------------------
102 %prep
103 %setup -q
104
105 %build
106 %configure2_5x \
107 %if %{with nvidia}
108 CONF_DRIVER=nvidia \
109 CONF_DRIVER_MODULE_NVIDIA=nvidia-current \
110 %else
111 CONF_DRIVER=nouveau \
112 %endif
113 %ifarch x86_64
114 CONF_LDPATH_NVIDIA=%{_usr}/lib/nvidia-current:%{_libdir}/nvidia-current \
115 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
116 # CONF_PRIMUS_LD_PATH=%%{_usr}/lib/primus:%%{_libdir}/primus
117 %else
118 CONF_LDPATH_NVIDIA=%{_libdir}/nvidia-current \
119 CONF_MODPATH_NVIDIA=%{_libdir}/nvidia-current/xorg,%{_libdir}/xorg/modules,%{_libdir}/xorg/extra-modules
120 # CONF_PRIMUS_LD_PATH=%%{_libdir}/primus
121 %endif
122
123 %make CFLAGS="%{optflags}"
124
125 %install
126 %makeinstall_std
127
128 install -D -m644 scripts/systemd/bumblebeed.service %{buildroot}/lib/systemd/system/bumblebeed.service

  ViewVC Help
Powered by ViewVC 1.1.30