From bb0f1801402e98266d2554a5f002dc8ce0419808 Mon Sep 17 00:00:00 2001 From: Robin Jarry Date: Sat, 19 Feb 2022 14:06:57 +0100 Subject: config: do not hardcode sharedir Instead of using a static SHAREDIR at compile time, use a list of standard paths to use at runtime for templates, config files and stylesets. This implies removing all default filters in the default configuration. Replace them with basic commands. New users can configure the filters as they wish. Signed-off-by: Robin Jarry --- Makefile | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index a1973d2..9c8b921 100644 --- a/Makefile +++ b/Makefile @@ -10,8 +10,6 @@ SHAREDIR?=$(PREFIX)/share/aerc MANDIR?=$(PREFIX)/share/man GO?=go GOFLAGS?= -LDFLAGS:=-X main.Prefix=$(PREFIX) -LDFLAGS+=-X main.ShareDir=$(SHAREDIR) LDFLAGS+=-X main.Version=$(VERSION) GOSRC:=$(shell find * -name '*.go') @@ -30,7 +28,7 @@ DOCS := \ aerc-templates.7 \ aerc-stylesets.7 -all: aerc aerc.conf $(DOCS) +all: aerc $(DOCS) aerc: $(GOSRC) $(GO) build $(GOFLAGS) -ldflags "$(LDFLAGS)" -o $@ @@ -47,9 +45,6 @@ checkfmt: exit 1; \ fi -aerc.conf: config/aerc.conf.in - sed -e 's:@SHAREDIR@:$(SHAREDIR):g' > $@ < config/aerc.conf.in - .PHONY: debug debug: aerc.debug @echo 'Run `./aerc.debug` and use this command in another terminal to attach a debugger:' @@ -73,9 +68,9 @@ doc: $(DOCS) RM?=rm -f clean: - $(RM) $(DOCS) aerc.conf aerc + $(RM) $(DOCS) aerc -install: $(DOCS) aerc aerc.conf +install: $(DOCS) aerc mkdir -m755 -p $(DESTDIR)$(BINDIR) $(DESTDIR)$(MANDIR)/man1 $(DESTDIR)$(MANDIR)/man5 $(DESTDIR)$(MANDIR)/man7 \ $(DESTDIR)$(SHAREDIR) $(DESTDIR)$(SHAREDIR)/filters $(DESTDIR)$(SHAREDIR)/templates $(DESTDIR)$(SHAREDIR)/stylesets install -m755 aerc $(DESTDIR)$(BINDIR)/aerc @@ -91,7 +86,7 @@ install: $(DOCS) aerc aerc.conf install -m644 aerc-templates.7 $(DESTDIR)$(MANDIR)/man7/aerc-templates.7 install -m644 aerc-stylesets.7 $(DESTDIR)$(MANDIR)/man7/aerc-stylesets.7 install -m644 config/accounts.conf $(DESTDIR)$(SHAREDIR)/accounts.conf - install -m644 aerc.conf $(DESTDIR)$(SHAREDIR)/aerc.conf + install -m644 config/aerc.conf $(DESTDIR)$(SHAREDIR)/aerc.conf install -m644 config/binds.conf $(DESTDIR)$(SHAREDIR)/binds.conf install -m755 filters/hldiff $(DESTDIR)$(SHAREDIR)/filters/hldiff install -m755 filters/html $(DESTDIR)$(SHAREDIR)/filters/html -- cgit v1.2.3