From 297d27e9f9f0341e40bfd9442dde5fdd1ad969ff Mon Sep 17 00:00:00 2001 From: David Bremner Date: Fri, 11 Nov 2016 07:46:50 -0400 Subject: [PATCH 1/1] emacs: generate notmuch-pkg.el This file contains metadata for the built in (as of emacs 24) packaging system. --- Makefile.local | 3 +++ emacs/.gitignore | 1 + emacs/Makefile.local | 8 +++++++- emacs/notmuch-pkg.el.tmpl | 6 ++++++ 4 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 emacs/notmuch-pkg.el.tmpl diff --git a/Makefile.local b/Makefile.local index d1b0585f..0a122ab0 100644 --- a/Makefile.local +++ b/Makefile.local @@ -19,9 +19,12 @@ DATE:=$(shell date +%F) endif VERSION:=$(shell cat ${srcdir}/version) +ELPA_VERSION:=$(subst ~,_,$(VERSION)) ifeq ($(filter release release-message pre-release update-versions,$(MAKECMDGOALS)),) ifeq ($(IS_GIT),yes) VERSION:=$(shell git --git-dir=${srcdir}/.git describe --abbrev=7 --match '[0-9.]*'|sed -e s/_/~/ -e s/-/+/ -e s/-/~/) +# drop the ~g$sha1 part +ELPA_VERSION:=$(word 1,$(subst ~, ,$(VERSION))) # Write the file 'version.stamp' in case its contents differ from $(VERSION) FILE_VERSION:=$(shell test -f version.stamp && read vs < version.stamp || vs=; echo $$vs) ifneq ($(FILE_VERSION),$(VERSION)) diff --git a/emacs/.gitignore b/emacs/.gitignore index 9fa1c44e..8e15eed7 100644 --- a/emacs/.gitignore +++ b/emacs/.gitignore @@ -1,3 +1,4 @@ .eldeps* *.elc notmuch-version.el +notmuch-pkg.el diff --git a/emacs/Makefile.local b/emacs/Makefile.local index 558e68f2..dfa7c1f1 100644 --- a/emacs/Makefile.local +++ b/emacs/Makefile.local @@ -28,6 +28,12 @@ $(dir)/notmuch-version.el: $(srcdir)/$(dir)/notmuch-version.el.tmpl @sed -e 's/%AG%/Generated file (from $( $@ +$(dir)/notmuch-pkg.el: $(srcdir)/$(dir)/notmuch-pkg.el.tmpl + @sed -e 's/%AG%/Generated file (from $( $@ + +all: $(dir)/notmuch-pkg.el +install-emacs: $(dir)/notmuch-pkg.el emacs_images := \ $(srcdir)/$(dir)/notmuch-logo.png @@ -85,4 +91,4 @@ endif mkdir -p "$(DESTDIR)$(emacsetcdir)" install -m0644 $(emacs_images) "$(DESTDIR)$(emacsetcdir)" -CLEAN := $(CLEAN) $(emacs_bytecode) $(dir)/notmuch-version.el +CLEAN := $(CLEAN) $(emacs_bytecode) $(dir)/notmuch-version.el $(dir)/notmuch-pkg.el diff --git a/emacs/notmuch-pkg.el.tmpl b/emacs/notmuch-pkg.el.tmpl new file mode 100644 index 00000000..de97baac --- /dev/null +++ b/emacs/notmuch-pkg.el.tmpl @@ -0,0 +1,6 @@ +;; %AG% +(define-package + "notmuch" + %VERSION% + "Emacs based front-end (MUA) for notmuch" + nil) -- 2.43.0