~delthas/senpai-dev

Makefile: Use install(1) rather than cp(1) for installing v1 APPLIED

Runxi Yu: 1
 Makefile: Use install(1) rather than cp(1) for installing

 1 files changed, 6 insertions(+), 6 deletions(-)
Export patchset (mbox)
How do I use this?

Copy & paste the following snippet into your terminal to import this patchset into git:

curl -s https://lists.sr.ht/~delthas/senpai-dev/patches/54095/mbox | git am -3
Learn more about email & git

[PATCH v1] Makefile: Use install(1) rather than cp(1) for installing Export this patch

If the user uses a restrictive umask, the files copied via cp(1) would
not be world-executable. Most of the time I install to /usr/local/bin as
root, which causes the installed binaries to be not executable by normal
users.

By default, install(1) uses -rwxr-xr-x, which solves this.

Signed-off-by: Runxi Yu <me@runxiyu.org>
---
 Makefile | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/Makefile b/Makefile
index 7803bff..5eb9ea7 100644
--- a/Makefile
+++ b/Makefile
@@ -47,12 +47,12 @@ install:
	mkdir -p $(DESTDIR)$(PREFIX)/$(APPDIR)
	mkdir -p $(DESTDIR)$(PREFIX)/$(ICONDIR)/hicolor/48x48/apps
	mkdir -p $(DESTDIR)$(PREFIX)/$(ICONDIR)/hicolor/scalable/apps
	cp -f senpai $(DESTDIR)$(PREFIX)/$(BINDIR)
	cp -f doc/senpai.1 $(DESTDIR)$(PREFIX)/$(MANDIR)/man1
	cp -f doc/senpai.5 $(DESTDIR)$(PREFIX)/$(MANDIR)/man5
	cp -f contrib/senpai.desktop $(DESTDIR)$(PREFIX)/$(APPDIR)/senpai.desktop
	cp -f res/icon.48.png $(DESTDIR)$(PREFIX)/$(ICONDIR)/hicolor/48x48/apps/senpai.png
	cp -f res/icon.svg $(DESTDIR)$(PREFIX)/$(ICONDIR)/hicolor/scalable/apps/senpai.svg
	install senpai $(DESTDIR)$(PREFIX)/$(BINDIR)
	install doc/senpai.1 $(DESTDIR)$(PREFIX)/$(MANDIR)/man1
	install doc/senpai.5 $(DESTDIR)$(PREFIX)/$(MANDIR)/man5
	install -T contrib/senpai.desktop $(DESTDIR)$(PREFIX)/$(APPDIR)/senpai.desktop
	install -T res/icon.48.png $(DESTDIR)$(PREFIX)/$(ICONDIR)/hicolor/48x48/apps/senpai.png
	install -T res/icon.svg $(DESTDIR)$(PREFIX)/$(ICONDIR)/hicolor/scalable/apps/senpai.svg
uninstall:
	$(RM) $(DESTDIR)$(PREFIX)/$(BINDIR)/senpai
	$(RM) $(DESTDIR)$(PREFIX)/$(MANDIR)/man1/senpai.1

base-commit: a20f2a17ee615924dce8f3ed6930fc1be1305f6c
-- 
2.45.2
Hi,

Thanks for your patch!

Applied (with small changes to the install command).