Skip to content

Commit 922aeeb

Browse files
committed
Add package for rmstylusbutton
1 parent 4478af9 commit 922aeeb

File tree

3 files changed

+65
-0
lines changed

3 files changed

+65
-0
lines changed

package/rmstylusbutton/package

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
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=v3.0
8+
pkgdesc="Use a stylus button with the reMarkable 2"
9+
timestamp=2024-03-03T20:18:54-08:00
10+
maintainer="Moritz <[email protected]>"
11+
license=GPL-3.0
12+
url=https://github.com/rschroll/RMStylusButton
13+
section="utils"
14+
installdepends=(xochitl)
15+
16+
image=base:v3.2
17+
source=(
18+
"$url/archive/refs/tags/$pkgver.tar.gz"
19+
rmstylusbutton.service
20+
rmstylusbutton.env
21+
)
22+
sha256sums=(
23+
5f468b9f78b705ca67ea3288ae923b10fb70193c236b31507a4e6148ebb4e60e
24+
SKIP
25+
SKIP
26+
)
27+
28+
build() {
29+
export CC=arm-linux-gnueabihf-gcc
30+
make
31+
}
32+
33+
package() {
34+
install -D -m 755 -t "$pkgdir"/opt/bin "$srcdir"/RMStylusButton/RMStylusButton
35+
install -D -m 644 -t "$pkgdir"/lib/systemd/system/ "$srcdir"/rmstylusbutton.service
36+
install -D -m 644 -t "$pkgdir"/opt/etc/ "$srcdir"/rmstylusbutton.env
37+
}
38+
39+
configure() {
40+
systemctl daemon-reload
41+
systemctl enable rmstylusbutton.service
42+
systemctl start rmstylusbutton.service
43+
}
44+
45+
preremove() {
46+
systemctl stop rmstylusbutton.service
47+
systemctl disable rmstylusbutton.service
48+
}
49+
50+
postremove() {
51+
systemctl daemon-reload
52+
}
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)