diff options
author | root <root@rshg054.dnsready.net> | 2013-04-06 00:05:46 -0700 |
---|---|---|
committer | root <root@rshg054.dnsready.net> | 2013-04-06 00:05:46 -0700 |
commit | fd8249d016683ade99a23251d6ffdf5d5a3e76a4 (patch) | |
tree | de9e45e44e9a8ffb85bd8895dcec0ebcd34d17e3 /libre/bumblebee-libre | |
parent | 3c7a59bfd2b8340068df7dc196e0c9b612b9ef31 (diff) |
Sat Apr 6 00:05:46 PDT 2013
Diffstat (limited to 'libre/bumblebee-libre')
-rw-r--r-- | libre/bumblebee-libre/PKGBUILD | 51 | ||||
-rw-r--r-- | libre/bumblebee-libre/bumblebee.install | 16 |
2 files changed, 67 insertions, 0 deletions
diff --git a/libre/bumblebee-libre/PKGBUILD b/libre/bumblebee-libre/PKGBUILD new file mode 100644 index 000000000..833069ff2 --- /dev/null +++ b/libre/bumblebee-libre/PKGBUILD @@ -0,0 +1,51 @@ +# Maintainer: Sven-Hendrik Haase <sh@lutzhaase.com> +# Maintainer (Parabola): André Silva <emulatorman@lavabit.com> + +_pkgname=bumblebee +pkgname=bumblebee-libre +pkgver=3.1 +pkgrel=5 +pkgdesc="NVIDIA Optimus support for GNU/Linux through VirtualGL, without nonfree nvidia driver support" +arch=('i686' 'x86_64') +depends=('virtualgl' 'libbsd' 'glib2' 'mesa-libgl') +optdepends=('xf86-video-nouveau: nouveau driver' + 'nouveau-dri: 3D acceleration features of nouveau' + 'bbswitch: switch on/off discrete card' + 'primus: faster back-end for optirun') +if [ "$CARCH" = "x86_64" ]; then + optdepends[${#optdepends[@]}]='lib32-virtualgl: run 32bit applications with optirun' + optdepends[${#optdepends[@]}]='lib32-primus: faster back-end for optirun' +fi +replaces=('bumblebee') +conflicts=('bumblebee' 'nvidia-libgl') +provides=("bumblebee=$pkgver"'nvidia-libgl') +url="http://www.bumblebee-project.org" +license=("GPL3") +install='bumblebee.install' +backup=('etc/bumblebee/bumblebee.conf' + 'etc/bumblebee/xorg.conf.nouveau') +source=("http://www.bumblebee-project.org/${_pkgname}-${pkgver}.tar.gz") +md5sums=('de515ef51b1e0714c2f1b2a95f83e77e') + +build() { + cd "${srcdir}/${_pkgname}-${pkgver}" + + ./configure \ + CONF_DRIVER=nouveau \ + --prefix=/usr \ + --sysconfdir=/etc + + make +} + +package() { + cd "${srcdir}/${_pkgname}-${pkgver}" + + make install DESTDIR="$pkgdir" + + # Install systemd unit + install -D -m644 "scripts/systemd/bumblebeed.service" "${pkgdir}/usr/lib/systemd/system/bumblebeed.service" + + # Make bash_completion work + mv -v "${pkgdir}/etc/bash_completion.d/bumblebee" "${pkgdir}/etc/bash_completion.d/optirun" +} diff --git a/libre/bumblebee-libre/bumblebee.install b/libre/bumblebee-libre/bumblebee.install new file mode 100644 index 000000000..57aed6cc5 --- /dev/null +++ b/libre/bumblebee-libre/bumblebee.install @@ -0,0 +1,16 @@ +_notice() { + echo "Don't forget to add yourself to the 'bumblebee' group to use Bumblebee" +} + +post_upgrade() { + getent group "bumblebee" &>/dev/null || groupadd -r bumblebee +} + +post_remove() { + getent group "bumblebee" &>/dev/null && groupdel bumblebee 1>/dev/null +} + +post_install() { + post_upgrade + _notice +} |