sys-exporter/debian/tools/build.sh

18 lines
824 B
Bash
Raw Permalink Normal View History

2024-12-03 13:11:19 +00:00
#!/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
2024-12-07 17:46:47 +00:00
install -m 755 -o root -g root /build/server /build/debpkg/usr/bin/sys-exporter
2024-12-03 13:11:19 +00:00
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