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
|
#!/usr/bin/make -f
export DH_VERBOSE = 1
include /usr/share/dpkg/pkg-info.mk
# The tarball source does not include the upstream version, so let's
# get it from the source package and inject it at build time
# (see packages gdu and golang-github-micromdm-scep for similar)
#
export CGO_ENABLED := 0
DH_GOPKG := github.com/gokcehan/lf
VERSION = $(DEB_VERSION_UPSTREAM)
GO_LDFLAGS := -ldflags '-X "main.gVersion=$(VERSION)"'
export DH_GOLANG_INSTALL_EXTRA := doc.txt
%:
dh $@ --buildsystem=golang --with=golang
override_dh_auto_build:
dh_auto_build -- $(GO_LDFLAGS)
override_dh_auto_install:
dh_auto_install -- --no-source
# Install completions
install -D -m644 $(CURDIR)/etc/lf.bash \
$(CURDIR)/debian/lf/usr/share/bash-completion/completions/lf
install -D -m644 $(CURDIR)/etc/lf.zsh \
$(CURDIR)/debian/lf/usr/share/zsh/vendor-completions/_lf
install -D -m644 $(CURDIR)/etc/lf.fish \
$(CURDIR)/debian/lf/usr/share/fish/vendor_completions.d/lf.fish
|