[arch-commits] Commit in bbswitch/repos (3 files)

Giancarlo Razzolini grazzolini at archlinux.org
Wed Apr 1 14:41:01 UTC 2020


    Date: Wednesday, April 1, 2020 @ 14:41:00
  Author: grazzolini
Revision: 608914

archrelease: copy trunk to community-staging-x86_64

Added:
  bbswitch/repos/community-staging-x86_64/
  bbswitch/repos/community-staging-x86_64/0001-proc_ops-struct.patch
    (from rev 608913, bbswitch/trunk/0001-proc_ops-struct.patch)
  bbswitch/repos/community-staging-x86_64/PKGBUILD
    (from rev 608913, bbswitch/trunk/PKGBUILD)

----------------------------+
 0001-proc_ops-struct.patch |   22 +++++++++++++++++++++
 PKGBUILD                   |   45 +++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 67 insertions(+)

Copied: bbswitch/repos/community-staging-x86_64/0001-proc_ops-struct.patch (from rev 608913, bbswitch/trunk/0001-proc_ops-struct.patch)
===================================================================
--- community-staging-x86_64/0001-proc_ops-struct.patch	                        (rev 0)
+++ community-staging-x86_64/0001-proc_ops-struct.patch	2020-04-01 14:41:00 UTC (rev 608914)
@@ -0,0 +1,22 @@
+diff --unified --recursive --text bbswitch-0.8.orig/bbswitch.c bbswitch-0.8.new/bbswitch.c
+--- bbswitch-0.8.orig/bbswitch.c	2013-12-04 21:22:06.000000000 -0200
++++ bbswitch-0.8.new/bbswitch.c	2020-04-01 11:28:02.910890888 -0300
+@@ -375,12 +375,12 @@
+     return 0;
+ }
+ 
+-static struct file_operations bbswitch_fops = {
+-    .open   = bbswitch_proc_open,
+-    .read   = seq_read,
+-    .write  = bbswitch_proc_write,
+-    .llseek = seq_lseek,
+-    .release= single_release
++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
+ };
+ 
+ static struct notifier_block nb = {

Copied: bbswitch/repos/community-staging-x86_64/PKGBUILD (from rev 608913, bbswitch/trunk/PKGBUILD)
===================================================================
--- community-staging-x86_64/PKGBUILD	                        (rev 0)
+++ community-staging-x86_64/PKGBUILD	2020-04-01 14:41:00 UTC (rev 608914)
@@ -0,0 +1,45 @@
+# Maintainer: Sven-Hendrik Haase <sh at lutzhaase.com>
+# Contributor: M0Rf30
+# Contributor: Samsagax <samsagax at gmail.com>
+
+pkgbase=bbswitch
+pkgname=(bbswitch bbswitch-dkms)
+pkgver=0.8
+pkgrel=303
+pkgdesc="Kernel module allowing to switch dedicated graphics card on Optimus laptops"
+arch=('x86_64')
+url="http://github.com/Bumblebee-Project/bbswitch"
+license=('GPL')
+makedepends=('linux-headers')
+source=("${pkgbase}-${pkgver}.tar.gz::https://github.com/Bumblebee-Project/bbswitch/archive/v${pkgver}.tar.gz"
+        "0001-proc_ops-struct.patch")
+sha512sums=('11ab163931feb6c0e202d04c4552b848e999fedea9990390c26b28abdb4a69081ccfb5a22d1e390cc274f1c0cfc9adedc719c5fece14738b17aaa93e28865b7c'
+            'b4b7e5e2e0b531f30b10c3e92d8d1e7189a13d1fdea55dc9659553f9df54c305addce53c78ecc0dac2e68e002b7f655161b57698bdeaa87e1987c7f7ad6cb629')
+
+prepare() {
+    cd ${pkgbase}-${pkgver}
+    patch -Np1 < $srcdir/0001-proc_ops-struct.patch
+}
+
+build() {
+  cd ${pkgbase}-${pkgver}
+  make KDIR=/usr/src/linux
+}
+
+package_bbswitch() {
+  depends=('linux')
+
+  cd ${pkgbase}-${pkgver}
+  _extradir="/usr/lib/modules/$(</usr/src/linux/version)/extramodules"
+  install -Dt "${pkgdir}${_extradir}" -m644 *.ko
+  find "${pkgdir}" -name '*.ko' -exec xz {} +
+}
+
+package_bbswitch-dkms() {
+  depends=('dkms')
+  conflicts=('bbswitch')
+  provides=('bbswitch')
+
+  cd ${pkgbase}-${pkgver}
+  install -Dt "${pkgdir}/usr/src/${pkgbase}-${pkgver}" -m644 Makefile bbswitch.c dkms/dkms.conf
+}



More information about the arch-commits mailing list