| 1 |
#!/usr/bin/make -f |
| 2 |
|
| 3 |
include /usr/share/dpkg/pkg-info.mk |
| 4 |
|
| 5 |
export DH_GOPKG := github.com/tomnomnom/gron |
| 6 |
export GO_LDFLAGS += -X main.gronVersion=${DEB_VERSION_UPSTREAM} |
| 7 |
|
| 8 |
export DH_VERBOSE = 1 |
| 9 |
|
| 10 |
override_dh_auto_build: |
| 11 |
dh_auto_build -- -ldflags '$(GO_LDFLAGS)' |
| 12 |
sed -e "s/__VERSION__/$(DEB_VERSION_UPSTREAM)/g" < debian/gron.1.md.in > debian/gron.1.md |
| 13 |
pandoc debian/gron.1.md -s -f markdown -t man -o debian/gron.1 |
| 14 |
|
| 15 |
override_dh_auto_install: |
| 16 |
dh_auto_install -- --no-source |
| 17 |
# Install completions |
| 18 |
install -D -m644 $(CURDIR)/completions/gron.fish \ |
| 19 |
$(CURDIR)/debian/gron/usr/share/fish/vendor_completions.d/gron.fish |
| 20 |
|
| 21 |
override_dh_installchangelogs: |
| 22 |
pandoc -f markdown_github -t plain -o CHANGELOG CHANGELOG.mkd |
| 23 |
dh_installchangelogs CHANGELOG |
| 24 |
|
| 25 |
%: |
| 26 |
dh $@ --buildsystem=golang --with=golang |