aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorRobin Jarry <robin@jarry.cc>2023-01-08 20:44:22 +0100
committerRobin Jarry <robin@jarry.cc>2023-01-10 21:49:18 +0100
commit04303172d4f96b284e0c915ce4a7b87e1439bb87 (patch)
tree4dcadaeb7995ccee0b260f384b063d8144e37c4c /Makefile
parent21d8963928162e8a1fe62b39c87b3e4735b05dba (diff)
downloadaerc-04303172d4f96b284e0c915ce4a7b87e1439bb87.tar.gz
filters: install them in $PREFIX/libexec/aerc/filters
The filesystem hierarchy standard describes /usr/share as "Architecture-independent data". This folder is not intended for executable scripts and especially not for arch specific binary files (such as the wrap filter). Lintian reports an error with aerc 0.14.0: arch-dependent-file-in-usr-share [usr/share/aerc/filters/wrap] Which I had to fix by moving the filter into /usr/libexec. Install all filters into $PREFIX/libexec/aerc/filters and update the default SearchDirs to look them up in here as well. Link: https://refspecs.linuxfoundation.org/FHS_3.0/fhs/ch04s11.html Link: https://salsa.debian.org/go-team/packages/aerc/-/commit/a0ca00260ffd Signed-off-by: Robin Jarry <robin@jarry.cc> Acked-by: Moritz Poldrack <moritz@poldrack.dev>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile21
1 files changed, 12 insertions, 9 deletions
diff --git a/Makefile b/Makefile
index 49cc571b..b4754051 100644
--- a/Makefile
+++ b/Makefile
@@ -7,6 +7,7 @@ VPATH=doc
PREFIX?=/usr/local
BINDIR?=$(PREFIX)/bin
SHAREDIR?=$(PREFIX)/share/aerc
+LIBEXECDIR?=$(PREFIX)/libexec/aerc
MANDIR?=$(PREFIX)/share/man
GO?=go
GOFLAGS?=
@@ -17,6 +18,7 @@ GO_LDFLAGS:=
GO_LDFLAGS+=-X main.Version=$(VERSION)
GO_LDFLAGS+=-X main.Flags=$(flags)
GO_LDFLAGS+=-X git.sr.ht/~rjarry/aerc/config.shareDir=$(SHAREDIR)
+GO_LDFLAGS+=-X git.sr.ht/~rjarry/aerc/config.libexecDir=$(LIBEXECDIR)
GO_LDFLAGS+=$(GO_EXTRA_LDFLAGS)
GOSRC!=find * -name '*.go' | grep -v filters/wrap.go
@@ -112,7 +114,7 @@ clean:
install: $(DOCS) aerc wrap
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 \
- $(DESTDIR)$(PREFIX)/share/applications
+ $(DESTDIR)$(PREFIX)/share/applications $(DESTDIR)$(LIBEXECDIR)/filters
install -m755 aerc $(DESTDIR)$(BINDIR)/aerc
install -m644 aerc.1 $(DESTDIR)$(MANDIR)/man1/aerc.1
install -m644 aerc-search.1 $(DESTDIR)$(MANDIR)/man1/aerc-search.1
@@ -130,14 +132,14 @@ install: $(DOCS) aerc wrap
install -m644 config/accounts.conf $(DESTDIR)$(SHAREDIR)/accounts.conf
install -m644 config/aerc.conf $(DESTDIR)$(SHAREDIR)/aerc.conf
install -m644 config/binds.conf $(DESTDIR)$(SHAREDIR)/binds.conf
- install -m755 filters/calendar $(DESTDIR)$(SHAREDIR)/filters/calendar
- install -m755 filters/colorize $(DESTDIR)$(SHAREDIR)/filters/colorize
- install -m755 filters/hldiff $(DESTDIR)$(SHAREDIR)/filters/hldiff
- install -m755 filters/html $(DESTDIR)$(SHAREDIR)/filters/html
- install -m755 filters/html-unsafe $(DESTDIR)$(SHAREDIR)/filters/html-unsafe
- install -m755 filters/plaintext $(DESTDIR)$(SHAREDIR)/filters/plaintext
- install -m755 filters/show-ics-details.py $(DESTDIR)$(SHAREDIR)/filters/show-ics-details.py
- install -m755 wrap $(DESTDIR)$(SHAREDIR)/filters/wrap
+ install -m755 filters/calendar $(DESTDIR)$(LIBEXECDIR)/filters/calendar
+ install -m755 filters/colorize $(DESTDIR)$(LIBEXECDIR)/filters/colorize
+ install -m755 filters/hldiff $(DESTDIR)$(LIBEXECDIR)/filters/hldiff
+ install -m755 filters/html $(DESTDIR)$(LIBEXECDIR)/filters/html
+ install -m755 filters/html-unsafe $(DESTDIR)$(LIBEXECDIR)/filters/html-unsafe
+ install -m755 filters/plaintext $(DESTDIR)$(LIBEXECDIR)/filters/plaintext
+ install -m755 filters/show-ics-details.py $(DESTDIR)$(LIBEXECDIR)/filters/show-ics-details.py
+ install -m755 wrap $(DESTDIR)$(LIBEXECDIR)/filters/wrap
install -m644 templates/new_message $(DESTDIR)$(SHAREDIR)/templates/new_message
install -m644 templates/quoted_reply $(DESTDIR)$(SHAREDIR)/templates/quoted_reply
install -m644 templates/forward_as_body $(DESTDIR)$(SHAREDIR)/templates/forward_as_body
@@ -180,6 +182,7 @@ uninstall:
$(RM) $(DESTDIR)$(MANDIR)/man7/aerc-templates.7
$(RM) $(DESTDIR)$(MANDIR)/man7/aerc-stylesets.7
$(RM) -r $(DESTDIR)$(SHAREDIR)
+ $(RM) -r $(DESTDIR)$(LIBEXECDIR)
${RMDIR_IF_EMPTY} $(DESTDIR)$(BINDIR)
$(RMDIR_IF_EMPTY) $(DESTDIR)$(MANDIR)/man1
$(RMDIR_IF_EMPTY) $(DESTDIR)$(MANDIR)/man5