]> git.notmuchmail.org Git - notmuch/commitdiff
emacs: generate notmuch-pkg.el
authorDavid Bremner <david@tethera.net>
Fri, 11 Nov 2016 11:46:50 +0000 (07:46 -0400)
committerDavid Bremner <david@tethera.net>
Thu, 17 Nov 2016 01:45:56 +0000 (21:45 -0400)
This file contains metadata for the built in (as of emacs 24) packaging
system.

Makefile.local
emacs/.gitignore
emacs/Makefile.local
emacs/notmuch-pkg.el.tmpl [new file with mode: 0644]

index d1b0585f28665a06d7a249e7ee71eec581b984fb..0a122ab0e208c29c501bc3aee9c37243e06b13c9 100644 (file)
@@ -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))
index 9fa1c44e5b2d347b6043acf40935a3edffa91a42..8e15eed7111806cad24eaa0185d73cea6b23e83a 100644 (file)
@@ -1,3 +1,4 @@
 .eldeps*
 *.elc
 notmuch-version.el
+notmuch-pkg.el
index 558e68f2e2b71b38ef9ee8e8bfc5e7ee0a85605c..dfa7c1f11dcad859a7358fe6e3b049d53d880eb3 100644 (file)
@@ -28,6 +28,12 @@ $(dir)/notmuch-version.el: $(srcdir)/$(dir)/notmuch-version.el.tmpl
        @sed -e 's/%AG%/Generated file (from $(<F)) -- do not edit!/' \
             -e 's/%VERSION%/"$(VERSION)"/' $< > $@
 
+$(dir)/notmuch-pkg.el: $(srcdir)/$(dir)/notmuch-pkg.el.tmpl
+       @sed -e 's/%AG%/Generated file (from $(<F)) -- do not edit!/' \
+            -e 's/%VERSION%/"$(ELPA_VERSION)"/' $< > $@
+
+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 (file)
index 0000000..de97baa
--- /dev/null
@@ -0,0 +1,6 @@
+;; %AG%
+(define-package
+  "notmuch"
+  %VERSION%
+  "Emacs based front-end (MUA) for notmuch"
+  nil)