From 9cbf46ba61518275d26bfe21ac59fe954b001e04 Mon Sep 17 00:00:00 2001 From: ner216 Date: Thu, 20 Aug 2026 14:48:14 -0400 Subject: [PATCH 1/2] Add script that specifically builds the deb package without performing the entire release process. --- build-deb.sh | 62 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100755 build-deb.sh diff --git a/build-deb.sh b/build-deb.sh new file mode 100755 index 0000000..e5d4cdd --- /dev/null +++ b/build-deb.sh @@ -0,0 +1,62 @@ +#!/usr/bin/env bash +set -euo pipefail + +PROJECT_NAME="stenmark" +VERSION=$(grep -oP "^version:\s*'\K[^']+" meson.build || echo "0.8.0") +DEB_STAGING="$(pwd)/deb-staging" +CONFIG_FILE="/tmp/nfpm-stenmark.yaml" + +cleanup() { + rm -rf "$DEB_STAGING" "$CONFIG_FILE" builddir +} +trap cleanup EXIT + +echo "==> Building .deb package for $PROJECT_NAME v$VERSION" + +# 1. Ensure required build tools exist +for cmd in meson ninja nfpm; do + if ! command -v "$cmd" &>/dev/null; then + echo "ERROR: Missing required command '$cmd'. Install meson, ninja-build, and nfpm first." + exit 1 + fi +done + +# 2. Stage the application installation tree +rm -rf "$DEB_STAGING" builddir +meson setup builddir --prefix=/usr +meson compile -C builddir +DESTDIR="$DEB_STAGING" meson install -C builddir --no-rebuild + +# 3. Generate contents list for nFPM +CONTENTS="" +while IFS= read -r file; do + dst="${file#"$DEB_STAGING"}" + CONTENTS+=" - src: $file + dst: $dst +" +done < <(find "$DEB_STAGING" -type f) + +# 4. Write nFPM configuration +cat > "$CONFIG_FILE" < Successfully built package:" +ls -l "${PROJECT_NAME}"_*.deb \ No newline at end of file From 9c6be6088f3ec6687897ffd88c1e4c3b928af743 Mon Sep 17 00:00:00 2001 From: ner216 Date: Thu, 20 Aug 2026 15:16:59 -0400 Subject: [PATCH 2/2] Add documentation to README specifying the build-deb script as well as a debug troubleshooting tip. --- README.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/README.md b/README.md index 562dc37..5469751 100644 --- a/README.md +++ b/README.md @@ -87,6 +87,12 @@ meson compile -C builddir sudo meson install -C builddir ``` +### Build Deb package from source + +```bash +./build-deb.sh +``` + ## Usage ```bash @@ -99,6 +105,14 @@ stenmark ~/Notes/todo.md # opens a file directly (sidebar hidden) Settings are stored in `~/.config/stenmark/settings.json` and can be changed from the Preferences dialog. All changes take effect immediately, except the interface language, which applies on restart. +## Troubleshooting + +If you encounter issues or crashes, debug output can be enabled by running the following command in your terminal: + +``` +G_MESSAGES_DEBUG=all PYTHONUNBUFFERED=1 stenmark +``` + ## License GPL-3.0-**only** — version 3 of the GNU General Public License, and not "or any later version".