sys-exporter/debian/tools/build.sh
Melora Hugues f84419de0d
All checks were successful
/ go-test (push) Successful in 9m50s
Add tools to build debian package
2024-12-03 14:11:19 +01:00

17 lines
812 B
Bash
Executable file

#!/bin/bash
set -o errexit
set -o pipefail
set -o nounset
rm -rf /build/debpkg
mkdir -p /build/debpkg/usr/bin /build/debpkg/DEBIAN /build/debpkg/etc/systemd/system /build/debpkg/etc/sys-exporter
install -m 755 -o root -g root /build/server /build/debpkg/usr/bin/
install -m 644 -o root -g root /debian/sys-exporter/etc/systemd/system/sys-exporter.service /build/debpkg/etc/systemd/system/
install -m 644 -o root -g root /debian/sys-exporter/etc/sys-exporter/config.yml /build/debpkg/etc/sys-exporter/
install -m 644 -o root -g root /debian/sys-exporter/control /build/debpkg/DEBIAN/control
install -m 755 -o root -g root /debian/sys-exporter/postinst /build/debpkg/DEBIAN/postinst
envsubst < /debian/sys-exporter/control > /build/debpkg/DEBIAN/control
dpkg-deb --build /build/debpkg/ /build/sys-exporter.deb