From 86170171a7a093e06423e8c78841b91a6cce2b26 Mon Sep 17 00:00:00 2001 From: Austin Date: Mon, 6 Jan 2025 20:25:05 -0500 Subject: [PATCH] meshtasticd-debian: Include web components (#5778) --- .gitignore | 6 ++++-- debian/changelog | 2 +- debian/ci_changelog.sh | 7 ++++--- debian/ci_pack_sdeb.sh | 7 +++++-- debian/control | 8 ++++++-- debian/meshtasticd.dirs | 1 + debian/meshtasticd.install | 2 ++ debian/rules | 7 +++++-- debian/source/include-binaries | 5 ++--- debian/source/options | 3 +-- 10 files changed, 31 insertions(+), 17 deletions(-) diff --git a/.gitignore b/.gitignore index d44374919..803aee139 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,8 @@ .pio -.pio_core pio +pio.tar +web +web.tar # ignore vscode IDE settings files .vscode/* @@ -32,4 +34,4 @@ release/ .vscode/extensions.json /compile_commands.json src/mesh/raspihttp/certificate.pem -src/mesh/raspihttp/private_key.pem +src/mesh/raspihttp/private_key.pem \ No newline at end of file diff --git a/debian/changelog b/debian/changelog index 5dd6fb1c0..79c444aca 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -meshtasticd (2.5.19) unstable; urgency=medium +meshtasticd (2.5.19) UNRELEASED; urgency=medium * Initial packaging diff --git a/debian/ci_changelog.sh b/debian/ci_changelog.sh index 56688f99b..7925ad5eb 100755 --- a/debian/ci_changelog.sh +++ b/debian/ci_changelog.sh @@ -1,6 +1,7 @@ #!/usr/bin/bash export DEBEMAIL="github-actions[bot]@users.noreply.github.com" +PKG_VERSION=$(python3 bin/buildinfo.py short) -dch --newversion "$(python3 bin/buildinfo.py short)-1" \ - --distribution unstable \ - "GitHub Actions Automatic version bump" +dch --newversion "$PKG_VERSION-1" \ + --distribution UNRELEASED \ + "GitHub Actions Automatic version bump" diff --git a/debian/ci_pack_sdeb.sh b/debian/ci_pack_sdeb.sh index 3099b6569..d45593c50 100755 --- a/debian/ci_pack_sdeb.sh +++ b/debian/ci_pack_sdeb.sh @@ -4,11 +4,14 @@ export PLATFORMIO_LIBDEPS_DIR=pio/libdeps export PLATFORMIO_PACKAGES_DIR=pio/packages export PLATFORMIO_CORE_DIR=pio/core -# Download libraries to `libdeps` +# Download libraries to `pio` platformio pkg install -e native -platformio pkg install -t platformio/tool-scons@4.40502.0 +platformio pkg install -e native -t platformio/tool-scons@4.40502.0 +# Compress `pio` directory to prevent dh_clean from sanitizing it tar -cf pio.tar pio/ rm -rf pio +# Download the latest meshtastic/web release build.tar to `web.tar` +curl https://github.com/meshtastic/web/releases/download/latest/build.tar -o web.tar package=$(dpkg-parsechangelog --show-field Source) diff --git a/debian/control b/debian/control index 9814933e3..097f85859 100644 --- a/debian/control +++ b/debian/control @@ -13,7 +13,11 @@ Build-Depends: debhelper-compat (= 13), libgpiod-dev, libbluetooth-dev, libusb-1.0-0-dev, - libi2c-dev + libi2c-dev, + openssl, + libssl-dev, + libulfius-dev, + liborcania-dev Standards-Version: 4.6.2 Homepage: https://github.com/meshtastic/firmware Rules-Requires-Root: no @@ -23,4 +27,4 @@ Architecture: any Depends: ${misc:Depends}, ${shlibs:Depends} Description: Meshtastic daemon for communicating with Meshtastic devices Meshtastic is an off-grid text communication platform that uses inexpensive - LoRa radios. + LoRa radios. \ No newline at end of file diff --git a/debian/meshtasticd.dirs b/debian/meshtasticd.dirs index cf1ba7a37..5f57ff7be 100644 --- a/debian/meshtasticd.dirs +++ b/debian/meshtasticd.dirs @@ -1,3 +1,4 @@ etc/meshtasticd etc/meshtasticd/config.d etc/meshtasticd/available.d +usr/share/meshtasticd/web \ No newline at end of file diff --git a/debian/meshtasticd.install b/debian/meshtasticd.install index 04bf34daf..da1b0685d 100644 --- a/debian/meshtasticd.install +++ b/debian/meshtasticd.install @@ -4,3 +4,5 @@ bin/config.yaml etc/meshtasticd bin/config.d/* etc/meshtasticd/available.d bin/meshtasticd.service lib/systemd/system + +web/* usr/share/meshtasticd/web \ No newline at end of file diff --git a/debian/rules b/debian/rules index 28961fd10..31221dd80 100755 --- a/debian/rules +++ b/debian/rules @@ -12,9 +12,12 @@ PIO_ENV:=\ PLATFORMIO_PACKAGES_DIR=pio/packages override_dh_auto_build: - # Build with platformio + # Extract tarballs within source deb tar -xf pio.tar + tar -xf web.tar web + gunzip web/ -r + # Build with platformio $(PIO_ENV) platformio run -e native # Move the binary and default config to the correct name mv .pio/build/native/program .pio/build/native/meshtasticd - cp bin/config-dist.yaml bin/config.yaml + cp bin/config-dist.yaml bin/config.yaml \ No newline at end of file diff --git a/debian/source/include-binaries b/debian/source/include-binaries index aef4a7027..0c9848b72 100644 --- a/debian/source/include-binaries +++ b/debian/source/include-binaries @@ -1,3 +1,2 @@ -pio/libdeps -pio/packages -pio/core \ No newline at end of file +pio.tar +web.tar \ No newline at end of file diff --git a/debian/source/options b/debian/source/options index 2f3670cba..0553b485d 100644 --- a/debian/source/options +++ b/debian/source/options @@ -1,2 +1 @@ -extend-diff-ignore = "\.pio\w*?$" -tar-ignore = "" +extend-diff-ignore = "\.pio" \ No newline at end of file