summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorSukanka2020-05-24 09:31:31 +0800
committerSukanka2020-05-24 09:31:31 +0800
commit57c49a5a9f24779eb5fecad55e3bcd9d62cc30ae (patch)
tree6dec88d3626653facc2ffbb1879fd794b0f555ef
parentb2a642657d8a09a623b25bb520bf8c68d32014df (diff)
downloadaur-57c49a5a9f24779eb5fecad55e3bcd9d62cc30ae.tar.gz
split dkms ver
-rw-r--r--.SRCINFO8
-rw-r--r--PKGBUILD24
-rw-r--r--bbswitch-v0.8-proc_ops-struct.patch37
3 files changed, 21 insertions, 48 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 096a54d7887..197f92a96f7 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = bbswitch-ati-git
pkgdesc = kernel module allowing to switch also AMD integrated and Nvidia dedicated graphics card on Optimus laptops (Git version)
pkgver = 0.8.4.g07b110d
- pkgrel = 1
+ pkgrel = 2
url = http://github.com/Bumblebee-Project/bbswitch
arch = i686
arch = x86_64
@@ -11,9 +11,13 @@ pkgbase = bbswitch-ati-git
provides = bbswitch
conflicts = bbswitch
conflicts = bbswitch-dkms
- conflicts = bbswitch-git-dkms
+ conflicts = bbswitch-dkms-git
+ conflicts = bbswitch-git
source = bbswitch-ati-git::git+https://github.com/Bumblebee-Project/bbswitch.git#branch=develop
sha256sums = SKIP
pkgname = bbswitch-ati-git
+pkgname = bbswitch-ati-dkms-git
+ depends = dkms
+
diff --git a/PKGBUILD b/PKGBUILD
index 059e534191f..b50736c449f 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,36 +1,42 @@
# Maintainer: sukanka <su975853527@gmail.com>
-pkgname=bbswitch-ati-git
+pkgbase=bbswitch-ati-git
+pkgname=(bbswitch-ati-git bbswitch-ati-dkms-git)
pkgver=0.8.4.g07b110d
-pkgrel=1
+pkgrel=2
pkgdesc='kernel module allowing to switch also AMD integrated and Nvidia dedicated graphics card on Optimus laptops (Git version)'
arch=('i686' 'x86_64')
license=('GPL')
url='http://github.com/Bumblebee-Project/bbswitch'
provides=('bbswitch')
-conflicts=('bbswitch' 'bbswitch-dkms' 'bbswitch-git-dkms')
+conflicts=('bbswitch' 'bbswitch-dkms' 'bbswitch-dkms-git' 'bbswitch-git')
makedepends=('linux-headers' 'git')
-source=("${pkgname}::git+https://github.com/Bumblebee-Project/bbswitch.git#branch=develop")
+source=("${pkgbase}::git+https://github.com/Bumblebee-Project/bbswitch.git#branch=develop")
sha256sums=('SKIP')
pkgver() {
- cd "${srcdir}/${pkgname}"
+ cd "${srcdir}/${pkgbase}"
git describe --always | sed 's|-|.|g' | sed 's/v//g'
}
build() {
kernel_ver=$(cut -f1 -d'-' /usr/src/linux/version)
cpu=$( grep name /proc/cpuinfo | uniq | cut -f2 -d: | cut -f2 -d' ')
- cd "${srcdir}/${pkgname}"
+ cd "${srcdir}/${pkgbase}"
if [ "$cpu" = "AMD" ]; then
- sed -i 's/PCI_VENDOR_ID_INTEL/PCI_VENDOR_ID_ATI/g' "${srcdir}/${pkgname}"/bbswitch.c
+ sed -i 's/PCI_VENDOR_ID_INTEL/PCI_VENDOR_ID_ATI/g' "${srcdir}/${pkgbase}"/bbswitch.c
fi
make KDIR=/usr/src/linux
}
-package() {
- cd ${srcdir}/${pkgname}
+package_bbswitch-ati-git() {
+ cd ${srcdir}/${pkgbase}
_extradir="/usr/lib/modules/$(</usr/src/linux/version)/extramodules"
install -Dt "${pkgdir}${_extradir}" -m644 *.ko
find "${pkgdir}" -name '*.ko' -exec xz {} +
}
+package_bbswitch-ati-dkms-git() {
+ depends=('dkms')
+ cd ${srcdir}/${pkgbase}
+ install -Dt "${pkgdir}/usr/src/${pkgbase}" -m644 Makefile bbswitch.c dkms/dkms.conf
+}
diff --git a/bbswitch-v0.8-proc_ops-struct.patch b/bbswitch-v0.8-proc_ops-struct.patch
deleted file mode 100644
index f894ad571b6..00000000000
--- a/bbswitch-v0.8-proc_ops-struct.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-diff a/bbswitch.c b/bbswitch.c
---- a/bbswitch.c 2013-12-04 21:22:06.000000000 -0200
-+++ b/bbswitch.c 2020-04-01 12:02:35.518754892 -0300
-@@ -35,6 +35,7 @@
- #include <linux/suspend.h>
- #include <linux/seq_file.h>
- #include <linux/pm_runtime.h>
-+#include <linux/version.h>
-
- #define BBSWITCH_VERSION "0.8"
-
-@@ -375,13 +376,23 @@
- return 0;
- }
-
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 6, 0)
-+static struct proc_ops bbswitch_fops = {
-+ .proc_open = bbswitch_proc_open,
-+ .proc_read = seq_read,
-+ .proc_write = bbswitch_proc_write,
-+ .proc_lseek = seq_lseek,
-+ .proc_release= single_release
-+};
-+#else
- static struct file_operations bbswitch_fops = {
- .open = bbswitch_proc_open,
- .read = seq_read,
- .write = bbswitch_proc_write,
- .llseek = seq_lseek,
- .release= single_release
--};
-+ };
-+#endif
-
- static struct notifier_block nb = {
- .notifier_call = &bbswitch_pm_handler
-