Skip to content

Add package for rmstylusbutton #939

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 14, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 49 additions & 0 deletions package/rmstylusbutton/package
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
#!/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
)
sha256sums=(
5f468b9f78b705ca67ea3288ae923b10fb70193c236b31507a4e6148ebb4e60e
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
}

configure() {
systemctl daemon-reload
systemctl enable --now rmstylusbutton.service
}

preremove() {
disable-unit rmstylusbutton.service
}

postremove() {
systemctl daemon-reload
}
10 changes: 10 additions & 0 deletions package/rmstylusbutton/rmstylusbutton.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[Unit]
Description=Stylus Button Input
After=xochitl.service

[Service]
ExecStart=/opt/bin/RMStylusButton
Restart=on-failure

[Install]
WantedBy=multi-user.target