summaryrefslogtreecommitdiff
path: root/archivers/lz4/patches/patch-programs_Makefile
blob: 7b6ca0db8a97561c26efe63fd7bebd67159c8836 (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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
$NetBSD: patch-programs_Makefile,v 1.7 2017/01/04 15:43:51 fhajny Exp $

Unlock install target. Use pkgsrc install scripts.

--- programs/Makefile.orig	2017-01-03 05:09:52.000000000 +0000
+++ programs/Makefile
@@ -108,11 +108,6 @@ preview-man: clean-man man
 	man ./lz4.1
 
 
-#-----------------------------------------------------------------------------
-# make install is validated only for Linux, OSX, BSD, Hurd and Solaris targets
-#-----------------------------------------------------------------------------
-ifneq (,$(filter $(shell uname),Linux Darwin GNU/kFreeBSD GNU OpenBSD FreeBSD NetBSD DragonFly SunOS))
-
 unlz4: lz4
 	ln -s lz4 unlz4
 
@@ -130,11 +125,7 @@ PREFIX  ?= /usr/local
 DESTDIR ?=
 BINDIR  ?= $(PREFIX)/bin
 
-ifneq (,$(filter $(shell uname),OpenBSD FreeBSD NetBSD DragonFly SunOS))
-MANDIR  ?= $(PREFIX)/man/man1
-else
-MANDIR  ?= $(PREFIX)/share/man/man1
-endif
+MANDIR  ?= $(PREFIX)/$(PKGMANDIR)/man1
 
 INSTALL_PROGRAM ?= $(INSTALL) -m 755
 INSTALL_SCRIPT  ?= $(INSTALL) -m 755
@@ -143,13 +134,13 @@ INSTALL_MAN     ?= $(INSTALL) -m 644
 
 install: lz4$(EXT) lz4c$(EXT)
 	@echo Installing binaries
-	@$(INSTALL) -d -m 755 $(DESTDIR)$(BINDIR)/ $(DESTDIR)$(MANDIR)/
-	@$(INSTALL_PROGRAM) lz4 $(DESTDIR)$(BINDIR)/lz4
+	@$(BSD_INSTALL_PROGRAM_DIR) -d -m 755 $(DESTDIR)$(BINDIR)/ $(DESTDIR)$(MANDIR)/
+	@$(BSD_INSTALL_PROGRAM) lz4 $(DESTDIR)$(BINDIR)/lz4
 	@ln -sf lz4 $(DESTDIR)$(BINDIR)/lz4cat
 	@ln -sf lz4 $(DESTDIR)$(BINDIR)/unlz4
-	@$(INSTALL_PROGRAM) lz4c$(EXT) $(DESTDIR)$(BINDIR)/lz4c
+	@$(BSD_INSTALL_PROGRAM) lz4c$(EXT) $(DESTDIR)$(BINDIR)/lz4c
 	@echo Installing man pages
-	@$(INSTALL_MAN) -m 644 lz4.1 $(DESTDIR)$(MANDIR)/lz4.1
+	@$(BSD_INSTALL_MAN) -m 644 lz4.1 $(DESTDIR)$(MANDIR)/lz4.1
 	@ln -sf lz4.1 $(DESTDIR)$(MANDIR)/lz4c.1
 	@ln -sf lz4.1 $(DESTDIR)$(MANDIR)/lz4cat.1
 	@ln -sf lz4.1 $(DESTDIR)$(MANDIR)/unlz4.1
@@ -166,4 +157,3 @@ uninstall:
 	@$(RM) $(DESTDIR)$(MANDIR)/unlz4.1
 	@echo lz4 programs successfully uninstalled
 
-endif