diff options
author | André Fabian Silva Delgado <emulatorman@parabola.nu> | 2014-09-04 02:04:13 -0300 |
---|---|---|
committer | André Fabian Silva Delgado <emulatorman@parabola.nu> | 2014-09-04 02:04:13 -0300 |
commit | 0a088f3c285e53ee377271f42c16071e3ee5bafd (patch) | |
tree | ee094061e4ec6cd7808201f3c75c7f343ef3ba3a /libre/bumblebee/PKGBUILD | |
parent | 0be822175bb3cef0534b9a0597e84ae1ee6374ec (diff) | |
parent | 035f2fd609cd247ac0430f15cad3af94ce79f5f8 (diff) | |
download | abslibre-0a088f3c285e53ee377271f42c16071e3ee5bafd.tar.gz abslibre-0a088f3c285e53ee377271f42c16071e3ee5bafd.tar.bz2 abslibre-0a088f3c285e53ee377271f42c16071e3ee5bafd.zip |
Merge branch 'master' of ssh://lukeshu.com:1863/srv/git/mirror/parabola/abslibre
Diffstat (limited to 'libre/bumblebee/PKGBUILD')
-rw-r--r-- | libre/bumblebee/PKGBUILD | 67 |
1 files changed, 67 insertions, 0 deletions
diff --git a/libre/bumblebee/PKGBUILD b/libre/bumblebee/PKGBUILD new file mode 100644 index 000000000..964fcf020 --- /dev/null +++ b/libre/bumblebee/PKGBUILD @@ -0,0 +1,67 @@ +# Maintainer (Arch): Sven-Hendrik Haase <sh@lutzhaase.com> +# Maintainer: André Silva <emulatorman@parabola.nu> + +pkgname=bumblebee +pkgver=3.2.1 +pkgrel=3.parabola1 +pkgdesc="NVIDIA Optimus support for GNU/Linux through VirtualGL, without nonfree nvidia driver support" +arch=('i686' 'x86_64' 'mips64el') +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=("$pkgname-libre" 'nvidia-libgl') +conflicts=("$pkgname-libre" 'nvidia-libgl') +provides=('nvidia-libgl') +url="http://www.$pkgname-project.org" +license=("GPL3") +install="$pkgname.install" +backup=("etc/$pkgname/$pkgname.conf" + "etc/$pkgname/xorg.conf.nouveau") +source=("http://www.$pkgname-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-$pkgname-nvidia-dev.rules,xorg.conf.nvidia} + rm -rv "doc" + rm -rv "scripts/$pkgname-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/${pkgname}d.service" "${pkgdir}/usr/lib/systemd/system/${pkgname}d.service" + sed -i "s/sbin/bin/" "${pkgdir}/usr/lib/systemd/system/${pkgname}d.service" + + # Make bash_completion work + mv -v "${pkgdir}/etc/bash_completion.d/$pkgname" "${pkgdir}/etc/bash_completion.d/optirun" +} |