-
Notifications
You must be signed in to change notification settings - Fork 64
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Apply suggestions from code review Co-authored-by: Nathaniel van Diepen <[email protected]>
- Loading branch information
1 parent
4478af9
commit ed5c6e2
Showing
3 changed files
with
65 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
#!/usr/bin/env bash | ||
# Copyright (c) 2025 The Toltec Contributors | ||
# SPDX-License-Identifier: MIT | ||
|
||
archs=(rm2) | ||
pkgnames=(rmstylusbutton) | ||
_pkgver=3.0 | ||
pkgver=$_pkgver-1 | ||
pkgdesc="Use a stylus button with the reMarkable 2" | ||
timestamp=2024-03-04T04:30:52Z | ||
maintainer="Moritz <[email protected]>" | ||
license=GPL-3.0 | ||
url=https://github.com/rschroll/RMStylusButton | ||
section="utils" | ||
installdepends=(xochitl) | ||
conflicts=(remarkable-stylus) | ||
|
||
image=base:v3.2 | ||
source=( | ||
"$url/archive/refs/tags/v$_pkgver.tar.gz" | ||
rmstylusbutton.service | ||
rmstylusbutton.conf | ||
) | ||
sha256sums=( | ||
5f468b9f78b705ca67ea3288ae923b10fb70193c236b31507a4e6148ebb4e60e | ||
SKIP | ||
SKIP | ||
) | ||
|
||
build() { | ||
export CC=arm-linux-gnueabihf-gcc | ||
make | ||
} | ||
|
||
package() { | ||
install -D -m 755 -t "$pkgdir"/opt/bin "$srcdir"/RMStylusButton/RMStylusButton | ||
install -D -m 644 -t "$pkgdir"/lib/systemd/system/ "$srcdir"/rmstylusbutton.service | ||
install -D -m 644 -t "$pkgdir"/opt/etc/ "$srcdir"/rmstylusbutton.conf | ||
} | ||
|
||
configure() { | ||
systemctl daemon-reload | ||
systemctl enable --now rmstylusbutton.service | ||
} | ||
|
||
preremove() { | ||
disable-unit rmstylusbutton.service | ||
} | ||
|
||
postremove() { | ||
systemctl daemon-reload | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# possible flags: --verbose, --toggle | ||
FLAGS= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
[Unit] | ||
Description=Stylus Button Input | ||
After=xochitl.service | ||
|
||
[Service] | ||
ExecStart=/opt/bin/RMStylusButton $FLAGS | ||
Restart=on-failure | ||
EnvironmentFile=/opt/etc/rmstylusbutton.conf | ||
|
||
[Install] | ||
WantedBy=multi-user.target |