summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobin Lee <cheeselee@fedoraproject.org>2012-02-16 17:13:59 +0800
committerRobin Lee <cheeselee@fedoraproject.org>2012-02-16 17:13:59 +0800
commitc5d86942b0e8a8bb5fa64030e662564f6c6deb98 (patch)
tree77302031f37d19b3c916d70cddfccbb365e297f7
parent9ff6fd94875462157742a6b40512691eca2a1fd5 (diff)
downloadrpm-c5d86942b0e8a8bb5fa64030e662564f6c6deb98.tar.gz
rpm-c5d86942b0e8a8bb5fa64030e662564f6c6deb98.tar.xz
rpm-c5d86942b0e8a8bb5fa64030e662564f6c6deb98.zip
bumblebee 3.0-4
-rw-r--r--bumblebee/bumblebee.spec128
1 files changed, 58 insertions, 70 deletions
diff --git a/bumblebee/bumblebee.spec b/bumblebee/bumblebee.spec
index 92ccde7..4361206 100644
--- a/bumblebee/bumblebee.spec
+++ b/bumblebee/bumblebee.spec
@@ -1,102 +1,90 @@
-%define name bumblebee
-%define version 3.0
-%define release 3
-
-Name: %{name}
-Summary: Bumblebee - support for NVidia Optimus laptops on Linux!
-Version: %{version}
-Release: %{release}
-Source0: http://bumblebee-project.org/%{name}-%{version}.tar.gz
-Source1: bumblebee-mdv.tar.gz
-URL: http://bumblebee-project.org
-
-Group: System/Kernel and hardware
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
-License: GPLv3
-Requires: x11-driver-video-nvidia-current VirtualGL dkms-bbswitch gettext
-BuildRequires: help2man X11-devel glib2-devel gettext
-BuildRequires: %{_lib}bsd-devel >= 0.2.0
+Name: bumblebee
+Summary: Support for NVidia Optimus laptops on Linux!
+Version: 3.0
+Release: 4%{?dist}
+Source0: https://github.com/downloads/Bumblebee-Project/Bumblebee/%{name}-%{version}.tar.gz
+URL: http://bumblebee-project.org/
+
+Group: System Environment/Daemons
+License: GPLv3+
+BuildRequires: systemd-units
+BuildRequires: pkgconfig
+BuildRequires: glib2-devel
+BuildRequires: libX11-devel
+BuildRequires: libbsd-devel >= 0.2.0
+BuildRequires: help2man
+BuildRequires: gettext
+Requires(pre): shadow-utils
+Requires(post): systemd-units
+Requires(preun): systemd-units
+Requires(postun): systemd-units
+Requires: VirtualGL
+Requires: bbswitch-kmod >= 0.4.1
+Provides: bbswitch-kmod-common = 0.4.1
+
%description
-Bumblebee daemon is a rewrite of the original Bumblebee service, providing an elegant and stable means of managing Optimus hybrid graphics chipsets.
-A primary goal of this project is to not only enable use of the discrete GPU for rendering, but also to enable smart power management of the dGPU when it's not in use.
+Bumblebee daemon is a rewrite of the original Bumblebee service, providing an
+elegant and stable means of managing Optimus hybrid graphics chipsets. A
+primary goal of this project is to not only enable use of the discrete GPU for
+rendering, but also to enable smart power management of the dGPU when it's not
+in use.
%prep
-%setup -q -a1
+%setup -q
%build
-%configure CONF_DRIVER=nvidia CONF_DRIVER_MODULE_NVIDIA=nvidia-current CONF_LDPATH_NVIDIA=/usr/lib64/nvidia-current:/usr/lib/nvidia-current CONF_MODPATH_NVIDIA=/usr/lib64/nvidia-current/xorg,/usr/lib/nvidia-current/xorg,/usr/lib64/xorg/extra-modules,/usr/lib64/xorg/modules,/usr/lib/xorg/extra-modules,/usr/lib/xorg/modules
-%make
+%configure --docdir=%{_docdir}/%{name}-%{version}/
+make %{?_smp_mflags}
%install
-rm -rf %{buildroot}
-%makeinstall
-rm -f %{buildroot}/%{_datadir}/doc/bumblebee/README.markdown %{buildroot}/%{_datadir}/doc/bumblebee/RELEASE_NOTES_3_0
-mkdir -p %{buildroot}/etc/systemd/system
-cp scripts/systemd/bumblebeed.service %{buildroot}/etc/systemd/system/bumblebeed.service
-
-mv %{buildroot}/%{_bindir}/optirun %{buildroot}/%{_bindir}/optirun-bin
-install -m 0755 bumblebee-mdv/bin/bumblebee-add-groups %buildroot/%{_bindir}/bumblebee-add-groups
-install -m 0755 bumblebee-mdv/bin/optirun %buildroot/%{_bindir}/optirun
-
-mkdir -p %{buildroot}/%{_datadir}/polkit-1/actions
-cp -a bumblebee-mdv/bin/bumblebee.add-groups.policy %{buildroot}/%{_datadir}/polkit-1/actions
-
-# translations
-find bumblebee-mdv/po/* -type d | \
-while read d
-do
- lang=`basename $d`
- mkdir -p %buildroot/%_datadir/locale/$lang/LC_MESSAGES
- msgfmt -o %buildroot/%_datadir/locale/$lang/LC_MESSAGES/bumblebee-add-groups.mo $d/bumblebee-add-groups.po
-done
-
-#icons
-mkdir -p %{buildroot}/%{_iconsdir}
-cp bumblebee-mdv/bumblebee.png %{buildroot}/%{_iconsdir}
-
-%clean
-rm -rf %{buildroot}
+make install DESTDIR=%{buildroot}
+mkdir -p %{buildroot}%{_unitdir}
+cp scripts/systemd/%{name}d.service %{buildroot}%{_unitdir}
%files
-%defattr(0755,root,root)
-%doc README.markdown doc/RELEASE_NOTES_3_0
+%{_docdir}/%{name}-%{version}/
%{_sysconfdir}/bash_completion.d/bumblebee
%{_sysconfdir}/bumblebee/bumblebee.conf
%{_sysconfdir}/bumblebee/xorg.conf.nouveau
%{_sysconfdir}/bumblebee/xorg.conf.nvidia
-%{_sysconfdir}/systemd/system/bumblebeed.service
+%{_unitdir}/bumblebeed.service
%{_sbindir}/bumblebeed
%{_bindir}/optirun
-%{_bindir}/optirun-bin
-%{_bindir}/bumblebee-add-groups
%{_bindir}/bumblebee-bugreport
%{_mandir}/man1/bumblebeed.1*
%{_mandir}/man1/optirun.1*
-%{_iconsdir}/bumblebee.png
-%{_localedir}/*
-%{_datadir}/polkit-1/actions/bumblebee.add-groups.policy
%pre
# Add bumblebee group
-
- if getent group bumblebee > /dev/null
- then
- : # group already exists
- else
- groupadd -r bumblebee 2>/dev/null || :
- fi
+getent group %{name} >/dev/null || groupadd -r %{name}
+exit 0
%post
-update-alternatives --set gl_conf /etc/ld.so.conf.d/GL/standard.conf
-systemctl enable bumblebeed.service
-systemctl start bumblebeed.service
+if [ $1 -eq 1 ] ; then
+ # Initial installation
+ /bin/systemctl daemon-reload >/dev/null 2>&1 || :
+fi
+
+%preun
+if [ $1 -eq 0 ] ; then
+ # Package removal, not upgrade
+ /bin/systemctl --no-reload disable %{name}d.service > /dev/null 2>&1 || :
+ /bin/systemctl stop %{name}d.service > /dev/null 2>&1 || :
+fi
%postun
-groupdel bumblebee
+/bin/systemctl daemon-reload >/dev/null 2>&1 || :
+if [ $1 -ge 1 ] ; then
+ # Package upgrade, not uninstall
+ /bin/systemctl try-restart %{name}d.service >/dev/null 2>&1 || :
+fi
%changelog
+* Thu Feb 16 2012 Robin Lee <cheeselee@fedoraproject.org> - 3.0-4
+- Deflated for Fedora
+
* Thu Feb 09 2012 Александр Казанцев <kazancas@mandriva.org> 3.0-3
+ Revision: 772318
- add gettext to requires and fix optirun call with all CL args