Skip to content

Commit 59b0bbf

Browse files
MoritzBoehmeEeems
andcommitted
Add package for rmstylusbutton
Apply suggestions from code review Co-authored-by: Nathaniel van Diepen <[email protected]>
1 parent 4478af9 commit 59b0bbf

File tree

3 files changed

+64
-0
lines changed

3 files changed

+64
-0
lines changed

package/rmstylusbutton/package

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
#!/usr/bin/env bash
2+
# Copyright (c) 2025 The Toltec Contributors
3+
# SPDX-License-Identifier: MIT
4+
5+
archs=(rm2)
6+
pkgnames=(rmstylusbutton)
7+
_pkgver=3.0
8+
pkgver=$_pkgver-1
9+
pkgdesc="Use a stylus button with the reMarkable 2"
10+
timestamp=2024-03-04T04:30:52Z
11+
maintainer="Moritz <[email protected]>"
12+
license=GPL-3.0
13+
url=https://github.com/rschroll/RMStylusButton
14+
section="utils"
15+
installdepends=(xochitl)
16+
17+
image=base:v3.2
18+
source=(
19+
"$url/archive/refs/tags/v$_pkgver.tar.gz"
20+
rmstylusbutton.service
21+
rmstylusbutton.env
22+
)
23+
sha256sums=(
24+
5f468b9f78b705ca67ea3288ae923b10fb70193c236b31507a4e6148ebb4e60e
25+
SKIP
26+
SKIP
27+
)
28+
29+
build() {
30+
export CC=arm-linux-gnueabihf-gcc
31+
make
32+
}
33+
34+
package() {
35+
install -D -m 755 -t "$pkgdir"/opt/bin "$srcdir"/RMStylusButton/RMStylusButton
36+
install -D -m 644 -t "$pkgdir"/lib/systemd/system/ "$srcdir"/rmstylusbutton.service
37+
install -D -m 644 -t "$pkgdir"/opt/etc/ "$srcdir"/rmstylusbutton.env
38+
}
39+
40+
configure() {
41+
systemctl daemon-reload
42+
systemctl enable --now rmstylusbutton.service
43+
}
44+
45+
preremove() {
46+
disable-unit rmstylusbutton.service
47+
}
48+
49+
postremove() {
50+
systemctl daemon-reload
51+
}
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# possible flags: --verbose, --toggle
2+
FLAGS=
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
[Unit]
2+
Description=Stylus Button Input
3+
After=xochitl.service
4+
5+
[Service]
6+
ExecStart=/opt/bin/RMStylusButton $FLAGS
7+
Restart=on-failure
8+
EnvironmentFile=/opt/etc/rmstylusbutton.env
9+
10+
[Install]
11+
WantedBy=multi-user.target

0 commit comments

Comments
 (0)