From ec6240867c666a37f8dd9e7d89c0eb6cd8da6321 Mon Sep 17 00:00:00 2001
From: FouzR <88454554+FouzR@users.noreply.github.com>
Date: Wed, 8 Nov 2023 03:35:23 +0400
Subject: [PATCH 1/9] Update YAFT to v0.0.10 (#736)

* Update YAFT to v0.0.10

---------

Co-authored-by: Nathaniel van Diepen <Eeems@users.noreply.github.com>
---
 package/yaft/bash-l.patch | 13 -------------
 package/yaft/package      | 13 ++++++-------
 2 files changed, 6 insertions(+), 20 deletions(-)
 delete mode 100644 package/yaft/bash-l.patch

diff --git a/package/yaft/bash-l.patch b/package/yaft/bash-l.patch
deleted file mode 100644
index ad6d27be7..000000000
--- a/package/yaft/bash-l.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-diff --git a/apps/yaft/main.cpp b/apps/yaft/main.cpp
-index baa1f56..1d4ee6a 100755
---- a/apps/yaft/main.cpp
-+++ b/apps/yaft/main.cpp
-@@ -200,7 +200,7 @@ main(int argc, const char* argv[]) {
-   extern volatile sig_atomic_t need_redraw;
-   extern volatile sig_atomic_t child_alive;
-   extern struct termios termios_orig;
--  static const char* shell_args[2] = { shell_cmd, NULL };
-+  static const char* shell_args[3] = { shell_cmd, "-l", NULL };
- 
-   Keyboard keyboard;
- 
diff --git a/package/yaft/package b/package/yaft/package
index 8bc4e5154..a08ab32d0 100644
--- a/package/yaft/package
+++ b/package/yaft/package
@@ -5,9 +5,9 @@
 pkgnames=(yaft)
 pkgdesc="Yet another framebuffer terminal"
 url=https://github.com/timower/rM2-stuff/tree/master/apps/yaft
-_tag=0.0.8
-pkgver=${_tag}-2
-timestamp=2021-05-02T09:23Z
+_tag=0.0.10
+pkgver=${_tag}-1
+timestamp=2023-08-12T14:31Z
 maintainer="Mattéo Delabre <spam@delab.re>"
 license=GPL-3.0
 section="admin"
@@ -17,18 +17,15 @@ installdepends=(display terminfo)
 source=(
     "https://github.com/timower/rM2-stuff/archive/refs/tags/v${_tag}.zip"
     input.patch
-    bash-l.patch
 )
 
 sha256sums=(
-    718a9fc7a8e26d587bac790fd83ad8242978b59745269b2ff213e04820bf45b8
-    SKIP
+    1cd4741a93cde6bd545215eb303e51219fc9901cba1c28b6206b1b5e0871a7b5
     SKIP
 )
 
 build() {
     patch -u libs/rMlib/Device.cpp -i input.patch
-    patch -u apps/yaft/main.cpp -i bash-l.patch
     mkdir build
     mkdir install
     cd build
@@ -37,6 +34,8 @@ build() {
     cd apps/yaft
     make
     make install
+    cd ../../libs/libYaft
+    make install
 }
 
 package() {

From 1e90b51349b27fc17ac3a7dbfa08b616d15b9081 Mon Sep 17 00:00:00 2001
From: Nathaniel van Diepen <Eeems@users.noreply.github.com>
Date: Sun, 12 Nov 2023 11:28:03 -0700
Subject: [PATCH 2/9] Make sure xochtil shows up properly when run (#707)

* Make sure xochtil shows up properly when run
---
 package/xochitl/package | 2 +-
 package/xochitl/xochitl | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/package/xochitl/package b/package/xochitl/package
index 1ebefec09..1aa004a27 100644
--- a/package/xochitl/package
+++ b/package/xochitl/package
@@ -5,7 +5,7 @@
 pkgnames=(xochitl)
 pkgdesc="Read documents and take notes"
 url=https://remarkable.com
-pkgver=0.0.0-14
+pkgver=0.0.0-15
 timestamp=2022-11-07T20:19:57Z
 section="readers"
 maintainer="Mattéo Delabre <spam@delab.re>"
diff --git a/package/xochitl/xochitl b/package/xochitl/xochitl
index a745d8bea..f16945fe0 100644
--- a/package/xochitl/xochitl
+++ b/package/xochitl/xochitl
@@ -18,4 +18,4 @@ fi
 if ! systemctl is-active --quiet manual-sync.service; then
     systemctl enable --now manual-sync.service
 fi
-exec /usr/bin/xochitl "$@"
+exec -a /usr/bin/xochitl /usr/bin/xochitl "$@"

From 30d4584386c54b207b64353731adea90de35fabb Mon Sep 17 00:00:00 2001
From: Nathaniel van Diepen <Eeems@users.noreply.github.com>
Date: Sun, 12 Nov 2023 11:31:13 -0700
Subject: [PATCH 3/9] Add various Templates (#712)

* Add remarkable_templates
---
 package/remarkable_templates/package | 142 +++++++++++++++++++++++++++
 1 file changed, 142 insertions(+)
 create mode 100644 package/remarkable_templates/package

diff --git a/package/remarkable_templates/package b/package/remarkable_templates/package
new file mode 100644
index 000000000..6cae08725
--- /dev/null
+++ b/package/remarkable_templates/package
@@ -0,0 +1,142 @@
+#!/usr/bin/env bash
+# Copyright (c) 2023 The Toltec Contributors
+# SPDX-License-Identifier: MIT
+
+pkgnames=(
+    template-daily-planner
+    template-weekly-planner
+    template-journal
+    template-meeting-notes
+    template-smart-goals
+    template-good-time-journal
+)
+url=https://github.com/msencer/remarkable_templates
+pkgver=0.0.0-1
+timestamp=2023-07-27T12:28:59Z
+section="templates"
+maintainer="Eeems <eeems@eeems.email>"
+license=MIT
+installdepends=(templatectl)
+
+source=("https://github.com/msencer/remarkable_templates/archive/03282d34b905e7e6431132b022b5a9cb3af116a2.zip")
+sha256sums=(7a39d53767963f59c8d5b8a7ebda411b60d1256fe1077a3864cc43cd59281e03)
+
+template-daily-planner() {
+    pkgdesc="Daily Planner template"
+    package() {
+        install -D -m 755 \
+            -t "$pkgdir"/opt/share/remarkable/templates \
+            "$srcdir"/templates/pngs/daily_planner.png
+    }
+    configure() {
+        templatectl add \
+            --name "Daily Planner" \
+            --filename "daily_planner" \
+            --category "Custom" \
+            --category "Life/organize" \
+            --icon_code "e9da"
+    }
+    preremove() {
+        templatectl remove --name "Daily Planner"
+    }
+}
+
+template-weekly-planner() {
+    pkgdesc="Weekly Planner template"
+    package() {
+        install -D -m 755 \
+            -t "$pkgdir"/opt/share/remarkable/templates \
+            "$srcdir"/templates/pngs/weekly_planner.png
+    }
+    configure() {
+        templatectl add \
+            --name "Weekly Planner" \
+            --filename "weekly_planner" \
+            --category "Custom" \
+            --category "Life/organize" \
+            --icon_code "e997"
+    }
+    preremove() {
+        templatectl remove --name "Weekly Planner"
+    }
+}
+
+template-journal() {
+    pkgdesc="Journal template"
+    package() {
+        install -D -m 755 \
+            -t "$pkgdir"/opt/share/remarkable/templates \
+            "$srcdir"/templates/pngs/journal.png
+    }
+    configure() {
+        templatectl add \
+            --name "Journal" \
+            --filename "journal" \
+            --category "Custom" \
+            --category "Life/organize" \
+            --icon_code "e991"
+    }
+    preremove() {
+        templatectl remove --name "Journal"
+    }
+}
+
+template-meeting-notes() {
+    pkgdesc="Meeting Notes template"
+    package() {
+        install -D -m 755 \
+            -t "$pkgdir"/opt/share/remarkable/templates \
+            "$srcdir"/templates/pngs/meeting_notes.png
+    }
+    configure() {
+        templatectl add \
+            --name "1:1 / Meeting Notes" \
+            --filename "meeting_notes" \
+            --category "Custom" \
+            --category "Life/organize" \
+            --icon_code "e9d8"
+    }
+    preremove() {
+        templatectl remove --name "1:1 / Meeting Notes"
+    }
+}
+
+template-smart-goals() {
+    pkgdesc="Smart Goals template"
+    package() {
+        install -D -m 755 \
+            -t "$pkgdir"/opt/share/remarkable/templates \
+            "$srcdir"/templates/pngs/goals.png
+    }
+    configure() {
+        templatectl add \
+            --name "Smart Goals" \
+            --filename "goals" \
+            --category "Custom" \
+            --category "Life/organize" \
+            --icon_code "e98f"
+    }
+    preremove() {
+        templatectl remove --name "Smart Goals"
+    }
+}
+
+template-good-time-journal() {
+    pkgdesc="Smart Goals template"
+    package() {
+        install -D -m 755 \
+            -t "$pkgdir"/opt/share/remarkable/templates \
+            "$srcdir"/templates/pngs/gt_journal.png
+    }
+    configure() {
+        templatectl add \
+            --name "Good Time Journal" \
+            --filename "gt_journal" \
+            --category "Custom" \
+            --category "Life/organize" \
+            --icon_code "e9b2"
+    }
+    preremove() {
+        templatectl remove --name "Good Time Journal"
+    }
+}

From 9f8aa1dad8f76a57fd9907e75ef218c0f6342b89 Mon Sep 17 00:00:00 2001
From: Nathaniel van Diepen <Eeems@users.noreply.github.com>
Date: Sun, 12 Nov 2023 11:34:01 -0700
Subject: [PATCH 4/9] Update rguard to use install-lib (#689)

---
 package/reboot-guard/package | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/package/reboot-guard/package b/package/reboot-guard/package
index 61825f748..ef9ceb257 100644
--- a/package/reboot-guard/package
+++ b/package/reboot-guard/package
@@ -5,7 +5,7 @@
 pkgnames=(reboot-guard)
 pkgdesc="Block systemd-initiated poweroff/reboot/halt until configurable condition checks pass"
 url=https://github.com/stephanritscher/reboot-guard
-pkgver=1.0.1-6
+pkgver=1.0.1-7
 timestamp=2020-05-04T06:16Z
 section="devel"
 maintainer="Eeems <eeems@eeems.email>"
@@ -34,8 +34,13 @@ configure() {
 }
 
 preremove() {
-    if systemctl list-units --full -all | grep -Fq 'rguard.service'; then
-        systemctl disable --now rguard
+    if is-active rguard.service; then
+        echo "Stopping rguard.service"
+        systemctl stop rguard.service
+    fi
+    if is-enabled rguard.service; then
+        echo "Disabling rguard.service"
+        systemctl disable rguard.service
     fi
 }
 

From 5fc766dc54453cf7e4c5d5e77c8d79f4d78208b8 Mon Sep 17 00:00:00 2001
From: Nathaniel van Diepen <Eeems@users.noreply.github.com>
Date: Sun, 12 Nov 2023 11:36:44 -0700
Subject: [PATCH 5/9] Add splashscreens and backup/restore on changescreen
 install/remove (#724)

* Add splashscreens and backup/restore on changescreen install/remove

* Only backup if splashscreens are missing

* update docs
---
 docs/package.md                           |   1 +
 package/{rmscreens => changescrn}/package |  12 +-
 package/splashcreens-wavy-lines/package   |  50 ++
 package/splashscreens-1094/package        | 118 ++++
 package/splashscreens/package             | 705 ++++++++++++++++++++++
 5 files changed, 885 insertions(+), 1 deletion(-)
 rename package/{rmscreens => changescrn}/package (74%)
 create mode 100644 package/splashcreens-wavy-lines/package
 create mode 100644 package/splashscreens-1094/package
 create mode 100644 package/splashscreens/package

diff --git a/docs/package.md b/docs/package.md
index fcd9690a4..a8d56526e 100644
--- a/docs/package.md
+++ b/docs/package.md
@@ -328,6 +328,7 @@ math            | Apps to assist the user in performing mathematical tasks.
 readers         | Apps for reading and annotating documents (PDF, EPUB, …).
 screensharing   | Apps for streaming the display between the PC and tablet.
 templates       | Templates for xochitl notebooks.
+splashscreens   | Splashscreens for device startup, poweroff, suspend, etc.
 utils           | System tools and various apps.
 
 If the package does not fit into one of the existing sections, you are free to create a new one and document it here.
diff --git a/package/rmscreens/package b/package/changescrn/package
similarity index 74%
rename from package/rmscreens/package
rename to package/changescrn/package
index a2670ea70..f45f98023 100644
--- a/package/rmscreens/package
+++ b/package/changescrn/package
@@ -5,7 +5,7 @@
 pkgnames=(changescrn)
 pkgdesc="Change sleep/suspend/poweroff/reboot screens"
 url=https://github.com/pr0fsmith/rMscreens/
-pkgver=1.0.0-1
+pkgver=1.0.0-2
 timestamp=2022-03-15T01:28:33Z
 section="utils"
 maintainer="pr0fsmith <evon_smith@yahoo.ca>"
@@ -17,3 +17,13 @@ sha256sums=(3c2e8b0952d848d7326c0a4ce45da625dd7fd0fbc6b564a2d40c3b97015138e3)
 package() {
     install -Dm755 "$srcdir"/changescrn "$pkgdir/opt/bin/changescrn"
 }
+
+configure() {
+    if [ ! -d /opt/usr/share/backupscrns ] || [ -z "$(ls -A /opt/usr/share/backupscrns)" ]; then
+        changescrn -b
+    fi
+}
+
+preremove() {
+    changescrn -r all
+}
diff --git a/package/splashcreens-wavy-lines/package b/package/splashcreens-wavy-lines/package
new file mode 100644
index 000000000..86ed7f77d
--- /dev/null
+++ b/package/splashcreens-wavy-lines/package
@@ -0,0 +1,50 @@
+#!/usr/bin/env bash
+# Copyright (c) 2023 The Toltec Contributors
+# SPDX-License-Identifier: MIT
+
+pkgnames=(
+    splashscreen-starting-wavey-lines
+    splashscreen-suspended-wavey-lines
+)
+url=https://github.com/EnglishLFC/reMarkable
+pkgver=0.0.0-1
+timestamp=2021-03-19T18:46:40Z
+section="splashscreens"
+maintainer="Eeems <eeems@eeems.email>"
+license=BSD-2-Clause
+installdepends=(changescrn)
+
+source=("https://github.com/EnglishLFC/reMarkable/archive/a06b10ea9f28c784e6941085a30944c0489450f4.zip")
+sha256sums=(ec5f0321342bf6b48bb1431f4b1cf4416c37681879b3ec6c9375f889077a0b7f)
+
+splashscreen-starting-wavey-lines() {
+    pkgdesc="Barnsley Fern battery empty splashscreen"
+    replaces=("splashscreen-starting")
+    conflicts=("splashscreen-starting")
+    package() {
+        install -D -m 755 -T "$srcdir"/splash/splash.png \
+            "$pkgdir"/opt/share/remarkable/splashscreens/starting.png
+    }
+    configure() {
+        changescrn -c starting /opt/share/remarkable/splashscreens/starting.png
+    }
+    postremove() {
+        changescrn -r starting
+    }
+}
+
+splashscreen-suspended-wavey-lines() {
+    pkgdesc="Barnsley Fern power off splashscreen"
+    replaces=("splashscreen-suspended")
+    conflicts=("splashscreen-suspended")
+    package() {
+        install -D -m 755 -t "$pkgdir"/opt/share/remarkable/splashscreens \
+            "$srcdir"/splash/suspended.png
+    }
+    configure() {
+        changescrn -c suspended /opt/share/remarkable/splashscreens/suspended.png
+    }
+    postremove() {
+        changescrn -r suspended
+    }
+}
diff --git a/package/splashscreens-1094/package b/package/splashscreens-1094/package
new file mode 100644
index 000000000..12c395643
--- /dev/null
+++ b/package/splashscreens-1094/package
@@ -0,0 +1,118 @@
+#!/usr/bin/env bash
+# Copyright (c) 2023 The Toltec Contributors
+# SPDX-License-Identifier: MIT
+
+pkgnames=(
+    splashscreen-poweroff-gallifreyan
+    splashscreen-suspended-gallifreyan
+    splashscreen-suspended-gallifreyan-dark
+    splashscreen-starting-gallifreyan
+    splashscreen-suspended-gallifreyan-2
+    splashscreen-suspended-flower-pause
+)
+url=https://github.com/1094/rM-customizations
+pkgver=0.0.0-1
+timestamp=2023-05-15T11:27:58Z
+section="splashscreens"
+maintainer="Eeems <eeems@eeems.email>"
+license=CC-BY-NC-3.0
+installdepends=(changescrn)
+
+source=("https://github.com/1094/rM-customizations/archive/623171a1268e9ff45a8669fa36637e3eabd4ca40.zip")
+sha256sums=(8cc8d02fe04c12bacfc798c1f6737cb55f581f191e2bf54147256df265318a31)
+
+splashscreen-poweroff-gallifreyan() {
+    pkgdesc="Gallifreyan poweroff splashscreen"
+    replaces=("splashscreen-poweroff")
+    conflicts=("splashscreen-poweroff")
+    package() {
+        install -D -m 755 -t "$pkgdir"/opt/share/remarkable/splashscreens \
+            "$srcdir"/splash-screens/gallifreyan/poweroff.png
+    }
+    configure() {
+        changescrn -c poweroff /opt/share/remarkable/splashscreens/poweroff.png
+    }
+    postremove() {
+        changescrn -r poweroff
+    }
+}
+
+splashscreen-suspended-gallifreyan() {
+    pkgdesc="Gallifreyan suspended splashscreen"
+    replaces=("splashscreen-suspended")
+    conflicts=("splashscreen-suspended")
+    package() {
+        install -D -m 755 -T "$srcdir"/splash-screens/gallifreyan/sleeping-v1.png \
+            "$pkgdir"/opt/share/remarkable/splashscreens/suspended.png
+    }
+    configure() {
+        changescrn -c suspended /opt/share/remarkable/splashscreens/suspended.png
+    }
+    postremove() {
+        changescrn -r suspended
+    }
+}
+
+splashscreen-suspended-gallifreyan-dark() {
+    pkgdesc="Gallifreyan dark suspended splashscreen"
+    replaces=("splashscreen-suspended")
+    conflicts=("splashscreen-suspended")
+    package() {
+        install -D -m 755 -T "$srcdir"/splash-screens/gallifreyan/sleeping-v3.png \
+            "$pkgdir"/opt/share/remarkable/splashscreens/suspended.png
+    }
+    configure() {
+        changescrn -c suspended /opt/share/remarkable/splashscreens/suspended.png
+    }
+    postremove() {
+        changescrn -r suspended
+    }
+}
+
+splashscreen-starting-gallifreyan() {
+    pkgdesc="Gallifreyan starting splashscreen"
+    replaces=("splashscreen-starting")
+    conflicts=("splashscreen-starting")
+    package() {
+        install -D -m 755 -t "$pkgdir"/opt/share/remarkable/splashscreens \
+            "$srcdir"/splash-screens/gallifreyan/starting.png
+    }
+    configure() {
+        changescrn -c starting /opt/share/remarkable/splashscreens/starting.png
+    }
+    postremove() {
+        changescrn -r starting
+    }
+}
+
+splashscreen-suspended-gallifreyan-2() {
+    pkgdesc="Gallifreyan suspended splashscreen"
+    replaces=("splashscreen-suspended")
+    conflicts=("splashscreen-suspended")
+    package() {
+        install -D -m 755 -t "$pkgdir"/opt/share/remarkable/splashscreens \
+            "$srcdir"/splash-screens/gallifreyan/suspended.png
+    }
+    configure() {
+        changescrn -c suspended /opt/share/remarkable/splashscreens/suspended.png
+    }
+    postremove() {
+        changescrn -r suspended
+    }
+}
+
+splashscreen-suspended-flower-pause() {
+    pkgdesc="Flower suspended splashscreen"
+    replaces=("splashscreen-suspended")
+    conflicts=("splashscreen-suspended")
+    package() {
+        install -D -m 755 -T "$srcdir"/splash-screens/misc/flower-pause.png \
+            "$pkgdir"/opt/share/remarkable/splashscreens/suspended.png
+    }
+    configure() {
+        changescrn -c suspended /opt/share/remarkable/splashscreens/suspended.png
+    }
+    postremove() {
+        changescrn -r suspended
+    }
+}
diff --git a/package/splashscreens/package b/package/splashscreens/package
new file mode 100644
index 000000000..224311751
--- /dev/null
+++ b/package/splashscreens/package
@@ -0,0 +1,705 @@
+#!/usr/bin/env bash
+# Copyright (c) 2023 The Toltec Contributors
+# SPDX-License-Identifier: MIT
+
+pkgnames=(
+    splashscreen-batteryempty-barnsley_fern
+    splashscreen-poweroff-barnsley_fern
+    splashscreen-starting-barnsley_fern
+    splashscreen-suspended-barnsley_fern
+
+    splashscreen-batteryempty-chaotic_ribbon
+    splashscreen-poweroff-chaotic_ribbon
+    splashscreen-starting-chaotic_ribbon
+    splashscreen-suspended-chaotic_ribbon
+
+    splashscreen-batteryempty-collatz_sea_weed
+    splashscreen-poweroff-collatz_sea_weed
+    splashscreen-starting-collatz_sea_weed
+    splashscreen-suspended-collatz_sea_weed
+
+    splashscreen-batteryempty-dragon_curve
+    splashscreen-poweroff-dragon_curve
+    splashscreen-starting-dragon_curve
+    splashscreen-suspended-dragon_curve
+
+    splashscreen-batteryempty-fire
+    splashscreen-poweroff-fire
+    splashscreen-starting-fire
+    splashscreen-suspended-fire
+
+    splashscreen-batteryempty-fractal_tree
+    splashscreen-poweroff-fractal_tree
+    splashscreen-starting-fractal_tree
+    splashscreen-suspended-fractal_tree
+
+    splashscreen-batteryempty-sacks_spiral
+    splashscreen-poweroff-sacks_spiral
+    splashscreen-starting-sacks_spiral
+    splashscreen-suspended-sacks_spiral
+
+    splashscreen-batteryempty-sierpinski_triangle
+    splashscreen-poweroff-sierpinski_triangle
+    splashscreen-starting-sierpinski_triangle
+    splashscreen-suspended-sierpinski_triangle
+
+    splashscreen-batteryempty-snowy_hills
+    splashscreen-poweroff-snowy_hills
+    splashscreen-starting-snowy_hills
+    splashscreen-suspended-snowy_hills
+
+    splashscreen-batteryempty-starr
+    splashscreen-poweroff-starr
+    splashscreen-starting-starr
+    splashscreen-suspended-starr
+)
+url=https://github.com/engeir/remarkable-splashscreens
+pkgver=0.0.0-1
+timestamp=2023-05-19T06:37:08Z
+section="splashscreens"
+maintainer="Eeems <eeems@eeems.email>"
+license=MIT
+installdepends=(changescrn)
+
+source=("https://github.com/engeir/remarkable-splashscreens/archive/18e2c2a4d1d278240079ff4eb848d5e5255cc3f2.zip")
+sha256sums=(ac49db5539d3901e02b8b94b381bed6a98002371378bf2d4ffa804c80eae0efb)
+
+splashscreen-batteryempty-barnsley_fern() {
+    pkgdesc="Barnsley Fern battery empty splashscreen"
+    replaces=("splashscreen-batteryempty")
+    conflicts=("splashscreen-batteryempty")
+    package() {
+        install -D -m 755 -t "$pkgdir"/opt/share/remarkable/splashscreens \
+            "$srcdir"/splashscreens/barnsley_fern/batteryempty.png
+    }
+    configure() {
+        changescrn -c batteryempty /opt/share/remarkable/splashscreens/batteryempty.png
+    }
+    postremove() {
+        changescrn -r batteryempty
+    }
+}
+
+splashscreen-poweroff-barnsley_fern() {
+    pkgdesc="Barnsley Fern power off splashscreen"
+    replaces=("splashscreen-poweroff")
+    conflicts=("splashscreen-poweroff")
+    package() {
+        install -D -m 755 -t "$pkgdir"/opt/share/remarkable/splashscreens \
+            "$srcdir"/splashscreens/barnsley_fern/poweroff.png
+    }
+    configure() {
+        changescrn -c poweroff /opt/share/remarkable/splashscreens/poweroff.png
+    }
+    postremove() {
+        changescrn -r poweroff
+    }
+}
+
+splashscreen-starting-barnsley_fern() {
+    pkgdesc="Barnsley Fern starting splashscreen"
+    replaces=("splashscreen-starting")
+    conflicts=("splashscreen-starting")
+    package() {
+        install -D -m 755 -t "$pkgdir"/opt/share/remarkable/splashscreens \
+            "$srcdir"/splashscreens/barnsley_fern/starting.png
+    }
+    configure() {
+        changescrn -c starting /opt/share/remarkable/splashscreens/starting.png
+    }
+    postremove() {
+        changescrn -r starting
+    }
+}
+
+splashscreen-suspended-barnsley_fern() {
+    pkgdesc="Barnsley Fern suspended splashscreen"
+    replaces=("splashscreen-suspended")
+    conflicts=("splashscreen-suspended")
+    package() {
+        install -D -m 755 -t "$pkgdir"/opt/share/remarkable/splashscreens \
+            "$srcdir"/splashscreens/barnsley_fern/suspended.png
+    }
+    configure() {
+        changescrn -c suspended /opt/share/remarkable/splashscreens/suspended.png
+    }
+    postremove() {
+        changescrn -r suspended
+    }
+}
+
+splashscreen-batteryempty-chaotic_ribbon() {
+    pkgdesc="Chaotic ribbon battery empty splashscreen"
+    replaces=("splashscreen-batteryempty")
+    conflicts=("splashscreen-batteryempty")
+    package() {
+        install -D -m 755 -t "$pkgdir"/opt/share/remarkable/splashscreens \
+            "$srcdir"/splashscreens/chaotic_ribbon/batteryempty.png
+    }
+    configure() {
+        changescrn -c batteryempty /opt/share/remarkable/splashscreens/batteryempty.png
+    }
+    postremove() {
+        changescrn -r batteryempty
+    }
+}
+
+splashscreen-poweroff-chaotic_ribbon() {
+    pkgdesc="Chaotic ribbon power off splashscreen"
+    replaces=("splashscreen-poweroff")
+    conflicts=("splashscreen-poweroff")
+    package() {
+        install -D -m 755 -t "$pkgdir"/opt/share/remarkable/splashscreens \
+            "$srcdir"/splashscreens/chaotic_ribbon/poweroff.png
+    }
+    configure() {
+        changescrn -c poweroff /opt/share/remarkable/splashscreens/poweroff.png
+    }
+    postremove() {
+        changescrn -r poweroff
+    }
+}
+
+splashscreen-starting-chaotic_ribbon() {
+    pkgdesc="Chaotic ribbon starting splashscreen"
+    replaces=("splashscreen-starting")
+    conflicts=("splashscreen-starting")
+    package() {
+        install -D -m 755 -t "$pkgdir"/opt/share/remarkable/splashscreens \
+            "$srcdir"/splashscreens/chaotic_ribbon/starting.png
+    }
+    configure() {
+        changescrn -c starting /opt/share/remarkable/splashscreens/starting.png
+    }
+    postremove() {
+        changescrn -r starting
+    }
+}
+
+splashscreen-suspended-chaotic_ribbon() {
+    pkgdesc="Chaotic ribbon suspended splashscreen"
+    replaces=("splashscreen-suspended")
+    conflicts=("splashscreen-suspended")
+    package() {
+        install -D -m 755 -t "$pkgdir"/opt/share/remarkable/splashscreens \
+            "$srcdir"/splashscreens/chaotic_ribbon/suspended.png
+    }
+    configure() {
+        changescrn -c suspended /opt/share/remarkable/splashscreens/suspended.png
+    }
+    postremove() {
+        changescrn -r suspended
+    }
+}
+
+splashscreen-batteryempty-collatz_sea_weed() {
+    pkgdesc="Collatz sea weed battery empty splashscreen"
+    replaces=("splashscreen-batteryempty")
+    conflicts=("splashscreen-batteryempty")
+    package() {
+        install -D -m 755 -t "$pkgdir"/opt/share/remarkable/splashscreens \
+            "$srcdir"/splashscreens/collatz_sea_weed/batteryempty.png
+    }
+    configure() {
+        changescrn -c batteryempty /opt/share/remarkable/splashscreens/batteryempty.png
+    }
+    postremove() {
+        changescrn -r batteryempty
+    }
+}
+
+splashscreen-poweroff-collatz_sea_weed() {
+    pkgdesc="Collatz sea weed power off splashscreen"
+    replaces=("splashscreen-poweroff")
+    conflicts=("splashscreen-poweroff")
+    package() {
+        install -D -m 755 -t "$pkgdir"/opt/share/remarkable/splashscreens \
+            "$srcdir"/splashscreens/collatz_sea_weed/poweroff.png
+    }
+    configure() {
+        changescrn -c poweroff /opt/share/remarkable/splashscreens/poweroff.png
+    }
+    postremove() {
+        changescrn -r poweroff
+    }
+}
+
+splashscreen-starting-collatz_sea_weed() {
+    pkgdesc="Collatz sea weed starting splashscreen"
+    replaces=("splashscreen-starting")
+    conflicts=("splashscreen-starting")
+    package() {
+        install -D -m 755 -t "$pkgdir"/opt/share/remarkable/splashscreens \
+            "$srcdir"/splashscreens/collatz_sea_weed/starting.png
+    }
+    configure() {
+        changescrn -c starting /opt/share/remarkable/splashscreens/starting.png
+    }
+    postremove() {
+        changescrn -r starting
+    }
+}
+
+splashscreen-suspended-collatz_sea_weed() {
+    pkgdesc="Collatz sea weed suspended splashscreen"
+    replaces=("splashscreen-suspended")
+    conflicts=("splashscreen-suspended")
+    package() {
+        install -D -m 755 -t "$pkgdir"/opt/share/remarkable/splashscreens \
+            "$srcdir"/splashscreens/collatz_sea_weed/suspended.png
+    }
+    configure() {
+        changescrn -c suspended /opt/share/remarkable/splashscreens/suspended.png
+    }
+    postremove() {
+        changescrn -r suspended
+    }
+}
+
+splashscreen-batteryempty-dragon_curve() {
+    pkgdesc="Dragon curve battery empty splashscreen"
+    replaces=("splashscreen-batteryempty")
+    conflicts=("splashscreen-batteryempty")
+    package() {
+        install -D -m 755 -t "$pkgdir"/opt/share/remarkable/splashscreens \
+            "$srcdir"/splashscreens/dragon_curve/batteryempty.png
+    }
+    configure() {
+        changescrn -c batteryempty /opt/share/remarkable/splashscreens/batteryempty.png
+    }
+    postremove() {
+        changescrn -r batteryempty
+    }
+}
+
+splashscreen-poweroff-dragon_curve() {
+    pkgdesc="Dragon curve power off splashscreen"
+    replaces=("splashscreen-poweroff")
+    conflicts=("splashscreen-poweroff")
+    package() {
+        install -D -m 755 -t "$pkgdir"/opt/share/remarkable/splashscreens \
+            "$srcdir"/splashscreens/dragon_curve/poweroff.png
+    }
+    configure() {
+        changescrn -c poweroff /opt/share/remarkable/splashscreens/poweroff.png
+    }
+    postremove() {
+        changescrn -r poweroff
+    }
+}
+
+splashscreen-starting-dragon_curve() {
+    pkgdesc="Dragon curve starting splashscreen"
+    replaces=("splashscreen-starting")
+    conflicts=("splashscreen-starting")
+    package() {
+        install -D -m 755 -t "$pkgdir"/opt/share/remarkable/splashscreens \
+            "$srcdir"/splashscreens/dragon_curve/starting.png
+    }
+    configure() {
+        changescrn -c starting /opt/share/remarkable/splashscreens/starting.png
+    }
+    postremove() {
+        changescrn -r starting
+    }
+}
+
+splashscreen-suspended-dragon_curve() {
+    pkgdesc="Dragon curve suspended splashscreen"
+    replaces=("splashscreen-suspended")
+    conflicts=("splashscreen-suspended")
+    package() {
+        install -D -m 755 -t "$pkgdir"/opt/share/remarkable/splashscreens \
+            "$srcdir"/splashscreens/dragon_curve/suspended.png
+    }
+    configure() {
+        changescrn -c suspended /opt/share/remarkable/splashscreens/suspended.png
+    }
+    postremove() {
+        changescrn -r suspended
+    }
+}
+
+splashscreen-batteryempty-fire() {
+    pkgdesc="Fire battery empty splashscreen"
+    replaces=("splashscreen-batteryempty")
+    conflicts=("splashscreen-batteryempty")
+    package() {
+        install -D -m 755 -t "$pkgdir"/opt/share/remarkable/splashscreens \
+            "$srcdir"/splashscreens/fire/batteryempty.png
+    }
+    configure() {
+        changescrn -c batteryempty /opt/share/remarkable/splashscreens/batteryempty.png
+    }
+    postremove() {
+        changescrn -r batteryempty
+    }
+}
+
+splashscreen-poweroff-fire() {
+    pkgdesc="Fire power off splashscreen"
+    replaces=("splashscreen-poweroff")
+    conflicts=("splashscreen-poweroff")
+    package() {
+        install -D -m 755 -t "$pkgdir"/opt/share/remarkable/splashscreens \
+            "$srcdir"/splashscreens/fire/poweroff.png
+    }
+    configure() {
+        changescrn -c poweroff /opt/share/remarkable/splashscreens/poweroff.png
+    }
+    postremove() {
+        changescrn -r poweroff
+    }
+}
+
+splashscreen-starting-fire() {
+    pkgdesc="Fire starting splashscreen"
+    replaces=("splashscreen-starting")
+    conflicts=("splashscreen-starting")
+    package() {
+        install -D -m 755 -t "$pkgdir"/opt/share/remarkable/splashscreens \
+            "$srcdir"/splashscreens/fire/starting.png
+    }
+    configure() {
+        changescrn -c starting /opt/share/remarkable/splashscreens/starting.png
+    }
+    postremove() {
+        changescrn -r starting
+    }
+}
+
+splashscreen-suspended-fire() {
+    pkgdesc="Fire suspended splashscreen"
+    replaces=("splashscreen-suspended")
+    conflicts=("splashscreen-suspended")
+    package() {
+        install -D -m 755 -t "$pkgdir"/opt/share/remarkable/splashscreens \
+            "$srcdir"/splashscreens/fire/suspended.png
+    }
+    configure() {
+        changescrn -c suspended /opt/share/remarkable/splashscreens/suspended.png
+    }
+    postremove() {
+        changescrn -r suspended
+    }
+}
+
+splashscreen-batteryempty-fractal_tree() {
+    pkgdesc="Fractal tree battery empty splashscreen"
+    replaces=("splashscreen-batteryempty")
+    conflicts=("splashscreen-batteryempty")
+    package() {
+        install -D -m 755 -t "$pkgdir"/opt/share/remarkable/splashscreens \
+            "$srcdir"/splashscreens/fractal_tree/batteryempty.png
+    }
+    configure() {
+        changescrn -c batteryempty /opt/share/remarkable/splashscreens/batteryempty.png
+    }
+    postremove() {
+        changescrn -r batteryempty
+    }
+}
+
+splashscreen-poweroff-fractal_tree() {
+    pkgdesc="Fractal tree power off splashscreen"
+    replaces=("splashscreen-poweroff")
+    conflicts=("splashscreen-poweroff")
+    package() {
+        install -D -m 755 -t "$pkgdir"/opt/share/remarkable/splashscreens \
+            "$srcdir"/splashscreens/fractal_tree/poweroff.png
+    }
+    configure() {
+        changescrn -c poweroff /opt/share/remarkable/splashscreens/poweroff.png
+    }
+    postremove() {
+        changescrn -r poweroff
+    }
+}
+
+splashscreen-starting-fractal_tree() {
+    pkgdesc="Fractal tree starting splashscreen"
+    replaces=("splashscreen-starting")
+    conflicts=("splashscreen-starting")
+    package() {
+        install -D -m 755 -t "$pkgdir"/opt/share/remarkable/splashscreens \
+            "$srcdir"/splashscreens/fractal_tree/starting.png
+    }
+    configure() {
+        changescrn -c starting /opt/share/remarkable/splashscreens/starting.png
+    }
+    postremove() {
+        changescrn -r starting
+    }
+}
+
+splashscreen-suspended-fractal_tree() {
+    pkgdesc="Fractal tree suspended splashscreen"
+    replaces=("splashscreen-suspended")
+    conflicts=("splashscreen-suspended")
+    package() {
+        install -D -m 755 -t "$pkgdir"/opt/share/remarkable/splashscreens \
+            "$srcdir"/splashscreens/fractal_tree/suspended.png
+    }
+    configure() {
+        changescrn -c suspended /opt/share/remarkable/splashscreens/suspended.png
+    }
+    postremove() {
+        changescrn -r suspended
+    }
+}
+
+splashscreen-batteryempty-sacks_spiral() {
+    pkgdesc="Sacks spiral battery empty splashscreen"
+    replaces=("splashscreen-batteryempty")
+    conflicts=("splashscreen-batteryempty")
+    package() {
+        install -D -m 755 -t "$pkgdir"/opt/share/remarkable/splashscreens \
+            "$srcdir"/splashscreens/sacks_spiral/batteryempty.png
+    }
+    configure() {
+        changescrn -c batteryempty /opt/share/remarkable/splashscreens/batteryempty.png
+    }
+    postremove() {
+        changescrn -r batteryempty
+    }
+}
+
+splashscreen-poweroff-sacks_spiral() {
+    pkgdesc="Sacks spiral power off splashscreen"
+    replaces=("splashscreen-poweroff")
+    conflicts=("splashscreen-poweroff")
+    package() {
+        install -D -m 755 -t "$pkgdir"/opt/share/remarkable/splashscreens \
+            "$srcdir"/splashscreens/sacks_spiral/poweroff.png
+    }
+    configure() {
+        changescrn -c poweroff /opt/share/remarkable/splashscreens/poweroff.png
+    }
+    postremove() {
+        changescrn -r poweroff
+    }
+}
+
+splashscreen-starting-sacks_spiral() {
+    pkgdesc="Sacks spiral starting splashscreen"
+    replaces=("splashscreen-starting")
+    conflicts=("splashscreen-starting")
+    package() {
+        install -D -m 755 -t "$pkgdir"/opt/share/remarkable/splashscreens \
+            "$srcdir"/splashscreens/sacks_spiral/starting.png
+    }
+    configure() {
+        changescrn -c starting /opt/share/remarkable/splashscreens/starting.png
+    }
+    postremove() {
+        changescrn -r starting
+    }
+}
+
+splashscreen-suspended-sacks_spiral() {
+    pkgdesc="Sacks spiral suspended splashscreen"
+    replaces=("splashscreen-suspended")
+    conflicts=("splashscreen-suspended")
+    package() {
+        install -D -m 755 -t "$pkgdir"/opt/share/remarkable/splashscreens \
+            "$srcdir"/splashscreens/sacks_spiral/suspended.png
+    }
+    configure() {
+        changescrn -c suspended /opt/share/remarkable/splashscreens/suspended.png
+    }
+    postremove() {
+        changescrn -r suspended
+    }
+}
+
+splashscreen-batteryempty-sierpinski_triangle() {
+    pkgdesc="Sierpinski triangle battery empty splashscreen"
+    replaces=("splashscreen-batteryempty")
+    conflicts=("splashscreen-batteryempty")
+    package() {
+        install -D -m 755 -t "$pkgdir"/opt/share/remarkable/splashscreens \
+            "$srcdir"/splashscreens/sierpinski_triangle/batteryempty.png
+    }
+    configure() {
+        changescrn -c batteryempty /opt/share/remarkable/splashscreens/batteryempty.png
+    }
+    postremove() {
+        changescrn -r batteryempty
+    }
+}
+
+splashscreen-poweroff-sierpinski_triangle() {
+    pkgdesc="Sierpinski triangle power off splashscreen"
+    replaces=("splashscreen-poweroff")
+    conflicts=("splashscreen-poweroff")
+    package() {
+        install -D -m 755 -t "$pkgdir"/opt/share/remarkable/splashscreens \
+            "$srcdir"/splashscreens/sierpinski_triangle/poweroff.png
+    }
+    configure() {
+        changescrn -c poweroff /opt/share/remarkable/splashscreens/poweroff.png
+    }
+    postremove() {
+        changescrn -r poweroff
+    }
+}
+
+splashscreen-starting-sierpinski_triangle() {
+    pkgdesc="Sierpinski triangle starting splashscreen"
+    replaces=("splashscreen-starting")
+    conflicts=("splashscreen-starting")
+    package() {
+        install -D -m 755 -t "$pkgdir"/opt/share/remarkable/splashscreens \
+            "$srcdir"/splashscreens/sierpinski_triangle/starting.png
+    }
+    configure() {
+        changescrn -c starting /opt/share/remarkable/splashscreens/starting.png
+    }
+    postremove() {
+        changescrn -r starting
+    }
+}
+
+splashscreen-suspended-sierpinski_triangle() {
+    pkgdesc="Sierpinski triangle suspended splashscreen"
+    replaces=("splashscreen-suspended")
+    conflicts=("splashscreen-suspended")
+    package() {
+        install -D -m 755 -t "$pkgdir"/opt/share/remarkable/splashscreens \
+            "$srcdir"/splashscreens/sierpinski_triangle/suspended.png
+    }
+    configure() {
+        changescrn -c suspended /opt/share/remarkable/splashscreens/suspended.png
+    }
+    postremove() {
+        changescrn -r suspended
+    }
+}
+
+splashscreen-batteryempty-snowy_hills() {
+    pkgdesc="Snowy hills battery empty splashscreen"
+    replaces=("splashscreen-batteryempty")
+    conflicts=("splashscreen-batteryempty")
+    package() {
+        install -D -m 755 -t "$pkgdir"/opt/share/remarkable/splashscreens \
+            "$srcdir"/splashscreens/snowy_hills/batteryempty.png
+    }
+    configure() {
+        changescrn -c batteryempty /opt/share/remarkable/splashscreens/batteryempty.png
+    }
+    postremove() {
+        changescrn -r batteryempty
+    }
+}
+
+splashscreen-poweroff-snowy_hills() {
+    pkgdesc="Snowy hills power off splashscreen"
+    replaces=("splashscreen-poweroff")
+    conflicts=("splashscreen-poweroff")
+    package() {
+        install -D -m 755 -t "$pkgdir"/opt/share/remarkable/splashscreens \
+            "$srcdir"/splashscreens/snowy_hills/poweroff.png
+    }
+    configure() {
+        changescrn -c poweroff /opt/share/remarkable/splashscreens/poweroff.png
+    }
+    postremove() {
+        changescrn -r poweroff
+    }
+}
+
+splashscreen-starting-snowy_hills() {
+    pkgdesc="Snowy hills starting splashscreen"
+    replaces=("splashscreen-starting")
+    conflicts=("splashscreen-starting")
+    package() {
+        install -D -m 755 -t "$pkgdir"/opt/share/remarkable/splashscreens \
+            "$srcdir"/splashscreens/snowy_hills/starting.png
+    }
+    configure() {
+        changescrn -c starting /opt/share/remarkable/splashscreens/starting.png
+    }
+    postremove() {
+        changescrn -r starting
+    }
+}
+
+splashscreen-suspended-snowy_hills() {
+    pkgdesc="Snowy hills suspended splashscreen"
+    replaces=("splashscreen-suspended")
+    conflicts=("splashscreen-suspended")
+    package() {
+        install -D -m 755 -t "$pkgdir"/opt/share/remarkable/splashscreens \
+            "$srcdir"/splashscreens/snowy_hills/suspended.png
+    }
+    configure() {
+        changescrn -c suspended /opt/share/remarkable/splashscreens/suspended.png
+    }
+    postremove() {
+        changescrn -r suspended
+    }
+}
+
+splashscreen-batteryempty-starr() {
+    pkgdesc="Starr battery empty splashscreen"
+    replaces=("splashscreen-batteryempty")
+    conflicts=("splashscreen-batteryempty")
+    package() {
+        install -D -m 755 -t "$pkgdir"/opt/share/remarkable/splashscreens \
+            "$srcdir"/splashscreens/starr/batteryempty.png
+    }
+    configure() {
+        changescrn -c batteryempty /opt/share/remarkable/splashscreens/batteryempty.png
+    }
+    postremove() {
+        changescrn -r batteryempty
+    }
+}
+
+splashscreen-poweroff-starr() {
+    pkgdesc="Starr power off splashscreen"
+    replaces=("splashscreen-poweroff")
+    conflicts=("splashscreen-poweroff")
+    package() {
+        install -D -m 755 -t "$pkgdir"/opt/share/remarkable/splashscreens \
+            "$srcdir"/splashscreens/starr/poweroff.png
+    }
+    configure() {
+        changescrn -c poweroff /opt/share/remarkable/splashscreens/poweroff.png
+    }
+    postremove() {
+        changescrn -r poweroff
+    }
+}
+
+splashscreen-starting-starr() {
+    pkgdesc="Starr starting splashscreen"
+    replaces=("splashscreen-starting")
+    conflicts=("splashscreen-starting")
+    package() {
+        install -D -m 755 -t "$pkgdir"/opt/share/remarkable/splashscreens \
+            "$srcdir"/splashscreens/starr/starting.png
+    }
+    configure() {
+        changescrn -c starting /opt/share/remarkable/splashscreens/starting.png
+    }
+    postremove() {
+        changescrn -r starting
+    }
+}
+
+splashscreen-suspended-starr() {
+    pkgdesc="Starr suspended splashscreen"
+    replaces=("splashscreen-suspended")
+    conflicts=("splashscreen-suspended")
+    package() {
+        install -D -m 755 -t "$pkgdir"/opt/share/remarkable/splashscreens \
+            "$srcdir"/splashscreens/starr/suspended.png
+    }
+    configure() {
+        changescrn -c suspended /opt/share/remarkable/splashscreens/suspended.png
+    }
+    postremove() {
+        changescrn -r suspended
+    }
+}

From ee79e99bfd348f5b414fbad59b76e56fa91c420b Mon Sep 17 00:00:00 2001
From: Nathaniel van Diepen <Eeems@users.noreply.github.com>
Date: Thu, 23 Nov 2023 14:01:40 -0700
Subject: [PATCH 6/9] Call update-desktop-database to refresh Oxide's
 application cache on install (#700)

* Update oxide to v2.6

* Style fixes

* Add missing pkgnames

* Update image paths

* Fix liboxide path

* Don't check to see if tarnish is active

update-desktop-database safely handles tarnish not running.

* update-desktop-database for all applicaitons

* Update build image for plato

* Re-trigger CI

Most likely a one-off error: Timeout when connecting to github

* Update to latest image for zoneinfo-utils

* Add libc6 build dependency to zoneinfo-utils

* Revert all changes to zoneinfo-utils

* Update all packages to use install-lib method

* Fix formatting

* Also run oxide hook for draft apps

* Remove manual reload-oxide-apps calls

* Bump all other packages that have draft/oxide files

* Format fixes

* Add back missing documentation change

* Don't update whiteboard-hypercard

This package is failing to build

* Revert folly version

* Bump whiteboard-hypercard now that the build is fixed

* Bump xochitl version number

* Use github for KOReader release

---------

Co-authored-by: Linus <linus@cosmos-ink.net>
Co-authored-by: Jayy001 <56607897+Jayy001@users.noreply.github.com>
---
 docs/package.md                      |  9 +++++++++
 package/calculator/package           |  2 +-
 package/chessmarkable/package        |  2 +-
 package/doomarkable/package          |  2 +-
 package/fingerterm/package           |  2 +-
 package/keywriter/package            |  2 +-
 package/koreader/package             |  4 ++--
 package/netsurf/package              |  2 +-
 package/oxide/package                | 19 -------------------
 package/plato/package                |  2 +-
 package/puzzles/package              |  2 +-
 package/recrossable/package          |  2 +-
 package/regenda/package              |  2 +-
 package/reterm/package               |  8 +-------
 package/retris/package               |  2 +-
 package/rmfm/package                 |  2 +-
 package/rmkit/package                | 15 ++++++---------
 package/sill/package                 |  2 +-
 package/tilem/package                |  2 +-
 package/vnsee/package                |  2 +-
 package/whiteboard-hypercard/package |  2 +-
 package/wikipedia/package            |  2 +-
 package/xochitl/package              |  2 +-
 package/yaft/package                 |  2 +-
 package/zshelf/package               |  2 +-
 scripts/install-lib                  | 12 ++++++++++--
 scripts/toltec/builder.py            |  4 +++-
 27 files changed, 51 insertions(+), 60 deletions(-)

diff --git a/docs/package.md b/docs/package.md
index a8d56526e..1342df0ac 100644
--- a/docs/package.md
+++ b/docs/package.md
@@ -440,3 +440,12 @@ When upgrading a package from version A to B, the following happens:
 * `postupgrade B`, if it exists, is called from version A
 * New package files are unpacked and installed
 * `configure`, if it exists, is called from version B
+
+
+### reload-oxide-apps hook
+
+If a package contains one or more files in `/opt/etc/draft` or `/opt/usr/share/applications` the `reload-oxide-apps` method in `install-lib` will be appended to the following:
+
+* `configure`
+* `postupgrade`
+* `postremove`
diff --git a/package/calculator/package b/package/calculator/package
index 072063a15..092ef00d6 100644
--- a/package/calculator/package
+++ b/package/calculator/package
@@ -5,7 +5,7 @@
 pkgnames=(calculator)
 pkgdesc="Touch-based calculator"
 url=https://github.com/reHackable/Calculator
-pkgver=0.0.0-15
+pkgver=0.0.0-16
 timestamp=2020-08-20T12:28Z
 section="math"
 maintainer="Mattéo Delabre <spam@delab.re>"
diff --git a/package/chessmarkable/package b/package/chessmarkable/package
index f8a4b50bd..6258ab355 100644
--- a/package/chessmarkable/package
+++ b/package/chessmarkable/package
@@ -5,7 +5,7 @@
 pkgnames=(chessmarkable)
 pkgdesc="Chess game"
 url=https://github.com/LinusCDE/chessmarkable
-pkgver=0.8.0-1
+pkgver=0.8.0-2
 timestamp=2021-07-22T12:04Z
 section="games"
 maintainer="Linus K. <linus@cosmos-ink.net>"
diff --git a/package/doomarkable/package b/package/doomarkable/package
index 14863079f..3e5ae8735 100644
--- a/package/doomarkable/package
+++ b/package/doomarkable/package
@@ -5,7 +5,7 @@
 pkgnames=(doomarkable)
 pkgdesc="DOOM game"
 url=https://github.com/LinusCDE/doomarkable
-pkgver=0.4.1-1
+pkgver=0.4.1-2
 timestamp=2021-10-31T16:15Z
 section="games"
 maintainer="Linus K. <linus@cosmos-ink.net>"
diff --git a/package/fingerterm/package b/package/fingerterm/package
index 03dc4956e..80a8ea8e7 100644
--- a/package/fingerterm/package
+++ b/package/fingerterm/package
@@ -5,7 +5,7 @@
 pkgnames=(fingerterm)
 pkgdesc="Terminal emulator with an on-screen touch keyboard"
 url=https://github.com/dixonary/fingerterm-reMarkable
-pkgver=1.3.5-14
+pkgver=1.3.5-15
 timestamp=2020-10-27T12:02Z
 section="admin"
 maintainer="Mattéo Delabre <spam@delab.re>"
diff --git a/package/keywriter/package b/package/keywriter/package
index 542a6359d..32ab6d891 100644
--- a/package/keywriter/package
+++ b/package/keywriter/package
@@ -5,7 +5,7 @@
 pkgnames=(keywriter)
 pkgdesc="Markdown-enabled free writing app"
 url=https://github.com/dps/remarkable-keywriter
-pkgver=0.2~20-gddc9e73-1
+pkgver=0.2~20-gddc9e73-2
 timestamp=2022-02-09T07:05:03Z
 section="writing"
 maintainer="Mattéo Delabre <spam@delab.re>"
diff --git a/package/koreader/package b/package/koreader/package
index 09a02d6e2..79e03cdc7 100644
--- a/package/koreader/package
+++ b/package/koreader/package
@@ -5,7 +5,7 @@
 pkgnames=(koreader)
 pkgdesc="Ebook reader supporting PDF, DjVu, EPUB, FB2 and many more formats"
 url=https://github.com/koreader/koreader
-pkgver=2023.08-1
+pkgver=2023.08-2
 timestamp=2023-08-29T16:21:01Z
 section="readers"
 maintainer="raisjn <of.raisjn@gmail.com>"
@@ -14,7 +14,7 @@ installdepends=(fbink fbdepth display rm2fb-client)
 
 _srcver="v${pkgver%-*}"
 source=(
-    "https://build.koreader.rocks/download/stable/$_srcver/koreader-remarkable-$_srcver.zip"
+    "https://github.com/koreader/koreader/releases/download/$_srcver/koreader-remarkable-$_srcver.zip"
     koreader.draft
     KOReader.oxide
     koreader-toltec.service
diff --git a/package/netsurf/package b/package/netsurf/package
index 8213b73fb..74d427851 100644
--- a/package/netsurf/package
+++ b/package/netsurf/package
@@ -5,7 +5,7 @@
 pkgnames=(netsurf)
 pkgdesc="Lightweight web browser"
 url=https://github.com/alex0809/netsurf-reMarkable
-pkgver=0.4.0-2
+pkgver=0.4.0-3
 timestamp=2021-05-31T11:15+00:00
 maintainer="Alex Friesenhahn <rm-dev@alexfriesenhahn.de>"
 archs=(rmall)
diff --git a/package/oxide/package b/package/oxide/package
index 1db608f78..993d16996 100644
--- a/package/oxide/package
+++ b/package/oxide/package
@@ -49,10 +49,6 @@ fret() {
         install -D -m 755 -t "$pkgdir"/opt/bin "$srcdir"/release/opt/bin/fret
         install -D -m 644 -t "$pkgdir"/opt/usr/share/applications "$srcdir"/release/opt/usr/share/applications/codes.eeems.fret.oxide
     }
-
-    configure() {
-        update-desktop-database
-    }
 }
 
 oxide() {
@@ -66,9 +62,6 @@ oxide() {
         install -D -m 644 -t "$pkgdir"/opt/usr/share/applications "$srcdir"/release/opt/usr/share/applications/codes.eeems.oxide.oxide
         install -D -m 644 -t "$pkgdir"/opt/usr/share/icons/oxide/702x702/splash "$srcdir"/release/opt/usr/share/icons/oxide/702x702/splash/oxide.png
     }
-    configure() {
-        update-desktop-database
-    }
 }
 
 rot() {
@@ -128,10 +121,6 @@ decay() {
         install -D -m 755 -t "$pkgdir"/opt/bin "$srcdir"/release/opt/bin/decay
         install -D -m 644 -t "$pkgdir"/opt/usr/share/applications "$srcdir"/release/opt/usr/share/applications/codes.eeems.decay.oxide
     }
-
-    configure() {
-        update-desktop-database
-    }
 }
 corrupt() {
     pkgdesc="Task Switcher for Oxide"
@@ -142,10 +131,6 @@ corrupt() {
         install -D -m 755 -t "$pkgdir"/opt/bin "$srcdir"/release/opt/bin/corrupt
         install -D -m 644 -t "$pkgdir"/opt/usr/share/applications "$srcdir"/release/opt/usr/share/applications/codes.eeems.corrupt.oxide
     }
-
-    configure() {
-        update-desktop-database
-    }
 }
 
 anxiety() {
@@ -159,10 +144,6 @@ anxiety() {
         install -D -m 644 -t "$pkgdir"/opt/usr/share/icons/oxide/48x48/apps "$srcdir"/release/opt/usr/share/icons/oxide/48x48/apps/image.png
         install -D -m 644 -t "$pkgdir"/opt/usr/share/icons/oxide/702x702/splash "$srcdir"/release/opt/usr/share/icons/oxide/702x702/splash/anxiety.png
     }
-
-    configure() {
-        update-desktop-database
-    }
 }
 
 oxide-utils() {
diff --git a/package/plato/package b/package/plato/package
index 45ddcacd3..c58215fcd 100644
--- a/package/plato/package
+++ b/package/plato/package
@@ -5,7 +5,7 @@
 pkgnames=(plato)
 pkgdesc="Document reader"
 url=https://github.com/LinusCDE/plato
-pkgver=0.9.34-1
+pkgver=0.9.34-2
 timestamp=2023-03-08T17:58Z
 section="readers"
 maintainer="Linus K. <linus@cosmos-ink.net>"
diff --git a/package/puzzles/package b/package/puzzles/package
index c8be2ea79..3af1b64d3 100644
--- a/package/puzzles/package
+++ b/package/puzzles/package
@@ -5,7 +5,7 @@
 pkgnames=(puzzles)
 timestamp=2021-03-04T14:03-08:00
 maintainer="Mattéo Delabre <spam@delab.re>"
-pkgver=0.2.2-3
+pkgver=0.2.2-4
 license=MIT
 pkgdesc="Simon Tatham's Puzzle Package"
 url="https://github.com/mrichards42/remarkable_puzzles"
diff --git a/package/recrossable/package b/package/recrossable/package
index 7b191353b..476b87bef 100644
--- a/package/recrossable/package
+++ b/package/recrossable/package
@@ -5,7 +5,7 @@
 pkgnames=(recrossable)
 pkgdesc="Solve crossword puzzles"
 url=https://github.com/sandsmark/recrossable
-pkgver=0.0.0-7
+pkgver=0.0.0-8
 timestamp=2021-01-15T12:58:22Z
 section="games"
 maintainer="Mattéo Delabre <spam@delab.re>"
diff --git a/package/regenda/package b/package/regenda/package
index e899d531e..1f2b48c9b 100644
--- a/package/regenda/package
+++ b/package/regenda/package
@@ -5,7 +5,7 @@
 pkgnames=(regenda)
 pkgdesc="Caldav agenda app"
 url=https://github.com/tenJirka/reGenda
-pkgver=0.0.2-1
+pkgver=0.0.2-2
 timestamp=2023-09-06T06:45Z
 section="utils"
 maintainer="tenJirka <jirka.steh@gmail.com>"
diff --git a/package/reterm/package b/package/reterm/package
index a0a37a6d2..f8dee0995 100644
--- a/package/reterm/package
+++ b/package/reterm/package
@@ -4,7 +4,7 @@
 pkgnames=(reterm)
 pkgdesc="Landscape terminal support for the Remarkable 2 + type cover"
 section="admin"
-pkgver="20230628.1927-1"
+pkgver="20230628.1927-2"
 timestamp="2023-06-28T19:28:06Z"
 maintainer="Eeems <eeems@eeems.email>"
 url="https://github.com/i-am-shodan/ReTerm"
@@ -49,9 +49,3 @@ package() {
     install -D -m 644 -t "$pkgdir"/opt/etc/draft/icons "$srcdir"/draft/reterm.png
     install -D -m 644 -t "$pkgdir"/opt/usr/share/applications "$srcdir"/oxide/reterm.oxide
 }
-
-configure() {
-    if is-active "tarnish.service"; then
-        type update-desktop-database &> /dev/null && update-desktop-database
-    fi
-}
diff --git a/package/retris/package b/package/retris/package
index 173b5d8ba..db8a00839 100644
--- a/package/retris/package
+++ b/package/retris/package
@@ -5,7 +5,7 @@
 pkgnames=(retris)
 pkgdesc="Tetris game"
 url=https://github.com/LinusCDE/retris
-pkgver=0.6.3-3
+pkgver=0.6.3-4
 timestamp=2021-01-30T02:41Z
 section="games"
 maintainer="Linus K. <linus@cosmos-ink.net>"
diff --git a/package/rmfm/package b/package/rmfm/package
index ffec3e72b..aeeb76484 100644
--- a/package/rmfm/package
+++ b/package/rmfm/package
@@ -5,7 +5,7 @@
 pkgnames=(rmfm)
 pkgdesc="Bare-bones file manager using Node.js and sas"
 url="https://forgejo.sny.sh/sun/rmFM"
-pkgver=1.5.0-1
+pkgver=1.5.0-2
 timestamp=2023-08-08T22:19:23+02:00
 section=utils
 maintainer="Sunny <sunny@sny.sh>"
diff --git a/package/rmkit/package b/package/rmkit/package
index 9c5cda508..be1585793 100644
--- a/package/rmkit/package
+++ b/package/rmkit/package
@@ -40,14 +40,13 @@ bufshot() {
 dumbskull() {
     pkgdesc="Dungeon Crawl themed Solitaire"
     url="https://rmkit.dev/apps/dumbskull"
-    pkgver=0.0.1-2
+    pkgver=0.0.1-3
     section="games"
 
     package() {
         install -D -m 755 "$srcdir"/src/build/dumbskull "$pkgdir"/opt/bin/dumbskull
         install -D -m 644 "$srcdir"/src/dumbskull/dumbskull.draft "$pkgdir"/opt/etc/draft/dumbskull.draft
     }
-
 }
 
 genie() {
@@ -80,7 +79,7 @@ genie() {
 harmony() {
     pkgdesc="Procedural sketching app"
     url="https://rmkit.dev/apps/harmony"
-    pkgver=0.2.2-1
+    pkgver=0.2.2-2
     section="drawing"
 
     package() {
@@ -120,7 +119,7 @@ lamp() {
 mines() {
     pkgdesc="Mine detection game"
     url="https://rmkit.dev/apps/minesweeper"
-    pkgver=0.1.4-2
+    pkgver=0.1.4-3
     section="games"
 
     package() {
@@ -133,7 +132,7 @@ mines() {
 nao() {
     pkgdesc="Nao Package Manager: opkg UI built with SAS"
     url="https://rmkit.dev/apps/nao"
-    pkgver=0.1.2-3
+    pkgver=0.1.2-4
     section="admin"
     installdepends+=(simple)
 
@@ -179,7 +178,7 @@ remux() {
 rpncalc() {
     pkgdesc="RPN Calculator"
     url="https://rmkit.dev/apps/rpncalc"
-    pkgver=0.0.3-2
+    pkgver=0.0.3-3
     section="math"
 
     package() {
@@ -187,7 +186,6 @@ rpncalc() {
         install -D -m 644 "$srcdir"/src/rpncalc/rpncalc.draft "$pkgdir"/opt/etc/draft/rpncalc.draft
         install -D -m 644 "$srcdir"/src/rpncalc/rpncalc.png "$pkgdir"/opt/etc/draft/icons/rpncalc.png
     }
-
 }
 
 simple() {
@@ -204,12 +202,11 @@ simple() {
 wordlet() {
     pkgdesc="Wordle clone"
     url="https://rmkit.dev/apps/wordlet"
-    pkgver=0.0.2-2
+    pkgver=0.0.2-3
     section="games"
 
     package() {
         install -D -m 755 "$srcdir"/src/build/wordlet "$pkgdir"/opt/bin/wordlet
         install -D -m 644 "$srcdir"/src/wordlet/wordlet.draft "$pkgdir"/opt/etc/draft/wordlet.draft
     }
-
 }
diff --git a/package/sill/package b/package/sill/package
index 773f1e33a..f34ee5fe2 100644
--- a/package/sill/package
+++ b/package/sill/package
@@ -5,7 +5,7 @@
 pkgnames=(sill)
 pkgdesc="Gesture-based text editor (and shell) for the reMarkable tablet"
 url=https://github.com/bkirwi/sill
-pkgver=0.1.1-alpha
+pkgver=0.1.1-1
 section="writing"
 timestamp=2023-08-12T00:00Z
 maintainer="Kai <z@kwi.li>"
diff --git a/package/tilem/package b/package/tilem/package
index 436678c87..0c5b954f3 100644
--- a/package/tilem/package
+++ b/package/tilem/package
@@ -5,7 +5,7 @@
 pkgnames=(tilem)
 pkgdesc="TI-84+ calculator emulator"
 url=https://github.com/timower/rM2-stuff/tree/master/apps/tilem
-pkgver=0.0.7-2
+pkgver=0.0.7-3
 timestamp=2021-04-30T10:42Z
 maintainer="Mattéo Delabre <spam@delab.re>"
 license=GPL-3.0
diff --git a/package/vnsee/package b/package/vnsee/package
index 4ed1a8b1c..057220d0c 100644
--- a/package/vnsee/package
+++ b/package/vnsee/package
@@ -5,7 +5,7 @@
 pkgnames=(vnsee)
 pkgdesc="VNC client allowing you to use the device as a second screen"
 url=https://github.com/matteodelabre/vnsee
-pkgver=0.4.1-1
+pkgver=0.4.1-2
 timestamp=2021-08-29T13:45:26Z
 section="screensharing"
 maintainer="Mattéo Delabre <spam@delab.re>"
diff --git a/package/whiteboard-hypercard/package b/package/whiteboard-hypercard/package
index 2ae9a746d..581882d83 100644
--- a/package/whiteboard-hypercard/package
+++ b/package/whiteboard-hypercard/package
@@ -5,7 +5,7 @@
 pkgnames=(whiteboard-hypercard)
 pkgdesc="Real-time collaboration, drawing or whiteboarding"
 url=https://github.com/fenollp/reMarkable-tools
-pkgver=0.3.7-1
+pkgver=0.3.7-2
 timestamp=2023-10-11T12:57Z
 section="drawing"
 maintainer="Pierre Fenoll <pierrefenoll@gmail.com>"
diff --git a/package/wikipedia/package b/package/wikipedia/package
index a7c44adf6..a03eb4d22 100644
--- a/package/wikipedia/package
+++ b/package/wikipedia/package
@@ -5,7 +5,7 @@
 pkgnames=(wikipedia)
 pkgdesc="The free encyclopedia"
 url=https://github.com/dps/remarkable-wikipedia
-pkgver=0.1.0-3
+pkgver=0.1.0-4
 timestamp=2021-03-11T04:50Z
 section="readers"
 maintainer="David Singleton <david@singleton.io>"
diff --git a/package/xochitl/package b/package/xochitl/package
index 1aa004a27..1841988bf 100644
--- a/package/xochitl/package
+++ b/package/xochitl/package
@@ -5,7 +5,7 @@
 pkgnames=(xochitl)
 pkgdesc="Read documents and take notes"
 url=https://remarkable.com
-pkgver=0.0.0-15
+pkgver=0.0.0-16
 timestamp=2022-11-07T20:19:57Z
 section="readers"
 maintainer="Mattéo Delabre <spam@delab.re>"
diff --git a/package/yaft/package b/package/yaft/package
index a08ab32d0..8a94a0946 100644
--- a/package/yaft/package
+++ b/package/yaft/package
@@ -6,7 +6,7 @@ pkgnames=(yaft)
 pkgdesc="Yet another framebuffer terminal"
 url=https://github.com/timower/rM2-stuff/tree/master/apps/yaft
 _tag=0.0.10
-pkgver=${_tag}-1
+pkgver=${_tag}-2
 timestamp=2023-08-12T14:31Z
 maintainer="Mattéo Delabre <spam@delab.re>"
 license=GPL-3.0
diff --git a/package/zshelf/package b/package/zshelf/package
index bd1491464..0562ac3e3 100644
--- a/package/zshelf/package
+++ b/package/zshelf/package
@@ -5,7 +5,7 @@
 pkgnames=(zshelf)
 pkgdesc="Z-Library browser and downloader"
 url=https://github.com/khanhas/zshelf
-pkgver=0.3.1-3
+pkgver=0.3.1-4
 section=utils
 timestamp=2021-02-20T01:45Z
 maintainer="khanhas <xuankhanh963@gmail.com>"
diff --git a/scripts/install-lib b/scripts/install-lib
index cb98421bf..59c35e2bb 100644
--- a/scripts/install-lib
+++ b/scripts/install-lib
@@ -105,10 +105,18 @@ reload-oxide-apps() {
         return
     fi
     echo -n "Reloading Oxide applications: "
-    if ! /opt/bin/rot apps call reload 2> /dev/null; then
-        echo "Failed!"
+    local ret
+    if type update-desktop-database &> /dev/null; then
+        update-desktop-database --quiet
+        ret=$?
     else
+        /opt/bin/rot apps call reload 2> /dev/null
+        ret=$?
+    fi
+    if [ $ret -eq 0 ]; then
         echo "Done!"
+    else
+        echo "Failed!"
     fi
 }
 
diff --git a/scripts/toltec/builder.py b/scripts/toltec/builder.py
index 27253eef2..ee14b0e29 100644
--- a/scripts/toltec/builder.py
+++ b/scripts/toltec/builder.py
@@ -548,7 +548,9 @@ def _archive(self, package: Package, pkg_dir: str) -> None:
         os.makedirs(ar_dir, exist_ok=True)
 
         # Inject Oxide-specific hook for reloading apps
-        if os.path.exists(os.path.join(pkg_dir, "opt/usr/share/applications")):
+        if os.path.exists(
+            os.path.join(pkg_dir, "opt/usr/share/applications")
+        ) or os.path.exists(os.path.join(pkg_dir, "opt/etc/draft")):
             oxide_hook = "\nreload-oxide-apps\n"
             package.functions["configure"] += oxide_hook
             package.functions["postupgrade"] += oxide_hook

From 8115ee4d6466bc4d3a37c7209dde56bd7ec70cee Mon Sep 17 00:00:00 2001
From: Salvatore Stella <Etn40ff@users.noreply.github.com>
Date: Mon, 27 Nov 2023 01:19:35 +0100
Subject: [PATCH 7/9] Add package for wireguard-tools (#743)

* Add package for wireguard-tools

* Pull in provides from #600

* Add provides to wireguard packages

* add conflicts

---------

Co-authored-by: Nathaniel van Diepen <Eeems@users.noreply.github.com>
---
 docs/package.md                 | 15 +++++++++++++++
 package/wireguard-tools/package | 32 ++++++++++++++++++++++++++++++++
 package/wireguard/package       |  1 +
 scripts/toltec/recipe.py        |  4 +++-
 4 files changed, 51 insertions(+), 1 deletion(-)
 create mode 100755 package/wireguard-tools/package

diff --git a/docs/package.md b/docs/package.md
index 1342df0ac..72a9bdca8 100644
--- a/docs/package.md
+++ b/docs/package.md
@@ -405,6 +405,21 @@ A list of packages that the current package replaces.
 Setting this field allows the current package to overwrite and take ownership of files from other packages.
 Note that the replaced packages will not be automatically uninstalled unless you also declare a conflict with them using the [`conflicts` field](#conflicts-field).
 
+#### `provides` field
+
+<table>
+    <tr>
+        <th>Required?</th>
+        <td>No, defaults to <code>()</code></th>
+    </tr>
+    <tr>
+        <th>Type</th>
+        <td>Array of strings</td>
+    </tr>
+</table>
+
+A list of virtual packages that the current package provides.
+
 #### `package()` function
 
 The `package()` function populates the `$pkgdir` directory with the files and directories that need to be installed using artifacts from the `$srcdir` directory.
diff --git a/package/wireguard-tools/package b/package/wireguard-tools/package
new file mode 100755
index 000000000..87bbb3971
--- /dev/null
+++ b/package/wireguard-tools/package
@@ -0,0 +1,32 @@
+#!/usr/bin/env bash
+# Copyright (c) 2031 The Toltec Contributors
+# SPDX-License-Identifier: MIT
+
+pkgnames=(wireguard-tools)
+pkgdesc="Fast, modern, secure VPN tunnel"
+url=https://www.wireguard.com
+pkgver=1.0.20210914-1
+timestamp=2021-02-23T00:00Z
+section=kernel
+maintainer="Salvatore Stella <etn45p4m@gmail.com>"
+license=GPL-2.0-only
+image=base:v3.1
+provides=(wireguard-tools)
+conflicts=(wireguard)
+source=("https://git.zx2c4.com/wireguard-tools/snapshot/wireguard-tools-${pkgver%-*}.tar.xz")
+
+sha256sums=(97ff31489217bb265b7ae850d3d0f335ab07d2652ba1feec88b734bc96bd05ac)
+
+prepare() {
+    # The symlink at src/wg-quick/wg needs something to point to
+    touch "$srcdir/src/wg"
+}
+
+build() {
+    make -C "$srcdir/src" PLATFORM=linux "CC=${CROSS_COMPILE}cc"
+}
+
+package() {
+    install -D -t "$pkgdir/opt/bin" "$srcdir/src/wg"
+    install -D "$srcdir/src/wg-quick/linux.bash" "$pkgdir/opt/bin/wg-quick"
+}
diff --git a/package/wireguard/package b/package/wireguard/package
index d01ce5f3a..67b900c9d 100755
--- a/package/wireguard/package
+++ b/package/wireguard/package
@@ -13,6 +13,7 @@ maintainer="Jonah Weissman <jonahrweissman+toltec@gmail.com>"
 license=GPL-2.0-only
 makedepends=(build:bc build:lzop build:git)
 flags=(nostrip)
+provides=(wireguard-tools)
 
 _kernelrepo=https://github.com/remarkable/linux
 _kernelrevs=(
diff --git a/scripts/toltec/recipe.py b/scripts/toltec/recipe.py
index fc1cf9ae0..de3844490 100644
--- a/scripts/toltec/recipe.py
+++ b/scripts/toltec/recipe.py
@@ -344,6 +344,7 @@ class Package:  # pylint:disable=too-many-instance-attributes
     installdepends: Set[Dependency]
     conflicts: Set[Dependency]
     replaces: Set[Dependency]
+    provides: Set[Dependency]
 
     functions: bash.Functions
     custom_functions: bash.Functions
@@ -391,7 +392,7 @@ def _load_fields(self, variables: bash.Variables) -> None:
         self.license = _pop_field_string(variables, "license")
         self.variables["license"] = self.license
 
-        for field in ("installdepends", "conflicts", "replaces"):
+        for field in ("installdepends", "conflicts", "replaces", "provides"):
             field_raw = _pop_field_indexed(variables, field, [])
             self.variables[field] = field_raw
             setattr(self, field, set())
@@ -483,6 +484,7 @@ def control_fields(self) -> str:
             ("Depends", self.installdepends),
             ("Conflicts", self.conflicts),
             ("Replaces", self.replaces),
+            ("Provides", self.provides),
         ):
             if field:
                 control += (

From 872034cf83402d60929f9730d286476a67ef9467 Mon Sep 17 00:00:00 2001
From: Salvatore Stella <Etn40ff@users.noreply.github.com>
Date: Tue, 28 Nov 2023 22:59:45 +0100
Subject: [PATCH 8/9] linux-stracciatella: update sources to
 RM1XX_5.4.70_v1.3.4 and add wireguard (#742)

* linux-stracciatella: update sources to RM1XX_5.4.70_v1.3.4

* Bump build image to v3.1

* Add wireguard module to linux-stracciatella

* Move wireguard config out of sources

* Remove debug symbols for rM1

---------

Co-authored-by: Nathaniel van Diepen <Eeems@users.noreply.github.com>
---
 package/linux-stracciatella/package | 30 ++++++++++++++++++++++++-----
 1 file changed, 25 insertions(+), 5 deletions(-)

diff --git a/package/linux-stracciatella/package b/package/linux-stracciatella/package
index 74111f4a7..e0fe100eb 100644
--- a/package/linux-stracciatella/package
+++ b/package/linux-stracciatella/package
@@ -6,17 +6,37 @@ archs=(rm1 rm2)
 pkgnames=(linux-stracciatella)
 pkgdesc="RemarkableAS's vanilla kernel with a few extra flakes"
 url=https://github.com/Etn40ff/linux-remarkable
-pkgver=5.4.70-2
-timestamp=2022-09-26T21:23:39Z
+pkgver=5.4.70-3
+timestamp=2023-09-23T00:12:00Z
 section="kernel"
 maintainer="Salvatore Stella <etn45p4m@gmail.com>"
 makedepends=(build:flex build:bison build:libssl-dev build:bc build:lzop build:libgmp-dev build:libmpc-dev build:kmod)
 license=GPL-2.0-only
 flags=(nostrip)
 installdepends=(kernelctl)
-image=base:v2.3
-source=(https://github.com/Etn40ff/linux-remarkable/archive/41121ea10ed2235c441cfe717461988859d7f5b6.tar.gz)
-sha256sums=(ade87a10bfa7069222cbf8eb1d00ca460d38aab9685223d2fa3ee4f363a75cfa)
+image=base:v3.1
+_wireguard_version=1.0.20220627
+source=(
+    https://github.com/Etn40ff/linux-remarkable/archive/c908b16d6b848964ecc9b116a024f247c290a1bf.tar.gz
+    "https://git.zx2c4.com/wireguard-linux-compat/snapshot/wireguard-linux-compat-$_wireguard_version.tar.xz"
+)
+sha256sums=(
+    2075b9eb69172751b3e8e0d3a40d63c0c05982e79a2724ed7c3bdfc4f7988eea
+    362d412693c8fe82de00283435818d5c5def7f15e2433a07a9fe99d0518f63c0
+)
+noextract=("wireguard-linux-compat-$_wireguard_version.tar.xz")
+
+prepare() {
+    # Jury-rig the wireguard module into sources and enable it
+    mkdir "$srcdir/net/wireguard"
+    bsdtar --strip-components 2 -xJ -C "$srcdir/net/wireguard" \
+        -f "$srcdir/wireguard-linux-compat-$_wireguard_version.tar.xz" \
+        "wireguard-linux-compat-$_wireguard_version/src"
+    sed -i "/^obj-\\\$(CONFIG_NETFILTER).*+=/a obj-\$(CONFIG_WIREGUARD) += wireguard/" "$srcdir/net/Makefile"
+    sed -i "/^if INET\$/a source \"net/wireguard/Kconfig\"" "$srcdir/net/Kconfig"
+    echo "CONFIG_WIREGUARD=m" >> "$srcdir/arch/arm/configs/zero-gravitas_defconfig"
+    echo "CONFIG_WIREGUARD=m" >> "$srcdir/arch/arm/configs/zero-sugar_defconfig"
+}
 
 build() {
     if [[ $arch = rm1 ]]; then

From 809c86d210cd216913943643884bc53597fa72d8 Mon Sep 17 00:00:00 2001
From: Dmitrii Odintcov <46854921+CyprusSocialite@users.noreply.github.com>
Date: Wed, 6 Dec 2023 04:03:06 +0200
Subject: [PATCH 9/9] Update display/rm2fb-client to v0.0.32 (#758)

Add support for OS 3.3.2.1666
---
 package/display/package | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/package/display/package b/package/display/package
index 9cb5abf8d..4e2937383 100644
--- a/package/display/package
+++ b/package/display/package
@@ -4,11 +4,11 @@
 
 archs=(rm1 rm2)
 pkgnames=(display rm2fb-client)
-timestamp=2023-04-16T20:53:38Z
+timestamp=2023-08-27T02:39:10Z
 maintainer="raisjn <of.raisjn@gmail.com>"
 license=MIT
 url="https://github.com/ddvk/remarkable2-framebuffer"
-pkgver=1:0.0.31-2
+pkgver=1:0.0.32-1
 _release="${pkgver%-*}"
 _release="v${_release#*:}"
 _libver=1.0.1
@@ -23,7 +23,7 @@ source=(
     rm2fb-preload.env
 )
 sha256sums=(
-    c27081be9b4fa000e41489b42d53fb8254bd8bf348a34756799488827dbc0f0b
+    603eef1688a8c3adb1df23f4f00fe12b80938fe99801b515cd74f84c8cede5b1
     SKIP
     SKIP
     SKIP