Skip to content

Commit

Permalink
[rm2fb] update rm2fb to work with xochitl 2.6 (v1.0.1) (toltec-dev#301)
Browse files Browse the repository at this point in the history
* match rm2fb version to original repo version
* update to work with 2.6 (and bump to 1.0.1)
* Create librm2fb_*.so.1 symlinks & point to them
  • Loading branch information
raisjn authored and danshick committed May 5, 2021
1 parent d614698 commit a7eb0fa
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 14 deletions.
14 changes: 8 additions & 6 deletions package/rm2fb/package
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env bash
# Copyright (c) 2020 The Toltec Contributors
# Copyright (c) 2021 The Toltec Contributors
# SPDX-License-Identifier: MIT

pkgnames=(rm2fb)
Expand All @@ -8,19 +8,19 @@ maintainer="raisjn <of.raisjn@gmail.com>"
license=MIT
pkgdesc="Interface to the reMarkable 2 framebuffer"
url="https://github.com/ddvk/remarkable2-framebuffer"
pkgver=1.0.0-8
pkgver=1.0.1-1
section="devel"

image=qt:v1.1
source=(
https://github.com/ddvk/remarkable2-framebuffer/archive/0724acfcc87c24ae2fcb45db4cad033981f3f4a9.zip
https://github.com/ddvk/remarkable2-framebuffer/archive/aa70ce37c71f84b91434f5c469fa71f4b1bb328c.zip
rm2fb.conf
rm2fb.service
rm2fb-server
rm2fb-client
)
sha256sums=(
bf398905f43e189671692325444e0cac131ab9856f215adabe6b8747aaa41351
76f1c0b72260a9743f3e008100ffddf1f89cd44c6f0376d906e98ae66eaea716
SKIP
SKIP
SKIP
Expand All @@ -34,8 +34,10 @@ build() {

package() {
mkdir -p "$pkgdir"/opt/lib "$pkgdir"/opt/etc "$pkgdir"/opt/bin
install -D -m 755 "$srcdir"/src/client/librm2fb_client.so.${pkgver%-*} "$pkgdir"/opt/lib/
install -D -m 755 "$srcdir"/src/server/librm2fb_server.so.${pkgver%-*} "$pkgdir"/opt/lib/
install -D -m 755 "$srcdir/src/client/librm2fb_client.so.${pkgver%-*}" "$pkgdir"/opt/lib/
ln -s "librm2fb_client.so.${pkgver%-*}" "$pkgdir/opt/lib/librm2fb_client.so.${pkgver%.*.*-*}"
install -D -m 755 "$srcdir/src/server/librm2fb_server.so.${pkgver%-*}" "$pkgdir"/opt/lib/
ln -s "librm2fb_server.so.${pkgver%-*}" "$pkgdir/opt/lib/librm2fb_server.so.${pkgver%.*.*-*}"
install -D -m 755 "$srcdir"/rm2fb-server "$pkgdir"/opt/bin/
install -D -m 755 "$srcdir"/rm2fb-client "$pkgdir"/opt/bin/
install -D -m 644 "$srcdir"/rm2fb.conf "$pkgdir"/etc/systemd/system.conf.d/01-rm2fb.conf
Expand Down
3 changes: 1 addition & 2 deletions package/rm2fb/rm2fb-client
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
#!/usr/bin/env bash
# shellcheck disable=SC2048
LD_PRELOAD=/opt/lib/librm2fb_client.so.1.0.0 $*
LD_PRELOAD=/opt/lib/librm2fb_client.so.1 exec "$@"
4 changes: 1 addition & 3 deletions package/rm2fb/rm2fb-server
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
#!/usr/bin/env bash
# we actually do want to execute this command
# shellcheck disable=SC2091
LD_PRELOAD=/opt/lib/librm2fb_server.so.1.0.0 $(command -v remarkable-shutdown)
LD_PRELOAD=/opt/lib/librm2fb_server.so.1 exec "$(command -v remarkable-shutdown)"
2 changes: 1 addition & 1 deletion package/rm2fb/rm2fb.conf
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[Manager]
DefaultEnvironment=LD_PRELOAD=/opt/lib/librm2fb_client.so.1.0.0
DefaultEnvironment=LD_PRELOAD=/opt/lib/librm2fb_client.so.1
4 changes: 2 additions & 2 deletions package/rm2fb/rm2fb.service
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2020 The Toltec Contributors
# Copyright (c) 2021 The Toltec Contributors
# SPDX-License-Identifier: MIT

[Unit]
Expand All @@ -14,7 +14,7 @@ ExecStart=/usr/bin/remarkable-shutdown
Restart=on-failure
RestartSec=5
Environment="HOME=/home/root"
Environment="LD_PRELOAD=/opt/lib/librm2fb_server.so.1.0.0"
Environment="LD_PRELOAD=/opt/lib/librm2fb_server.so.1"

[Install]
WantedBy=multi-user.target xochitl.service

0 comments on commit a7eb0fa

Please sign in to comment.