diff options
| author | David Bremner <david@tethera.net> | 2018-09-16 14:08:07 -0300 |
|---|---|---|
| committer | David Bremner <david@tethera.net> | 2018-09-18 07:54:33 -0300 |
| commit | 84efbda92573c0aa9cedd6a4b66817579a3fddb3 (patch) | |
| tree | e39973b1a3cd5938f8f2e57936c820136f31626f /contrib/notmuch-mutt | |
| parent | 11d0edeac2a91a3f6d786d1ca6900b9f7ed45765 (diff) | |
contrib/notmuch-mutt: add install target
The main goal here is to be able to install the notmuch-mutt script
with an absolute shebang. I have tried to make the notmuch-mutt
Makefile use configure information from notmuch if available, but make
suitable guesses if not.
Diffstat (limited to 'contrib/notmuch-mutt')
| -rw-r--r-- | contrib/notmuch-mutt/Makefile | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/contrib/notmuch-mutt/Makefile b/contrib/notmuch-mutt/Makefile index 87f9031c..855438be 100644 --- a/contrib/notmuch-mutt/Makefile +++ b/contrib/notmuch-mutt/Makefile @@ -1,5 +1,11 @@ NAME = notmuch-mutt +-include ../../Makefile.config +PERL_ABSOLUTE ?= $(shell command -v perl 2>/dev/null) +prefix ?= /usr/local +sysconfdir ?= ${prefix}/etc +mandir ?= ${prefix}/share/man + all: $(NAME) $(NAME).1 $(NAME).1: $(NAME) @@ -8,5 +14,12 @@ $(NAME).1: $(NAME) README.html: README markdown $< > $@ +install: all + mkdir -p $(DESTDIR)$(prefix)/bin + sed "1s|^#!.*|#! $(PERL_ABSOLUTE)|" < $(NAME) > $(DESTDIR)$(prefix)/bin/$(NAME) + chmod 755 $(DESTDIR)$(prefix)/bin/$(NAME) + install -D -m 644 $(NAME).1 $(DESTDIR)$(mandir)/man1/$(NAME).1 + install -D -m 644 $(NAME).rc $(DESTDIR)$(sysconfdir)/Muttrc.d/$(NAME).rc + clean: rm -f notmuch-mutt.1 README.html |
