Debian Codegraph @

debian/rules

raw
1 #!/usr/bin/make -f
2
3 # -w: "disable DWARF generation" for slightly smaller binaries (since we're skipping stripping; see below)
4 export GOFLAGS := -ldflags=-w
5
6 override_dh_auto_test:
7 dh_auto_test
8
9 # the autopkgtest makes sure the package functions properly, but here we can at least make sure the binary runs successfully
10 debian/.build/bin/gosu --version
11 debian/.build/bin/gosu --help
12 # (the full upstream test suite is necessarily involved and not something we can easily run either here *or* in autopkgtest)
13
14 override_dh_auto_install:
15 dh_auto_install -- --no-source
16
17 # the binary needs to go into sbin, not bin
18 test -d debian/gosu/usr/bin -a ! -d debian/gosu/usr/sbin
19 mv debian/gosu/usr/bin debian/gosu/usr/sbin
20
21 override_dh_strip:
22 : # stripping Go binaries prevents govulncheck from working, which is a disservice to the community
23
24 %:
25 dh $@ --builddirectory=debian/.build --buildsystem=golang --with=golang