diff options
Diffstat (limited to '')
-rwxr-xr-x | debian/rules | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/debian/rules b/debian/rules new file mode 100755 index 0000000..c5ec56d --- /dev/null +++ b/debian/rules @@ -0,0 +1,45 @@ +#!/usr/bin/make -f + +export DH_VERBOSE=1 + +export DH_GOLANG_BUILDPKG=github.com/icinga/icingadb/cmd/icingadb \ + github.com/icinga/icingadb/cmd/icingadb-migrate + +export GO111MODULE=on + +include /usr/share/dpkg/pkg-info.mk + +BUILD_DATE=$(shell LC_ALL=C date -u "+%d %B %Y" -d "@$(SOURCE_DATE_EPOCH)") + +MANPAGES := $(wildcard debian/man/*.*.xml) + +%: + dh $@ --builddirectory=_build --buildsystem=golang + +override_dh_clean: + dh_clean debian/man/*.8 + +override_dh_auto_configure: + dh_auto_configure + + (mkdir -p _build/pkg && cd _build/pkg && ln -s ../../dependencies/pkg/* .) + +override_dh_auto_build: + # Create man page from DocBook XML + for x in $(MANPAGES) ; do \ + docbook2x-man --string-param header-3="$(BUILD_DATE)" $$x ; \ + mv `basename $$x | sed 's/.xml$$//'` `dirname $$x` ; \ + done + + dh_auto_build + +override_dh_auto_install: + dh_auto_install -- --no-source + + mv debian/icingadb/usr/bin debian/icingadb/usr/sbin + +override_dh_installsystemd: + dh_installsystemd --no-enable --no-start + +override_dh_compress: + dh_compress -X.md |