From d30a6e3d1f1cf035d018ec27145ef57c4ce41606 Mon Sep 17 00:00:00 2001 From: Drew DeVault Date: Sun, 26 May 2019 10:27:22 -0400 Subject: Subsitute prefix in aerc.conf for install --- .gitignore | 1 + Makefile | 21 +++++++++++++---- config/aerc.conf | 67 ----------------------------------------------------- config/aerc.conf.in | 67 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 85 insertions(+), 71 deletions(-) delete mode 100644 config/aerc.conf create mode 100644 config/aerc.conf.in diff --git a/.gitignore b/.gitignore index 426f49a..5ea4190 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,7 @@ /aerc log raw.log +aerc.conf *.1 *.5 *.7 diff --git a/Makefile b/Makefile index 5498a67..09ee192 100644 --- a/Makefile +++ b/Makefile @@ -5,12 +5,25 @@ SHAREDIR?=$(_INSTDIR)/share/aerc MANDIR?=$(_INSTDIR)/share/man GOFLAGS?= -aerc: +GOSRC := \ + $(wildcard *.go) \ + $(wildcard commands/*.go) \ + $(wildcard config/*.go) \ + $(wildcard lib/*.go) \ + $(wildcard ui/*.go) \ + $(wildcard widgets/*.go) \ + $(wildcard worker/*.go) \ + go.mod go.sum + +aerc: $(GOSRC) go build $(GOFLAGS) \ -ldflags "-X main.Prefix=$(PREFIX)" \ -ldflags "-X main.ShareDir=$(SHAREDIR)" \ -o $@ +aerc.conf: config/aerc.conf.in + sed -e 's:@SHAREDIR@:$(SHAREDIR):g' > $@ < $< + %.1: doc/%.1.scd scdoc < $< > $@ @@ -29,7 +42,7 @@ DOCS := \ doc: $(DOCS) -all: aerc doc +all: aerc aerc.conf doc clean: $(RM) *.1 *.5 *.7 aerc @@ -44,7 +57,7 @@ install: all install -m644 aerc-smtp.5 $(MANDIR)/man5/aerc-smtp.5 install -m644 aerc-tutorial.7 $(MANDIR)/man7/aerc-tutorial.7 install -m644 config/accounts.conf $(SHAREDIR)/accounts.conf - install -m644 config/aerc.conf $(SHAREDIR)/aerc.conf + install -m644 aerc.conf $(SHAREDIR)/aerc.conf install -m644 config/binds.conf $(SHAREDIR)/binds.conf install -m755 contrib/hldiff.py $(SHAREDIR)/filters/hldiff.py install -m755 contrib/html $(SHAREDIR)/filters/html @@ -52,4 +65,4 @@ install: all .DEFAULT_GOAL := all -.PHONY: aerc all doc clean install +.PHONY: all doc clean install diff --git a/config/aerc.conf b/config/aerc.conf deleted file mode 100644 index 6ed0c3b..0000000 --- a/config/aerc.conf +++ /dev/null @@ -1,67 +0,0 @@ -# -# aerc main configuration - -[ui] -# -# Describes the format for each row in a mailbox view. This field is compatible -# with mutt's printf-like syntax. TODO: document properly -# -# Default: -index-format=%4C %Z %D %-17.17n %s - -# -# See strftime(3) -# -# Default: %F %l:%M %p (ISO 8501 + 12 hour time) -timestamp-format=%F %l:%M %p - -# -# Width of the sidebar, including the border. -# -# Default: 20 -sidebar-width=20 - -# -# Message to display when viewing an empty folder. -# -# Default: (no messages) -empty-message=(no messages) - -[viewer] -# -# Specifies the pager to use when displaying emails. Note that some filters -# may add ANSI codes to add color to rendered emails, so you may want to use a -# pager which supports ANSI codes. -# -# Default: less -R -pager=less -R - -# -# If an email offers several versions (multipart), you can configure which -# mimetype to prefer. For example, this can be used to prefer plaintext over -# html emails. -# -# Default: text/plain,text/html -alternatives=text/plain,text/html - -[compose] -# -# Specifies the command to run the editor with. It will be shown in an embedded -# terminal, though it may also launch a graphical window if the environment -# supports it. Defaults to $EDITOR, or vi. -editor= - -[filters] -# -# Filters allow you to pipe an email body through a shell command to render -# certain emails differently, e.g. highlighting them with ANSI escape codes. -# -# The first filter which matches the email's mimetype will be used, so order -# them from most to least specific. -# -# You can also match on non-mimetypes, by prefixing with the header to match -# against (non-case-sensitive) and a comma, e.g. subject,text will match a -# subject which contains "text". Use header,~regex to match against a regex. -subject,~^\[PATCH=/usr/share/aerc/filters/hldiff.py -text/html=/usr/share/aerc/filters/html -text/*=/usr/share/aerc/filters/plaintext.py diff --git a/config/aerc.conf.in b/config/aerc.conf.in new file mode 100644 index 0000000..090e624 --- /dev/null +++ b/config/aerc.conf.in @@ -0,0 +1,67 @@ +# +# aerc main configuration + +[ui] +# +# Describes the format for each row in a mailbox view. This field is compatible +# with mutt's printf-like syntax. TODO: document properly +# +# Default: +index-format=%4C %Z %D %-17.17n %s + +# +# See strftime(3) +# +# Default: %F %l:%M %p (ISO 8501 + 12 hour time) +timestamp-format=%F %l:%M %p + +# +# Width of the sidebar, including the border. +# +# Default: 20 +sidebar-width=20 + +# +# Message to display when viewing an empty folder. +# +# Default: (no messages) +empty-message=(no messages) + +[viewer] +# +# Specifies the pager to use when displaying emails. Note that some filters +# may add ANSI codes to add color to rendered emails, so you may want to use a +# pager which supports ANSI codes. +# +# Default: less -R +pager=less -R + +# +# If an email offers several versions (multipart), you can configure which +# mimetype to prefer. For example, this can be used to prefer plaintext over +# html emails. +# +# Default: text/plain,text/html +alternatives=text/plain,text/html + +[compose] +# +# Specifies the command to run the editor with. It will be shown in an embedded +# terminal, though it may also launch a graphical window if the environment +# supports it. Defaults to $EDITOR, or vi. +editor= + +[filters] +# +# Filters allow you to pipe an email body through a shell command to render +# certain emails differently, e.g. highlighting them with ANSI escape codes. +# +# The first filter which matches the email's mimetype will be used, so order +# them from most to least specific. +# +# You can also match on non-mimetypes, by prefixing with the header to match +# against (non-case-sensitive) and a comma, e.g. subject,text will match a +# subject which contains "text". Use header,~regex to match against a regex. +subject,~^\[PATCH=@SHAREDIR@/filters/hldiff.py +text/html=@SHAREDIR@/filters/html +text/*=@SHAREDIR@/filters/plaintext.py -- cgit 1.4.1-2-gfad0