1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#!/usr/bin/make -f
# Enable all hardening options
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
%:
dh $@
override_dh_auto_build:
# No build needed - using pre-built binary
@echo "Using pre-built binary from GitHub release"
override_dh_auto_install:
# Install the pre-built binary
# The binary should be extracted to the project root before building the package
install -D -m 0755 all-smi debian/all-smi/usr/bin/all-smi
if [ -f liball_smi_amd.so ]; then install -D -m 0755 liball_smi_amd.so debian/all-smi/usr/lib/all-smi/liball_smi_amd.so; fi
# Operator-editable environment file consumed by the unit's
# `EnvironmentFile=-/etc/default/all-smi` line.
install -D -m 0644 debian/all-smi.default debian/all-smi/etc/default/all-smi
override_dh_auto_test:
# Skip tests for pre-built binary
@echo "Skipping tests - using pre-built binary"
override_dh_auto_clean:
@echo "Skipping clean step because we use pre-built binary"
# Ship the unit disabled. all-smi is first a CLI tool, and opening a listening
# port as a side effect of `apt install` would surprise operators, so this
# deliberately diverges from prometheus-node-exporter. debian/all-smi.postinst
# prints the `systemctl enable --now all-smi` hint instead.
override_dh_installsystemd:
dh_installsystemd --no-enable --no-start
override_dh_builddeb:
dh_builddeb --destdir=../