blob: 53f162dd2fbb20ab25007ab59825a24295824255 (
plain)
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
|
# Maintainer: Matthew Monaco <cx monaco dgbaley27>
# Ivan <vantu5z@mail.ru>
# http://kernel.opensuse.org/cgit/kernel-source/
# http://kernel.opensuse.org/cgit/kernel-source/commit/patches.drivers?id=940e57e2c66093f6fee481ab4224dd4294e3793f
# https://bugzilla.novell.com/768506
# https://bugzilla.novell.com/765524
_kver=5.12
_gitroot=git://repo.or.cz/linux.git
_gitcommit=linux-$_kver.y
_cur_kernel="$(uname -r)"
_EXTRAMODULES=$(readlink -f /usr/lib/modules/"$_cur_kernel/extramodules")
pkgname=synaptics-led
pkgver=$_kver
pkgrel=1
arch=(i686 x86_64)
license=(GPL2)
url="https://github.com/mmonaco/PKGBUILDs"
pkgdesc="Synaptics LED enabled psmouse kernel module"
depends=('linux>=5.10.13')
makedepends=('git' 'linux-headers>=5.10.13')
install="$pkgname.install"
source=(
SHA256SUMS
"$pkgname.install"
kernel.patch
)
sha256sums=('3cf26717501e5c59f481a98560b702f6e9f370f74f133d643eef806b7e572169'
'b46af61822e8ec8639faa1b60dd3b6b1a64e24854611902499b9f81d2691e22c'
'43674d9e08ea6c336eb32e05ca8b47ac6a92f0cf1aa839b5ee577d109865b8cb')
build() {
msg2 "Module will be installed to: $_EXTRAMODULES"
msg2 "Getting source from $_gitroot"
cd "${srcdir}"
git archive --remote="$_gitroot" "$_gitcommit" drivers/input/mouse | tar -x
msg2 "Performing Integrity Check"
cd "drivers/input/mouse"
sha256sum --quiet -c "${srcdir}/SHA256SUMS"
msg2 "Patching source"
cd "${srcdir}"
for p in ../*.patch; do
msg2 "Applying patch: $p"
patch -p1 -i "$p"
done
msg2 "Building psmouse.ko"
cd "drivers/input/mouse"
make -C "/usr/lib/modules/$_cur_kernel/build" M="$PWD" psmouse.ko
msg2 "Compressing psmouse.ko.xz"
xz psmouse.ko
}
package() {
cd "${srcdir}/drivers/input/mouse"
install -D -m 0644 psmouse.ko.xz "${pkgdir}/${_EXTRAMODULES}/psmouse.ko.xz"
# if you have not one kernel installed and _EXTRAMODULES not proper detected:
# you should change install string for EXTRAMODULES manualy:
# install -D -m 0644 psmouse.ko.xz "${pkgdir}/usr/lib/modules/{YOUR_EXTRAMODULES_DIR}/psmouse.ko.xz"
}
|