| 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_EXTRAscip-makefile . . . 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 DESTDIRscip-makefile . . . DESTDIR.=$(CURDIRscip-makefile . . . CURDIR.)/debian/aerc |
| 10 | export PREFIXscip-makefile . . . PREFIX.=/usr |
| 11 | |
| 12 | # Go options |
| 13 | export GO111MODULEscip-makefile . . . GO111MODULE.=off |
| 14 | export GOPROXYscip-makefile . . . GOPROXY.=off |
| 15 | export GOCACHEscip-makefile . . . GOCACHE.=$(CURDIRscip-makefile . . . CURDIR.)/_build/go-build |
| 16 | export GOPATHscip-makefile . . . GOPATH.=$(CURDIRscip-makefile . . . CURDIR.)/_build |
| 17 | export GOFLAGSscip-makefile . . . GOFLAGS.=-tags=notmuch -buildmode=pie |
| 18 | |
| 19 | # Hardening |
| 20 | export DEB_BUILD_MAINT_OPTIONSscip-makefile . . . DEB_BUILD_MAINT_OPTIONS. = hardening=+all |
| 21 | DPKG_EXPORT_BUILDFLAGSscip-makefile . . . DPKG_EXPORT_BUILDFLAGS. = 1 |
| 22 | include /usr/share/dpkg/buildflags.mk |
| 23 | |
| 24 | %scip-makefile . . . `%`/: |
| 25 | dh $@scip-makefile . . . `@`. --builddirectory=_build --buildsystem=golang --with=golang |
| 26 | |
| 27 | override_dh_auto_buildscip-makefile . . . override_dh_auto_build/: |
| 28 | $(MAKEscip-makefile . . . MAKE.) -C _build/src/git.sr.ht/~rjarry/aerc VERSION=$(DEB_VERSION_UPSTREAM) |
| 29 | |
| 30 | override_dh_auto_testscip-makefile . . . override_dh_auto_test/: |
| 31 | mkdir -p debian/test-gnupg |
| 32 | chmod og-rx debian/test-gnupg |
| 33 | GNUPGHOME=${CURDIRscip-makefile . . . CURDIR.}/debian/test-gnupg dh_auto_test |
| 34 | rm -rf debian/test-gnupg |
| 35 | |
| 36 | override_dh_auto_installscip-makefile . . . override_dh_auto_install/: |
| 37 | $(MAKEscip-makefile . . . MAKE.) -C_build/src/git.sr.ht/~rjarry/aerc install VERSION=$(DEB_VERSION_UPSTREAM) |