public inbox for bzip2-devel@sourceware.org
 help / color / mirror / Atom feed
* [PATCH bzip2 1/6] install relative symlinks
@ 2022-06-03  3:45 ~eschwartz
  2022-06-03  4:20 ` [PATCH bzip2 2/6] port the build configuration to autoconf ~eschwartz
                   ` (4 more replies)
  0 siblings, 5 replies; 9+ messages in thread
From: ~eschwartz @ 2022-06-03  3:45 UTC (permalink / raw)
  To: bzip2-devel; +Cc: eschwartz93

From: Eli Schwartz <eschwartz93@gmail.com>

During `make install`, symlinks for command aliases are created which
embed an absolute path to the installed location of the real file. This
causes issues with relocation, for example when packaging for distros.

Use symlinks that search for a file in the same directory as the
symlink, instead. This is guaranteed to have the same results, except
more accurate.
---
 Makefile | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/Makefile b/Makefile
index b0fef95..009463a 100644
--- a/Makefile
+++ b/Makefile
@@ -90,14 +90,14 @@ install: bzip2 bzip2recover
 	cp -f libbz2.a $(PREFIX)/lib
 	chmod a+r $(PREFIX)/lib/libbz2.a
 	cp -f bzgrep $(PREFIX)/bin/bzgrep
-	ln -s -f $(PREFIX)/bin/bzgrep $(PREFIX)/bin/bzegrep
-	ln -s -f $(PREFIX)/bin/bzgrep $(PREFIX)/bin/bzfgrep
+	ln -s -f bzgrep $(PREFIX)/bin/bzegrep
+	ln -s -f bzgrep $(PREFIX)/bin/bzfgrep
 	chmod a+x $(PREFIX)/bin/bzgrep
 	cp -f bzmore $(PREFIX)/bin/bzmore
-	ln -s -f $(PREFIX)/bin/bzmore $(PREFIX)/bin/bzless
+	ln -s -f bzmore $(PREFIX)/bin/bzless
 	chmod a+x $(PREFIX)/bin/bzmore
 	cp -f bzdiff $(PREFIX)/bin/bzdiff
-	ln -s -f $(PREFIX)/bin/bzdiff $(PREFIX)/bin/bzcmp
+	ln -s -f bzdiff $(PREFIX)/bin/bzcmp
 	chmod a+x $(PREFIX)/bin/bzdiff
 	cp -f bzgrep.1 bzmore.1 bzdiff.1 $(PREFIX)/man/man1
 	chmod a+r $(PREFIX)/man/man1/bzgrep.1
-- 
2.34.2


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2022-10-23 16:03 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-03  3:45 [PATCH bzip2 1/6] install relative symlinks ~eschwartz
2022-06-03  4:20 ` [PATCH bzip2 2/6] port the build configuration to autoconf ~eschwartz
2022-06-09  5:56   ` Eli Schwartz
2022-06-03  4:48 ` [PATCH bzip2 4/6] make a couple program aliases symlinks instead of copies ~eschwartz
2022-06-03  4:54 ` [PATCH bzip2 5/6] install man page symlinks for a couple more symlinked commands ~eschwartz
2022-06-03  5:09 ` [PATCH bzip2 6/6] install a pkg-config file with instructions for linking to libbz2 ~eschwartz
2022-06-09  5:52   ` Eli Schwartz
2022-10-23 16:03     ` Sam James
2022-06-09  4:50 ` [PATCH bzip2 3/6] shared Makefile: add install rule ~eschwartz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).