This repository has been archived by the owner on Nov 6, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPKGBUILD
54 lines (49 loc) · 1.68 KB
/
PKGBUILD
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# vim:set ft=sh et:
# Maintainer: Sven-Hendrik Haase <[email protected]>
# Contributor: M0Rf30
# Contributor: Samsagax <[email protected]>
_pkgname=bbswitch
pkgname=$_pkgname-bede
pkgver=0.8
_current_linux_version=5.8.3
_next_linux_version=5.9
pkgrel=322
pkgdesc="Kernel module allowing to switch dedicated graphics card on Optimus laptops"
arch=('x86_64')
url="http://github.com/Bumblebee-Project/bbswitch"
license=('GPL')
depends=(
"linux-bede>=$_current_linux_version"
"linux-bede<$_next_linux_version"
)
makedepends=(
"linux-bede-headers>=$_current_linux_version"
"linux-bede-headers<$_next_linux_version"
"bbswitch-dkms>=$pkgver"
)
source=('kernel-5.7.patch')
sha512sums=('5f9ac04b6a8552a406e808f86c5740062af56fdb4b37eab4b962933b43d53150120fda3c20dfe974494cdcd7394fd4856010eeb09852d6dabb8c859f6b9d8f7c')
## in case we need to do some patching
#build() {
#_kernver="$(cat /usr/src/linux-bede/version)"
## dkms need modification to be run as user
#cp -Lr /var/lib/dkms .
#echo "dkms_tree='$srcdir/dkms'" > dkms.conf
#(
#cd dkms/$_pkgname/${pkgver}/source
#patch -p1 -i "$srcdir/kernel-5.7.patch"
#)
## build host modules
#dkms --dkmsframework dkms.conf build "$_pkgname/${pkgver}" -k "$_kernver"
#}
package() {
local kernver=$(</usr/src/linux-bede/version)
local extradir="/usr/lib/modules/$kernver/extramodules"
install -dm755 "${pkgdir}${extradir}/$_pkgname"
# global dkms
cp -a "/var/lib/dkms/$_pkgname/kernel-$kernver-x86_64/module"/* \
"${pkgdir}${extradir}/$_pkgname/"
# local home dkms
#cp -a "$srcdir/dkms/$_pkgname/$pkgver/$kernver/x86_64/module"/* \
#"${pkgdir}${extradir}/$_pkgname/"
}