aboutsummaryrefslogtreecommitdiff
path: root/package/leveldb/0002-Add-install-recipe.patch
blob: f65916f1eb4613b74e8c1f01adcfe84ebfc6b337 (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
From bf646b73391d3d2d0b9780a399dd24880c66b9ab Mon Sep 17 00:00:00 2001
From: Steve James <ste@junkomatic.net>
Date: Sun, 5 Apr 2015 16:30:46 +0200
Subject: [PATCH 2/2] Add install recipe

Upstream-Status: Rejected [https://github.com/google/leveldb/pull/276]

Signed-off-by: Steve James <ste@junkomatic.net>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
[baruch: update for v1.19]
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
---
 Makefile | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/Makefile b/Makefile
index 07a5a1ead6fd..c87023db527a 100644
--- a/Makefile
+++ b/Makefile
@@ -412,3 +412,17 @@ $(SHARED_OUTDIR)/%.o: %.cc
 
 $(SHARED_OUTDIR)/%.o: %.c
 	$(CC) $(CFLAGS) $(PLATFORM_SHARED_CFLAGS) -c $< -o $@
+
+INSTALL_ROOT = /
+INSTALL_PREFIX= usr/local
+
+install: all
+	install -d -m 0755 $(INSTALL_ROOT)$(INSTALL_PREFIX)/include/leveldb
+	install -D -m 0644 include/leveldb/*.h $(INSTALL_ROOT)$(INSTALL_PREFIX)/include/leveldb
+	install -d -m 0755 $(INSTALL_ROOT)$(INSTALL_PREFIX)/lib
+	install -m 0644 $(STATIC_OUTDIR)/libleveldb.a $(INSTALL_ROOT)$(INSTALL_PREFIX)/lib
+ifneq (,$(SHARED_LIBS))
+	install -m 0755 $(SHARED_OUTDIR)/$(SHARED_LIB3) $(INSTALL_ROOT)$(INSTALL_PREFIX)/lib
+	ln -sf $(SHARED_LIB3) $(INSTALL_ROOT)$(INSTALL_PREFIX)/lib/$(SHARED_LIB1)
+	ln -sf $(SHARED_LIB3) $(INSTALL_ROOT)$(INSTALL_PREFIX)/lib/$(SHARED_LIB2)
+endif
-- 
2.1.0