Initialize Git Repository: 'Pironman5'
All checks were successful
Pironman 5 Daemon (Bookworm) / Pironman 5 Daemon [arm64] (push) Successful in 11s
Pironman 5 Daemon (Trixie) / Pironman 5 Daemon [arm64] (push) Successful in 11s

This commit is contained in:
Cantibra
2026-01-26 06:10:22 +01:00
commit 80210e740a
19 changed files with 1117 additions and 0 deletions

1
root/DEBIAN/conffiles Normal file
View File

@@ -0,0 +1 @@
/etc/pironman5.cfg

10
root/DEBIAN/control Normal file
View File

@@ -0,0 +1,10 @@
Package: pironman5
Version: 1.0.0
Architecture:
Installed-Size:
Depends: git, python3-pyudev, python3-venv, python3-dev
Priority: optional
Section: misc
Homepage: http://www.privlab.it
Maintainer: PrivLab <repository@privlab.it>
Description: Sunfounder Pironman 5 Case

58
root/DEBIAN/postinst Normal file
View File

@@ -0,0 +1,58 @@
#!/usr/bin/sh
set -e
set -u
GIT='https://github.com/sunfounder'
GIT_PIRONMAN5="${GIT}/pironman5.git"
GIT_PM_AUTO="${GIT}/pm_auto.git"
GIT_SF_RPI_STATUS="${GIT}/sf_rpi_status.git"
if [ -d '/run/systemd/system' ]; then
/usr/bin/systemctl --system daemon-reload > '/dev/null' 2>&1 || \
/usr/bin/true
fi
case "${1}" in
configure)
if [ -x '/usr/bin/deb-systemd-helper' ]; then
/usr/bin/deb-systemd-helper unmask 'pironman5.service' > '/dev/null' 2>&1 || \
/usr/bin/true
/usr/bin/deb-systemd-helper unmask 'pironman5-err.service' > '/dev/null' 2>&1 || \
/usr/bin/true
fi
if /usr/bin/deb-systemd-helper --quiet was-enabled 'pironman5.service'; then
/usr/bin/deb-systemd-helper enable 'pironman5.service' > '/dev/null' 2>&1 || \
/usr/bin/true
else
/usr/bin/deb-systemd-helper update-state 'pironman5.service' > '/dev/null' 2>&1 || \
/usr/bin/true
fi
if [ -x '/etc/init.d/pironman5' ]; then
/usr/sbin/update-rc.d 'pironman5' defaults > '/dev/null' 2>&1 || \
/usr/bin/true
fi
/usr/bin/install --directory '/var/log/pironman5'
/usr/bin/install --directory '/var/logrotate/pironman5'
/usr/bin/python3 -m 'venv' --system-site-packages "/opt/pironman5/venv"
/usr/bin/git -c "advice.detachedHead=false" clone --quiet "${GIT_PIRONMAN5}" '/opt/pironman5/pironman5'
# /usr/bin/git clone --quiet "${GIT_PM_AUTO}" '/opt/pironman5/pm_auto'
/usr/bin/git -c "advice.detachedHead=false" clone --branch '1.2.5' --quiet "${GIT_PM_AUTO}" '/opt/pironman5/pm_auto'
/usr/bin/git -c "advice.detachedHead=false" clone --quiet "${GIT_SF_RPI_STATUS}" '/opt/pironman5/sf_rpi_status'
/opt/pironman5/venv/bin/pip3 --require-virtualenv --quiet --no-cache-dir install '/opt/pironman5/pironman5' > '/dev/null' 2>&1
/opt/pironman5/venv/bin/pip3 --require-virtualenv --quiet --no-cache-dir install '/opt/pironman5/pm_auto' > '/dev/null' 2>&1
/opt/pironman5/venv/bin/pip3 --require-virtualenv --quiet --no-cache-dir install '/opt/pironman5/sf_rpi_status' > '/dev/null' 2>&1
/usr/bin/ln --force --symbolic '/dev/null' '/opt/pironman5/1'
if [ -x '/usr/bin/deb-systemd-invoke' ]; then
/usr/bin/systemctl --system daemon-reload > '/dev/null' 2>&1 || \
/usr/bin/true
if [ -n "${2}" ]; then
_dh_action='restart'
else
_dh_action='start'
fi
/usr/bin/deb-systemd-invoke "${_dh_action}" 'pironman5.service' > '/dev/null' 2>&1 || \
/usr/bin/true
fi
;;
esac

44
root/DEBIAN/postrm Normal file
View File

@@ -0,0 +1,44 @@
#!/usr/bin/sh
set -e
set -u
if [ -d '/run/systemd/system' ]; then
/usr/bin/systemctl --system daemon-reload > '/dev/null' 2>&1 || \
/usr/bin/true
fi
case "${1}" in
remove)
if [ -x '/usr/bin/deb-systemd-helper' ]; then
/usr/bin/deb-systemd-helper mask 'pironman5.service' > '/dev/null' 2>&1 || \
/usr/bin/true
/usr/bin/deb-systemd-helper mask 'pironman5-led.service' > '/dev/null' 2>&1 || \
/usr/bin/true
fi
;;
purge)
if [ -x '/usr/bin/deb-systemd-helper' ]; then
/usr/bin/deb-systemd-helper purge 'pironman5.service' > '/dev/null' 2>&1 || \
/usr/bin/true
/usr/bin/deb-systemd-helper unmask 'pironman5.service' > '/dev/null' 2>&1 || \
/usr/bin/true
/usr/bin/deb-systemd-helper purge 'pironman5-err.service' > '/dev/null' 2>&1 || \
/usr/bin/true
/usr/bin/deb-systemd-helper unmask 'pironman5-err.service' > '/dev/null' 2>&1 || \
/usr/bin/true
fi
/usr/bin/rm --force --recursive '/opt/pironman5'
/usr/bin/sed --in-place --expression='/^\s*$/N; /## sunfounder-pironman5/,/dtoverlay=sunfounder-pironman5,ir=off/d' '/boot/config.txt'
/usr/bin/echo ''
/usr/bin/echo '################################################'
/usr/bin/echo '# #'
/usr/bin/echo '# ! Restart the device to unload the drivers ! #'
/usr/bin/echo '# #'
/usr/bin/echo '################################################'
/usr/bin/echo ''
;;
esac
/usr/bin/rm --force --recursive '/var/log/gitea'
/usr/bin/rm --force --recursive '/var/logrotate/gitea'

42
root/DEBIAN/preinst Normal file
View File

@@ -0,0 +1,42 @@
#!/usr/bin/sh
set -e
set -u
TMP=$(/usr/bin/mktemp --directory --quiet)
trap "/usr/bin/rm --force --recursive ${TMP}" EXIT
BOOT=$(/usr/bin/grep '/boot' '/etc/fstab' | /usr/bin/mawk '$1 !~ /^#/ && $2 ~ /^[/]/ {print $2}')
/usr/bin/test -n "${BOOT}"
case "${1}" in
install)
/usr/bin/install --directory '/opt/pironman5'
if ! /usr/bin/grep --quiet 'sunfounder-pironman5' "${BOOT}/config.txt"; then
/usr/bin/echo '' >> "${BOOT}/config.txt"
/usr/bin/echo '## sunfounder-pironman5' >> "${BOOT}/config.txt"
/usr/bin/echo '## Enable the SunFounder Pironman 5 driver.' >> "${BOOT}/config.txt"
/usr/bin/echo '##' >> "${BOOT}/config.txt"
/usr/bin/echo 'dtoverlay=sunfounder-pironman5,ir=off' >> "${BOOT}/config.txt"
fi
/usr/bin/echo 'BOOT_UART=1' >> "${TMP}/raspberrypi-eeprom.cfg"
/usr/bin/echo 'BOOT_ORDER=0xf41' >> "${TMP}/raspberrypi-eeprom.cfg"
/usr/bin/echo 'POWER_OFF_ON_HALT=1' >> "${TMP}/raspberrypi-eeprom.cfg"
/usr/bin/echo 'WAIT_FOR_POWER_BUTTON=1 ' >> "${TMP}/raspberrypi-eeprom.cfg"
/usr/bin/echo 'BOOT_WATCHDOG_TIMEOUT=15 ' >> "${TMP}/raspberrypi-eeprom.cfg"
/usr/bin/echo 'MAX_RESTARTS=1 ' >> "${TMP}/raspberrypi-eeprom.cfg"
/usr/bin/echo 'DISABLE_HDMI=1' >> "${TMP}/raspberrypi-eeprom.cfg"
/usr/bin/echo '' >> "${TMP}/raspberrypi-eeprom.cfg"
/usr/bin/rpi-eeprom-config --apply "${TMP}/raspberrypi-eeprom.cfg" > '/dev/null' 2>&1
/usr/bin/echo ''
/usr/bin/echo '########################################################'
/usr/bin/echo '# #'
/usr/bin/echo '# ! Restart the device to load the necessary drivers ! #'
/usr/bin/echo '# #'
/usr/bin/echo '########################################################'
/usr/bin/echo ''
;;
upgrade)
/usr/bin/rm --force --recursive '/opt/pironman5'
/usr/bin/install --directory '/opt/pironman5'
;;
esac

21
root/DEBIAN/prerm Normal file
View File

@@ -0,0 +1,21 @@
#!/usr/bin/sh
set -e
set -u
case "${1}" in
remove)
if [ -x '/usr/bin/deb-systemd-invoke' ]; then
/usr/bin/deb-systemd-invoke stop 'pironman5.service' > '/dev/null' 2>&1 || \
/usr/bin/true
/usr/bin/deb-systemd-invoke stop 'pironman5-err.service' > '/dev/null' 2>&1 || \
/usr/bin/true
/usr/bin/deb-systemd-invoke disable 'pironman5.service' > '/dev/null' 2>&1 || \
/usr/bin/true
fi
if [ -x '/etc/init.d/pironman5' ]; then
/usr/sbin/update-rc.d 'pironman5' remove > '/dev/null' 2>&1 || \
/usr/bin/true
fi
;;
esac