~delthas/senpai-dev

This thread contains a patchset. You're looking at the original emails, but you may wish to use the patch review UI. Review patch
1

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

Details
Message ID
<20240726000002.18487-1-me@runxiyu.org>
DKIM signature
pass
Download raw message
Patch: +6 -6
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
Details
Message ID
<2f483ced-a7f2-47b1-b59e-4a85b66b70a6@dille.cc>
In-Reply-To
<20240726000002.18487-1-me@runxiyu.org> (view parent)
DKIM signature
pass
Download raw message
Hi,

Thanks for your patch!

Applied (with small changes to the install command).
Reply to thread Export thread (mbox)