core/primus/PKGBUILD
2017-04-09 08:38:31 +01:00

44 lines
1.3 KiB
Bash

# Maintainer: Neophytos Kolokotronis <tetris4@gmail.com>
# Contributions from Arch: https://projects.archlinux.org/svntogit/community.git/tree/trunk?h=packages/primus
# If you update this package,please remember to update lib32-primus!
pkgname=primus
pkgver=20151110
pkgrel=2
pkgdesc="Faster OpenGL offloading for Bumblebee (git sources)"
arch=('x86_64')
url="https://github.com/amonakov/primus"
license=('custom:ISC')
depends=('bumblebee')
makedepends=('git')
provides=('primus')
source=("git://github.com/amonakov/primus.git#commit=d1afbf6"
"register_cleanup.patch")
sha1sums=('SKIP'
'cec9946b5f90d7b4fb7be03df9d651d903bd1062')
prepare() {
cd primus
patch -Np1 < "$srcdir/register_cleanup.patch"
}
build() {
cd "${srcdir}/${pkgname}"
make
}
package() {
cd "${srcdir}/${pkgname}"
sed -e '/^PRIMUS_libGL=/cPRIMUS_libGL=/usr/\\$LIB/primus' \
-e '/^exec/iexport __GLVND_DISALLOW_PATCHING=1' \
primusrun | install -D /dev/stdin "$pkgdir/usr/bin/primusrun"
install -D "lib/libGL.so.1" "$pkgdir/usr/lib/primus/libGL.so.1"
install -D "primus.bash-completion" "$pkgdir/etc/bash_completion.d/primusrun"
gzip -9 "primusrun.1"
install -D "primusrun.1.gz" "$pkgdir/usr/share/man/man1/primusrun.1.gz"
install -Dm644 LICENSE.txt "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}