mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-11-25 12:28:09 +01:00
emacs: generate notmuch-pkg.el
This file contains metadata for the built in (as of emacs 24) packaging system.
This commit is contained in:
parent
a3e712fa86
commit
297d27e9f9
4 changed files with 17 additions and 1 deletions
|
@ -19,9 +19,12 @@ DATE:=$(shell date +%F)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
VERSION:=$(shell cat ${srcdir}/version)
|
VERSION:=$(shell cat ${srcdir}/version)
|
||||||
|
ELPA_VERSION:=$(subst ~,_,$(VERSION))
|
||||||
ifeq ($(filter release release-message pre-release update-versions,$(MAKECMDGOALS)),)
|
ifeq ($(filter release release-message pre-release update-versions,$(MAKECMDGOALS)),)
|
||||||
ifeq ($(IS_GIT),yes)
|
ifeq ($(IS_GIT),yes)
|
||||||
VERSION:=$(shell git --git-dir=${srcdir}/.git describe --abbrev=7 --match '[0-9.]*'|sed -e s/_/~/ -e s/-/+/ -e s/-/~/)
|
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)
|
# 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)
|
FILE_VERSION:=$(shell test -f version.stamp && read vs < version.stamp || vs=; echo $$vs)
|
||||||
ifneq ($(FILE_VERSION),$(VERSION))
|
ifneq ($(FILE_VERSION),$(VERSION))
|
||||||
|
|
1
emacs/.gitignore
vendored
1
emacs/.gitignore
vendored
|
@ -1,3 +1,4 @@
|
||||||
.eldeps*
|
.eldeps*
|
||||||
*.elc
|
*.elc
|
||||||
notmuch-version.el
|
notmuch-version.el
|
||||||
|
notmuch-pkg.el
|
||||||
|
|
|
@ -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!/' \
|
@sed -e 's/%AG%/Generated file (from $(<F)) -- do not edit!/' \
|
||||||
-e 's/%VERSION%/"$(VERSION)"/' $< > $@
|
-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 := \
|
emacs_images := \
|
||||||
$(srcdir)/$(dir)/notmuch-logo.png
|
$(srcdir)/$(dir)/notmuch-logo.png
|
||||||
|
@ -85,4 +91,4 @@ endif
|
||||||
mkdir -p "$(DESTDIR)$(emacsetcdir)"
|
mkdir -p "$(DESTDIR)$(emacsetcdir)"
|
||||||
install -m0644 $(emacs_images) "$(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
|
||||||
|
|
6
emacs/notmuch-pkg.el.tmpl
Normal file
6
emacs/notmuch-pkg.el.tmpl
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
;; %AG%
|
||||||
|
(define-package
|
||||||
|
"notmuch"
|
||||||
|
%VERSION%
|
||||||
|
"Emacs based front-end (MUA) for notmuch"
|
||||||
|
nil)
|
Loading…
Reference in a new issue