common.mk 661 Bytes
Newer Older
1 2 3 4 5 6 7
PACKAGE = $(shell dh_listpackages)
TMP = $(CURDIR)/debian/$(PACKAGE)

ifdef VERSION
define CHANGELOG
$(PACKAGE) ($(VERSION)) nexedi; urgency=low

8
 -- $(shell git log -1 --pretty='%cN <%cE>  %cD')
9 10 11 12 13 14 15 16 17 18
endef
export CHANGELOG

.PHONY: debian/changelog

debian/changelog:
	echo "$$CHANGELOG" >$@
endif

override_dh_install:
19
	make DESTDIR=$(TMP) PREFIX=/usr install
20

21
# BBB: compat < 10 ; https://bugs.debian.org/879727
22 23
override_dh_systemd_start:
	dh_systemd_start --restart-after-upgrade
24
	sed -i 's/_dh_action=try-restart/_dh_action=restart; for x in re6stnet re6st-registry; do systemctl is-enabled --quiet $$x.service || &; done/' debian/$(PACKAGE).postinst.debhelper