| 1 | #!/usr/bin/make -f |
| 2 | |
| 3 | include /usr/share/dpkg/pkg-info.mk |
| 4 | |
| 5 | # Extra files required for build |
| 6 | export DH_GOLANG_INSTALL_EXTRA := GNUmakefile config contrib/aerc.desktop contrib/carddav-query doc filters stylesets templates contrib/aerc.svg |
| 7 | |
| 8 | # Installation paths |
| 9 | export DESTDIR=$(CURDIR)/debian/aerc |
| 10 | export PREFIX=/usr |
| 11 | |
| 12 | # Go options |
| 13 | export GO111MODULE=off |
| 14 | export GOPROXY=off |
| 15 | export GOCACHE=$(CURDIR)/_build/go-build |
| 16 | export GOPATH=$(CURDIR)/_build |
| 17 | export GOFLAGS=-tags=notmuch -buildmode=pie |
| 18 | |
| 19 | # Hardening |
| 20 | export DEB_BUILD_MAINT_OPTIONS = hardening=+all |
| 21 | DPKG_EXPORT_BUILDFLAGS = 1 |
| 22 | include /usr/share/dpkg/buildflags.mk |
| 23 | |
| 24 | %: |
| 25 | dh $@ --builddirectory=_build --buildsystem=golang --with=golang |
| 26 | |
| 27 | override_dh_auto_build: |
| 28 | $(MAKE) -C _build/src/git.sr.ht/~rjarry/aerc VERSION=$(DEB_VERSION_UPSTREAM) |
| 29 | |
| 30 | override_dh_auto_test: |
| 31 | mkdir -p debian/test-gnupg |
| 32 | chmod og-rx debian/test-gnupg |
| 33 | GNUPGHOME=${CURDIR}/debian/test-gnupg dh_auto_test |
| 34 | rm -rf debian/test-gnupg |
| 35 | |
| 36 | override_dh_auto_install: |
| 37 | $(MAKE) -C_build/src/git.sr.ht/~rjarry/aerc install VERSION=$(DEB_VERSION_UPSTREAM) |