This repository has been archived by the owner on Sep 17, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
package.yml
46 lines (44 loc) · 1.59 KB
/
package.yml
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
name : bbswitch
version : 0.8
release : 302
source :
- https://github.com/Bumblebee-Project/bbswitch/archive/v0.8.tar.gz : 76cabd3f734fb4fe6ebfe3ec9814138d0d6f47d47238521ecbd6a986b60d1477
license : GPL-2.0-or-later
component :
- kernel.drivers
- current : kernel.drivers
summary :
- Optimus hybrid GPU switching support
- current : bbswitch package for linux-current
description: |
bbswitch is a kernel module which automatically detects the required ACPI calls for two kinds of Optimus laptops.
builddeps :
- pkgconfig(libelf)
- linux-lts
- linux-lts-headers
- linux-current
- linux-current-headers
- zstd
permanent :
- /lib/modules
patterns :
- current : /lib/modules/*.current
setup : |
%patch -p1 -i $pkgfiles/0001-proc_ops-struct.patch
%patch -p1 -i $pkgfiles/linux-5.7.patch
%patch -p1 -i $pkgfiles/linux-5.18.patch
pushd ..
cp -a bbswitch-${version} lts-build
cp -a bbswitch-${version} current-build
build : |
pushd lts-build
%make KVERSION="%kernel_version_lts%"
pushd ../current-build
%make KVERSION="%kernel_version_current%"
install : |
KVERSION_LTS="%kernel_version_lts%"
KVERSION_CURRENT="%kernel_version_current%"
install -D -m 00755 lts-build/bbswitch.ko $installdir/lib/modules/${KVERSION_LTS}/misc/bbswitch.ko
install -D -m 00755 current-build/bbswitch.ko $installdir/lib/modules/${KVERSION_CURRENT}/misc/bbswitch.ko
# Compress modules with zstd
find "$installdir" -name '*.ko' -exec strip --strip-debug {} \; -exec zstd {} \; -exec rm -v {} \;