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 33 34 35 36 37 38 39
|
#!/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)
|