Skip to content

Commit

Permalink
Add package for rmstylusbutton (#939)
Browse files Browse the repository at this point in the history
Apply suggestions from code review

Co-authored-by: Nathaniel van Diepen <[email protected]>
  • Loading branch information
MoritzBoehme and Eeems authored Feb 14, 2025
1 parent 4478af9 commit 705b0de
Show file tree
Hide file tree
Showing 2 changed files with 59 additions and 0 deletions.
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

0 comments on commit 705b0de

Please sign in to comment.