summaryrefslogtreecommitdiff
path: root/libre/bbswitch
diff options
context:
space:
mode:
Diffstat (limited to 'libre/bbswitch')
-rw-r--r--libre/bbswitch/PKGBUILD29
-rw-r--r--libre/bbswitch/kmod.install14
2 files changed, 8 insertions, 35 deletions
diff --git a/libre/bbswitch/PKGBUILD b/libre/bbswitch/PKGBUILD
index 1555321f6..809d97224 100644
--- a/libre/bbswitch/PKGBUILD
+++ b/libre/bbswitch/PKGBUILD
@@ -9,8 +9,8 @@
_kernelname=
if [[ ${_kernelname} == "" ]]; then
- _basekernel=4.13
- _archrel=81
+ _basekernel=4.14
+ _archrel=96
_parabolarel=1
elif [[ ${_kernelname} == -lts ]]; then
_basekernel=4.9
@@ -40,10 +40,8 @@ source=("${pkgbase}-${pkgver}.tar.gz::https://github.com/Bumblebee-Project/bbswi
sha256sums=('76cabd3f734fb4fe6ebfe3ec9814138d0d6f47d47238521ecbd6a986b60d1477')
build() {
- cd "${srcdir}/${pkgbase}-${pkgver}"
-
+ cd "${pkgbase}-${pkgver}"
_kernver="$(cat /usr/lib/modules/${_extramodules}/version)"
-
make KDIR=/lib/modules/${_kernver}/build
}
@@ -51,18 +49,10 @@ _package() {
depends=("linux-libre${_kernelname}>=${_basekernel}" "linux-libre${_kernelname}<${_toohigh}")
replaces=("${pkgbase}-libre${_kernelname}" "${pkgbase}-parabola${_kernelname}")
conflicts=("${pkgbase}-libre${_kernelname}" "${pkgbase}-parabola${_kernelname}")
- install='kmod.install'
-
- cd "${srcdir}/${pkgbase}-${pkgver}"
- # Set the correct extramodules directory for install
- cp -f "${startdir}/${install}" "${startdir}/${install}.pkg"
- true && install=${install}.pkg
- sed -i "s/^_EXTRAMODULES=.*/_EXTRAMODULES="${_extramodules}"/" "${startdir}/${install}"
-
- # Actually install
- install -Dm644 ${pkgbase}.ko "${pkgdir}"/usr/lib/modules/${_extramodules}/${pkgbase}.ko
- gzip "${pkgdir}/usr/lib/modules/${_extramodules}/${pkgbase}.ko"
+ cd "${pkgbase}-${pkgver}"
+ install -Dt "${pkgdir}/usr/lib/modules/${_extramodules}" -m644 bbswitch.ko
+ find "${pkgdir}" -name '*.ko' -exec gzip -n {} +
}
if [[ ${_kernelname} == "" ]]; then
@@ -71,11 +61,8 @@ if [[ ${_kernelname} == "" ]]; then
conflicts=('bbswitch')
provides=('bbswitch')
- cd "${srcdir}/${pkgbase}-${pkgver}"
-
- install -dm755 "${pkgdir}/usr/src/${pkgbase}-${pkgver}/"
-
- install -Dm644 Makefile bbswitch.c dkms/dkms.conf "${pkgdir}/usr/src/${pkgbase}-${pkgver}/"
+ cd "${pkgbase}-${pkgver}"
+ install -Dt "${pkgdir}/usr/src/${pkgbase}-${pkgver}" -m644 Makefile bbswitch.c dkms/dkms.conf
}
pkgname=("${pkgbase}${_kernelname}" "${pkgbase}${_kernelname}-dkms")
diff --git a/libre/bbswitch/kmod.install b/libre/bbswitch/kmod.install
deleted file mode 100644
index 40caa464f..000000000
--- a/libre/bbswitch/kmod.install
+++ /dev/null
@@ -1,14 +0,0 @@
-_EXTRAMODULES=
-
-post_install() {
- echo ">>> Updating module dependencies. Please wait ..."
- depmod "$(cat /usr/lib/modules/$_EXTRAMODULES/version)" >/dev/null 2>&1
-}
-
-post_upgrade() {
- post_install
-}
-
-post_remove() {
- post_install
-}