Debian Codegraph @

debian/rules

raw
1 #!/usr/bin/make -f
2
3 include /usr/share/dpkg/pkg-info.mk
4
5 export DH_GOLANG_EXCLUDES := scripts/*
6 export DH_GOLANG_INSTALL_EXTRA := pkg/i18n/translations/ja.json \
7 pkg/i18n/translations/pl.json \
8 pkg/i18n/translations/ru.json \
9 pkg/i18n/translations/ko.json \
10 pkg/i18n/translations/pt.json \
11 pkg/i18n/translations/zh-CN.json \
12 pkg/i18n/translations/nl.json \
13 pkg/i18n/translations/zh-TW.json
14 export DH_GOLANG_BUILDPKG := github.com/jesseduffield/lazygit
15
16 BUILDFLAGS := -ldflags="-extldflags -Wl,-z,now -X main.version='$(DEB_VERSION)' -X main.buildSource='debian'"
17 ifneq ($(shell dpkg-architecture -qDEB_HOST_ARCH), mips64el)
18 BUILDFLAGS += -buildmode=pie
19 endif
20
21 %:
22 dh $@ --buildsystem=golang --with=golang
23
24 override_dh_auto_build:
25 dh_auto_build -- $(BUILDFLAGS)
26
27 override_dh_auto_configure:
28 # Generate manpage from template using @DEB_VERSION@ for package version
29 sed "s/@DEB_VERSION@/$(DEB_VERSION)/" debian/manpages/lazygit.1.in > debian/manpages/lazygit.1
30 dh_auto_configure
31
32 override_dh_auto_install:
33 dh_auto_install -- --no-source