summaryrefslogtreecommitdiff
path: root/archivers/lz4/patches/patch-programs_Makefile
blob: 39492d5887852976a918b4cc5f9fa9ec33ce79d4 (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
$NetBSD: patch-programs_Makefile,v 1.3 2014/12/12 11:20:56 fhajny Exp $

Make portable, use pkgsrc install scripts.
--- programs/Makefile.orig	2014-11-06 18:39:42.000000000 +0000
+++ programs/Makefile
@@ -40,7 +40,7 @@ CFLAGS += -std=c99 -Wall -Wextra -Wundef
 FLAGS   = -I.. $(CPPFLAGS) $(CFLAGS) $(LDFLAGS)
 
 BINDIR=$(PREFIX)/bin
-MANDIR=$(PREFIX)/share/man/man1
+MANDIR=$(PREFIX)/$(PKGMANDIR)/man1
 LZ4DIR=..
 
 TEST_FILES = COPYING
@@ -106,20 +106,16 @@ clean:
 	@echo Cleaning completed
 
 
-#------------------------------------------------------------------------
-#make install is validated only for Linux, OSX, kFreeBSD and Hurd targets
-ifneq (,$(filter $(shell uname),Linux Darwin GNU/kFreeBSD GNU))
-
 install: lz4 lz4c
 	@echo Installing binaries
-	@install -d -m 755 $(DESTDIR)$(BINDIR)/ $(DESTDIR)$(MANDIR)/
-	@install -m 755 lz4   $(DESTDIR)$(BINDIR)/lz4
+	$(BSD_INSTALL_PROGRAM_DIR) -d -m 755 $(DESTDIR)$(BINDIR)/ $(DESTDIR)$(MANDIR)/
+	$(BSD_INSTALL_PROGRAM) -m 755 lz4   $(DESTDIR)$(BINDIR)/lz4
 	@ln -sf lz4 $(DESTDIR)$(BINDIR)/lz4cat
-	@install -m 755 lz4c  $(DESTDIR)$(BINDIR)/lz4c
+	$(BSD_INSTALL_PROGRAM) -m 755 lz4c  $(DESTDIR)$(BINDIR)/lz4c
 	@echo Installing man pages
-	@install -m 644 lz4.1 $(DESTDIR)$(MANDIR)/lz4.1
-	@install -m 644 lz4c.1 $(DESTDIR)$(MANDIR)/lz4c.1
-	@install -m 644 lz4cat.1 $(DESTDIR)$(MANDIR)/lz4cat.1
+	$(BSD_INSTALL_MAN) -m 644 lz4.1 $(DESTDIR)$(MANDIR)/lz4.1
+	$(BSD_INSTALL_MAN) -m 644 lz4c.1 $(DESTDIR)$(MANDIR)/lz4c.1
+	$(BSD_INSTALL_MAN) -m 644 lz4cat.1 $(DESTDIR)$(MANDIR)/lz4cat.1
 	@echo lz4 installation completed
 
 uninstall:
@@ -201,4 +197,3 @@ test-mem: lz4 datagen fuzzer frametest
 test-mem32: lz4c32 datagen
 # unfortunately, valgrind doesn't seem to work with non-native binary. If someone knows how to do a valgrind-test on a 32-bits exe with a 64-bits system...
 
-endif