firmware/debian/rules
2025-01-06 19:59:02 -06:00

24 lines
609 B
Makefile
Executable File

#!/usr/bin/make -f
# export DH_VERBOSE = 1
# Use the "dh" sequencer
%:
dh $@
# https://docs.platformio.org/en/latest/envvars.html
PIO_ENV:=\
PLATFORMIO_CORE_DIR=pio/core \
PLATFORMIO_LIBDEPS_DIR=pio/libdeps \
PLATFORMIO_PACKAGES_DIR=pio/packages
override_dh_auto_build:
# Extract tarballs within source deb
tar -xf pio.tar
mkdir -p web && tar -xf web.tar -C 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