#!/usr/bin/make -f include /usr/share/dpkg/pkg-info.mk VERSION=$(DEB_VERSION_UPSTREAM) CP ?= install -p -m 644 MKDIR ?= install -p -m 755 -d RMDIR ?= rm -rf TAR ?= tar %: dh $@ --with elpa override_dh_auto_build: with-editor-$(VERSION).tar @echo with-editor-$(VERSION).tar > debian/elpa-with-editor.elpa @make info override_dh_auto_install: @echo do not run make install override_dh_clean: dh_clean rm -f debian/elpa-with-editor.elpa with-editor-*.tar with-editor.info dir define with_editor_pkg (define-package "with-editor" "$(VERSION)" "Use the Emacsclient as $$EDITOR" ()) endef export with_editor_pkg with-editor-$(VERSION).tar: @printf "Packing $@\n" @$(MKDIR) with-editor-$(VERSION) @printf "$$with_editor_pkg\n" > with-editor-$(VERSION)/with-editor-pkg.el @$(CP) with-editor.el with-editor-$(VERSION) @$(TAR) c --mtime=./with-editor-$(VERSION) \ -f with-editor-$(VERSION).tar with-editor-$(VERSION) @$(RMDIR) with-editor-$(VERSION)