diff options
author | Nicolás Reynolds <fauno@endefensadelsl.org> | 2014-02-18 01:56:34 +0000 |
---|---|---|
committer | Nicolás Reynolds <fauno@endefensadelsl.org> | 2014-02-18 01:56:34 +0000 |
commit | 8185891e28635bdb83fdf4ba4391030912dae596 (patch) | |
tree | 66a946535bdd228514750233b2cc99dd1866ff64 /libre/bumblebee-libre/PKGBUILD | |
parent | 60a11f87366fdfbd114cdc91ff813518858e5f8d (diff) |
Tue Feb 18 01:56:27 UTC 2014
Diffstat (limited to 'libre/bumblebee-libre/PKGBUILD')
-rw-r--r-- | libre/bumblebee-libre/PKGBUILD | 68 |
1 files changed, 68 insertions, 0 deletions
diff --git a/libre/bumblebee-libre/PKGBUILD b/libre/bumblebee-libre/PKGBUILD new file mode 100644 index 000000000..4bebcc704 --- /dev/null +++ b/libre/bumblebee-libre/PKGBUILD @@ -0,0 +1,68 @@ +# Maintainer: Sven-Hendrik Haase <sh@lutzhaase.com> +# Maintainer (Parabola): André Silva <emulatorman@parabola.nu> + +_pkgname=bumblebee +pkgname=bumblebee-libre +pkgver=3.2.1 +pkgrel=3 +pkgdesc="NVIDIA Optimus support for GNU/Linux through VirtualGL, without nonfree nvidia driver support" +arch=('i686' 'x86_64') +depends=('virtualgl' 'glib2' 'mesa-libgl') +makedepends=('help2man') +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' 'nvidia-libgl') +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" + 'libre.patch') +md5sums=('30974e677bb13e8a3825fd6f3e7d3b24' + '1daed1e00f74538add6c435dfa0569d1') + +prepare() { + cd "${srcdir}/${_pkgname}-${pkgver}" + + # Remove nonfree references to nonfree nvidia driver and unnecessaries files + rm -rv "README.markdown" + rm -rv "conf/"{99-bumblebee-nvidia-dev.rules,xorg.conf.nvidia} + rm -rv "doc" + rm -rv "scripts/bumblebee-bugreport.in" + patch -Np1 -i "${srcdir}/libre.patch" +} + +build() { + cd "${srcdir}/${_pkgname}-${pkgver}" + + ./configure \ + CONF_DRIVER=nouveau \ + --prefix=/usr \ + --sbindir=/usr/bin \ + --sysconfdir=/etc \ + --without-pidfile + + 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" + sed -i "s/sbin/bin/" "${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" +} |