aboutsummaryrefslogtreecommitdiffstats
path: root/main/lz4/fix-man-dir.patch
blob: e5297145990cb46e2a93517110132ff3a3041094 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
diff --git a/programs/Makefile b/programs/Makefile
index c7ef6d11..71b18b91 100644
--- a/programs/Makefile
+++ b/programs/Makefile
@@ -133,24 +133,25 @@ bindir      ?= $(exec_prefix)/bin
 BINDIR      ?= $(bindir)
 datarootdir ?= $(PREFIX)/share
 mandir      ?= $(datarootdir)/man
+man1dir     ?= $(mandir)/man1
 
 ifneq (,$(filter $(shell uname),OpenBSD FreeBSD NetBSD DragonFly SunOS))
 MANDIR  ?= $(PREFIX)/man/man1
 else
-MANDIR  ?= $(mandir)
+MANDIR  ?= $(man1dir)
 endif
 
 INSTALL_PROGRAM ?= $(INSTALL) -m 755
 INSTALL_DATA    ?= $(INSTALL) -m 644
 
 
-install: lz4$(EXT) lz4c$(EXT)
+install: lz4
 	@echo Installing binaries
 	@$(INSTALL) -d -m 755 $(DESTDIR)$(BINDIR)/ $(DESTDIR)$(MANDIR)/
 	@$(INSTALL_PROGRAM) lz4 $(DESTDIR)$(BINDIR)/lz4
+	@ln -sf lz4 $(DESTDIR)$(BINDIR)/lz4c
 	@ln -sf lz4 $(DESTDIR)$(BINDIR)/lz4cat
 	@ln -sf lz4 $(DESTDIR)$(BINDIR)/unlz4
-	@$(INSTALL_PROGRAM) lz4c$(EXT) $(DESTDIR)$(BINDIR)/lz4c
 	@echo Installing man pages
 	@$(INSTALL_DATA) lz4.1 $(DESTDIR)$(MANDIR)/lz4.1
 	@ln -sf lz4.1 $(DESTDIR)$(MANDIR)/lz4c.1