2024-05-19 23:00:06 +00:00
|
|
|
name: Package Raspbian
|
|
|
|
|
|
|
|
on:
|
|
|
|
workflow_call:
|
|
|
|
workflow_dispatch:
|
|
|
|
|
|
|
|
permissions:
|
|
|
|
contents: write
|
|
|
|
packages: write
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build-raspbian_armv7l:
|
|
|
|
uses: ./.github/workflows/build_raspbian_armv7l.yml
|
|
|
|
|
|
|
|
package-raspbian_armv7l:
|
2024-09-19 23:21:30 +00:00
|
|
|
runs-on: ubuntu-22.04
|
2024-05-19 23:00:06 +00:00
|
|
|
needs: build-raspbian_armv7l
|
|
|
|
steps:
|
|
|
|
- name: Checkout code
|
|
|
|
uses: actions/checkout@v4
|
|
|
|
with:
|
|
|
|
submodules: recursive
|
|
|
|
ref: ${{github.event.pull_request.head.ref}}
|
|
|
|
repository: ${{github.event.pull_request.head.repo.full_name}}
|
|
|
|
|
|
|
|
- name: Pull web ui
|
|
|
|
uses: dsaltares/fetch-gh-release-asset@master
|
|
|
|
with:
|
|
|
|
repo: meshtastic/web
|
|
|
|
file: build.tar
|
|
|
|
target: build.tar
|
|
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
|
|
|
|
- name: Get release version string
|
2025-01-09 02:43:24 +00:00
|
|
|
run: echo "long=$(./bin/buildinfo.py long)" >> $GITHUB_OUTPUT
|
2024-05-19 23:00:06 +00:00
|
|
|
id: version
|
|
|
|
|
|
|
|
- name: Download artifacts
|
|
|
|
uses: actions/download-artifact@v4
|
|
|
|
with:
|
2025-01-09 02:43:24 +00:00
|
|
|
name: firmware-raspbian-armv7l-${{ steps.version.outputs.long }}.zip
|
2024-05-19 23:00:06 +00:00
|
|
|
merge-multiple: true
|
|
|
|
|
|
|
|
- name: Display structure of downloaded files
|
|
|
|
run: ls -R
|
|
|
|
|
|
|
|
- name: build .debpkg
|
|
|
|
run: |
|
|
|
|
mkdir -p .debpkg/DEBIAN
|
2024-12-10 19:58:16 +00:00
|
|
|
mkdir -p .debpkg/usr/share/meshtasticd/web
|
2024-05-19 23:00:06 +00:00
|
|
|
mkdir -p .debpkg/usr/sbin
|
|
|
|
mkdir -p .debpkg/etc/meshtasticd
|
2024-10-29 02:48:10 +00:00
|
|
|
mkdir -p .debpkg/etc/meshtasticd/config.d
|
|
|
|
mkdir -p .debpkg/etc/meshtasticd/available.d
|
2024-05-19 23:00:06 +00:00
|
|
|
mkdir -p .debpkg/usr/lib/systemd/system/
|
2024-12-10 19:58:16 +00:00
|
|
|
tar -xf build.tar -C .debpkg/usr/share/meshtasticd/web
|
2024-11-10 12:56:44 +00:00
|
|
|
shopt -s dotglob nullglob
|
2024-12-10 19:58:16 +00:00
|
|
|
if [ -d .debpkg/usr/share/meshtasticd/web/build ]; then mv .debpkg/usr/share/meshtasticd/web/build/* .debpkg/usr/share/meshtasticd/web/; fi
|
|
|
|
if [ -d .debpkg/usr/share/meshtasticd/web/build ]; then rmdir .debpkg/usr/share/meshtasticd/web/build; fi
|
|
|
|
if [ -d .debpkg/usr/share/meshtasticd/web/.DS_Store ]; then rm -f .debpkg/usr/share/meshtasticd/web/.DS_Store; fi
|
|
|
|
gunzip .debpkg/usr/share/meshtasticd/web/ -r
|
2024-05-19 23:00:06 +00:00
|
|
|
cp release/meshtasticd_linux_armv7l .debpkg/usr/sbin/meshtasticd
|
|
|
|
cp bin/config-dist.yaml .debpkg/etc/meshtasticd/config.yaml
|
2024-12-04 18:15:17 +00:00
|
|
|
cp bin/config.d/* .debpkg/etc/meshtasticd/available.d/ -r
|
2024-05-19 23:00:06 +00:00
|
|
|
chmod +x .debpkg/usr/sbin/meshtasticd
|
|
|
|
cp bin/meshtasticd.service .debpkg/usr/lib/systemd/system/meshtasticd.service
|
|
|
|
echo "/etc/meshtasticd/config.yaml" > .debpkg/DEBIAN/conffiles
|
|
|
|
chmod +x .debpkg/DEBIAN/conffiles
|
2024-12-10 19:58:16 +00:00
|
|
|
# Transition /usr/share/doc/meshtasticd to /usr/share/meshtasticd
|
|
|
|
echo "rm -rf /usr/share/doc/meshtasticd" > .debpkg/DEBIAN/preinst
|
|
|
|
chmod +x .debpkg/DEBIAN/preinst
|
2024-12-10 21:02:38 +00:00
|
|
|
echo "ln -sf /usr/share/meshtasticd /usr/share/doc/meshtasticd" > .debpkg/DEBIAN/postinst
|
|
|
|
chmod +x .debpkg/DEBIAN/postinst
|
2024-05-19 23:00:06 +00:00
|
|
|
|
|
|
|
- uses: jiro4989/build-deb-action@v3
|
|
|
|
with:
|
|
|
|
package: meshtasticd
|
|
|
|
package_root: .debpkg
|
|
|
|
maintainer: Jonathan Bennett
|
2025-01-09 02:43:24 +00:00
|
|
|
version: ${{ steps.version.outputs.long }} # refs/tags/v*.*.*
|
2024-05-19 23:00:06 +00:00
|
|
|
arch: armhf
|
2024-12-23 04:53:54 +00:00
|
|
|
depends: libyaml-cpp0.7, openssl, libulfius2.7, libi2c0
|
2024-05-19 23:00:06 +00:00
|
|
|
desc: Native Linux Meshtastic binary.
|
|
|
|
|
|
|
|
- uses: actions/upload-artifact@v4
|
|
|
|
with:
|
2025-01-09 02:43:24 +00:00
|
|
|
name: meshtasticd_${{ steps.version.outputs.long }}_armhf.deb
|
2024-05-19 23:00:06 +00:00
|
|
|
overwrite: true
|
|
|
|
path: |
|
2024-12-23 04:53:54 +00:00
|
|
|
./*.deb
|