mirror of
https://gitdl.cn/https://github.com/chakralinux/core.git
synced 2025-02-04 01:07:15 +08:00
77 lines
3.3 KiB
Bash
77 lines
3.3 KiB
Bash
# Contributions from Arch: https://git.archlinux.org/svntogit/community.git/tree/trunk?h=packages/bumblebee
|
|
|
|
pkgname=bumblebee
|
|
pkgver=3.2.1
|
|
pkgrel=16
|
|
pkgdesc="Bumblebee brings Optimus Support for Linux Through VirtualGL."
|
|
arch=('x86_64')
|
|
depends=('virtualgl' 'glib2' 'mesa')
|
|
makedepends=('help2man')
|
|
optdepends=('bbswitch: switch on/off discrete card'
|
|
'nvidia: NVIDIA kernel driver'
|
|
'nvidia-340xx: NVIDIA kernel driver for older devices'
|
|
'nvidia-304xx: NVIDIA kernel driver for even older devices'
|
|
'primus: faster back-end for optirun')
|
|
url="http://www.Bumblebee-Project.org"
|
|
license=("GPL3")
|
|
install='bumblebee.install'
|
|
backup=('etc/bumblebee/bumblebee.conf'
|
|
'etc/bumblebee/xorg.conf.nouveau'
|
|
'etc/bumblebee/xorg.conf.nvidia')
|
|
source=("http://www.bumblebee-project.org/${pkgname}-${pkgver}.tar.gz"
|
|
"0001-bb_nvidia_modeset-detection_bug699_01.patch::https://github.com/arafey/Bumblebee/commit/5636b24fa86a005a5d2e30bd794516db13ccba56.patch"
|
|
"0002-bb_nvidia_modeset-detection_bug699_02.patch::https://github.com/arafey/Bumblebee/commit/09d537e8e5313cd0f2c7bf6620ca70454de8a04a.patch"
|
|
"0003-bb_nvidia_umv_detection_bug699.patch::https://github.com/arafey/Bumblebee/commit/dbbf20a38aa2bffb10c4e8af583b34dff6bfe721.patch"
|
|
"0004-bb_nvidia_drm_detection_bug699_01.patch::https://github.com/arafey/Bumblebee/commit/bcfe4dd16dd6194f1edbdc53b874a4f408343c5c.patch"
|
|
"0005-bb_nvidia_drm_detection_bug699_02.patch::https://github.com/arafey/Bumblebee/commit/fcfe596eb13f62ca9dd7de272a5a87ae843b2a00.patch"
|
|
"0006-bb_hexadicimal_bug573.patch::https://github.com/Bumblebee-Project/Bumblebee/commit/2073f8537412aa47755eb6f3f22a114403e5285b.patch"
|
|
"0007-bb_mutebblogger.patch"
|
|
"0008-libglvnd.patch::https://github.com/Bumblebee-Project/Bumblebee/pull/845.patch"
|
|
"bumblebee.conf")
|
|
md5sums=('30974e677bb13e8a3825fd6f3e7d3b24'
|
|
'ce459c536367e39a6fcc981651da3cc7'
|
|
'92c5aa0bfa39e41b0092362e555e93de'
|
|
'36d4bf3ae1d9cb378ca2eb0b60c390c3'
|
|
'b6d6a0c2ce0dbbb4a2e9cf0c3bd14535'
|
|
'40c37c529d65a3186a61ec4d72eb30ce'
|
|
'd0a7d504a717e34b05fb4bc9ee68f881'
|
|
'613527d15fb5d40925dc2b3843e545c4'
|
|
'46c8cd4ce30db7c22de0417febb7a2ab'
|
|
'8bfc4331d956abc6d205dd9b9e22e6eb')
|
|
|
|
|
|
prepare(){
|
|
cd "${srcdir}/${pkgname}-${pkgver}"
|
|
for p in ${srcdir}/*.patch; do
|
|
patch -Np1 -i "$p"
|
|
done
|
|
}
|
|
|
|
build() {
|
|
cd "${srcdir}/${pkgname}-${pkgver}"
|
|
./configure \
|
|
CONF_DRIVER_MODULE_NVIDIA=nvidia \
|
|
CONF_LDPATH_NVIDIA=/usr/lib/nvidia:/usr/lib32/nvidia \
|
|
CONF_MODPATH_NVIDIA=/usr/lib/nvidia/xorg/,/usr/lib/xorg/modules \
|
|
--prefix=/usr \
|
|
--sbindir=/usr/bin \
|
|
--with-udev-rules=/usr/lib/udev/rules.d/ \
|
|
--without-pidfile \
|
|
--sysconfdir=/etc
|
|
make
|
|
}
|
|
|
|
package() {
|
|
cd "${srcdir}/${pkgname}-${pkgver}"
|
|
make install DESTDIR="$pkgdir"
|
|
|
|
# Stop nvidia from loading on boot
|
|
install -Dm644 "${srcdir}/bumblebee.conf" "${pkgdir}/usr/lib/modprobe.d/bumblebee.conf"
|
|
|
|
# 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"
|
|
}
|