summaryrefslogtreecommitdiff
path: root/libre/bbswitch/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'libre/bbswitch/PKGBUILD')
-rw-r--r--libre/bbswitch/PKGBUILD18
1 files changed, 14 insertions, 4 deletions
diff --git a/libre/bbswitch/PKGBUILD b/libre/bbswitch/PKGBUILD
index aa4d680a8..8b71925d5 100644
--- a/libre/bbswitch/PKGBUILD
+++ b/libre/bbswitch/PKGBUILD
@@ -5,12 +5,12 @@
# Contributor (Hyperbola): Márcio Silva <coadde@hyperbola.info>
# Maintainer: Omar Vega Ramos <ovruni@gnu.org.pe>
-_basekernel=5.5.13-1
+_basekernel=5.9.12
pkgbase=bbswitch
pkgname=(bbswitch bbswitch-dkms)
pkgver=0.8
-pkgrel=302
+pkgrel=369
pkgrel+=.parabola1.basekernel${_basekernel%-*}
pkgdesc="Kernel module allowing to switch dedicated graphics card on Optimus laptops"
pkgdesc+=" (built for the linux-libre kernel package)"
@@ -19,8 +19,17 @@ arch+=('i686')
url="http://github.com/Bumblebee-Project/bbswitch"
license=('GPL')
makedepends=(linux-libre-headers=${_basekernel%-*} git libelf)
-source=("${pkgbase}-${pkgver}.tar.gz::https://github.com/Bumblebee-Project/bbswitch/archive/v${pkgver}.tar.gz")
-sha256sums=('76cabd3f734fb4fe6ebfe3ec9814138d0d6f47d47238521ecbd6a986b60d1477')
+source=("${pkgbase}-${pkgver}.tar.gz::https://github.com/Bumblebee-Project/bbswitch/archive/v${pkgver}.tar.gz"
+ 0001-proc_ops-struct.patch 0002-kernel-5.7.patch)
+sha512sums=('11ab163931feb6c0e202d04c4552b848e999fedea9990390c26b28abdb4a69081ccfb5a22d1e390cc274f1c0cfc9adedc719c5fece14738b17aaa93e28865b7c'
+ '993a2895c37ea213c105be668f794af54838d8015d6f561ee6bc7ce65583425515931c83c2487ab97c14454105f233f089e8bdc90ea5ed9576be767335f57ad1'
+ '2eeae463b2f83e7744ff1a769cb6186389e026fc78668e836525dfd16a56abfae01cfb150c9bb46af74ec42e87ebea91636118fe0c773e7eaa7ea671b25d2e04')
+
+prepare() {
+ cd ${pkgbase}-${pkgver}
+ patch -Np1 < ../0001-proc_ops-struct.patch
+ patch -Np1 < ../0002-kernel-5.7.patch
+}
build() {
cd ${pkgbase}-${pkgver}
@@ -33,6 +42,7 @@ package_bbswitch() {
cd ${pkgbase}-${pkgver}
_extradir="/usr/lib/modules/$(</usr/src/linux-libre/version)/extramodules"
install -Dt "${pkgdir}${_extradir}" -m644 *.ko
+ find "${pkgdir}" -name '*.ko' -exec strip --strip-debug {} +
find "${pkgdir}" -name '*.ko' -exec xz {} +
}