blob: c42e0f936016b9e79f37ee97954da55eea66939e (
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
|
Subject: [patch] make install stage destdir-aware
From: Robert Schwebel <r.schwebel@pengutronix.de>
This patch makes the install stage DESTDIR aware. The DESTDIR variable
is used to specify where the result of the installation shall go to and
is usually used for distribution building.
Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>
---
Index: db-4.1.25.NC/dist/Makefile.in
===================================================================
--- db-4.1.25.NC.orig/dist/Makefile.in
+++ db-4.1.25.NC/dist/Makefile.in
@@ -541,30 +541,30 @@ library_install: install_include install
uninstall: uninstall_include uninstall_lib uninstall_utilities uninstall_docs
install_setup:
- @test -d $(prefix) || \
- ($(mkdir) -p $(prefix) && $(chmod) $(dmode) $(prefix))
+ @test -d $(DESTDIR)/$(prefix) || \
+ ($(mkdir) -p $(DESTDIR)/$(prefix) && $(chmod) $(dmode) $(DESTDIR)/$(prefix))
INCDOT= db.h db_cxx.h @ADDITIONAL_INCS@
INCINC= cxx_common.h cxx_except.h
install_include:
@echo "Installing DB include files: $(includedir) ..."
- @test -d $(includedir) || \
- ($(mkdir) -p $(includedir) && $(chmod) $(dmode) $(includedir))
- @cd $(includedir) && $(rm) -f $(INCDOT) $(INCINC)
- @$(cp) -p $(INCDOT) $(includedir)
- @cd $(srcdir)/dbinc/ && $(cp) -p $(INCINC) $(includedir)
- @cd $(includedir) && $(chmod) $(fmode) $(INCDOT) $(INCINC)
+ @test -d $(DESTDIR)/$(includedir) || \
+ ($(mkdir) -p $(DESTDIR)/$(includedir) && $(chmod) $(dmode) $(DESTDIR)/$(includedir))
+ @cd $(DESTDIR)/$(includedir) && $(rm) -f $(INCDOT) $(INCINC)
+ @$(cp) -p $(INCDOT) $(DESTDIR)/$(includedir)
+ @cd $(srcdir)/dbinc/ && $(cp) -p $(INCINC) $(DESTDIR)/$(includedir)
+ @cd $(DESTDIR)/$(includedir) && $(chmod) $(fmode) $(INCDOT) $(INCINC)
uninstall_include:
- @cd $(includedir) && $(rm) -f $(INCDOT) $(INCINC)
+ @cd $(DESTDIR)/$(includedir) && $(rm) -f $(INCDOT) $(INCINC)
install_lib:
@echo "Installing DB library: $(libdir) ..."
- @test -d $(libdir) || \
- ($(mkdir) -p $(libdir) && $(chmod) $(dmode) $(libdir))
- @cd $(libdir) && $(rm) -f $(LIB_INSTALL_FILE_LIST)
- @$(INSTALLER) @INSTALL_LIBS@ $(libdir)
- @(cd $(libdir) && \
+ @test -d $(DESTDIR)/$(libdir) || \
+ ($(mkdir) -p $(DESTDIR)/$(libdir) && $(chmod) $(dmode) $(DESTDIR)/$(libdir))
+ @cd $(DESTDIR)/$(libdir) && $(rm) -f $(LIB_INSTALL_FILE_LIST)
+ @$(INSTALLER) @INSTALL_LIBS@ $(DESTDIR)/$(libdir)
+ @(cd $(DESTDIR)/$(libdir) && \
test -f $(libso) && $(ln) -s $(libso) $(libso_default); \
test -f $(libso) && $(ln) -s $(libso) $(libso_major); \
test -f $(libso_static) && $(ln) -s $(libso_static) $(libdb); \
@@ -577,26 +577,26 @@ install_lib:
test -f $(libjso) && $(ln) -s $(libjso) $(libjso_major); \
test -f $(libjso) && $(ln) -s $(libjso) $(libjso_g)) || true
@(test -f $(libj_jarfile) && \
- $(cp) $(libj_jarfile) $(libdir) && \
- $(chmod) $(fmode) $(libdir)/$(libj_jarfile)) || true
+ $(cp) $(libj_jarfile) $(DESTDIR)/$(libdir) && \
+ $(chmod) $(fmode) $(DESTDIR)/$(libdir)/$(libj_jarfile)) || true
uninstall_lib:
- @cd $(libdir) && $(rm) -f $(LIB_INSTALL_FILE_LIST)
+ @cd $(DESTDIR)/$(libdir) && $(rm) -f $(LIB_INSTALL_FILE_LIST)
install_utilities:
echo "Installing DB utilities: $(bindir) ..."
- @test -d $(bindir) || \
- ($(mkdir) -p $(bindir) && $(chmod) $(dmode) $(bindir))
+ @test -d $(DESTDIR)/$(bindir) || \
+ ($(mkdir) -p $(DESTDIR)/$(bindir) && $(chmod) $(dmode) $(DESTDIR)/$(bindir))
@for i in $(UTIL_PROGS); do \
- $(rm) -f $(bindir)/$$i $(bindir)/$$i.exe; \
+ $(rm) -f $(DESTDIR)/$(bindir)/$$i $(bindir)/$$i.exe; \
test -f $$i.exe && i=$$i.exe || true; \
- $(INSTALLER) $$i $(bindir)/$$i; \
- test -f $(strip) && $(strip) $(bindir)/$$i || true; \
- $(chmod) $(emode) $(bindir)/$$i; \
+ $(INSTALLER) $$i $(DESTDIR)/$(bindir)/$$i; \
+ test -f $(strip) && $(strip) $(DESTDIR)/$(bindir)/$$i || true; \
+ $(chmod) $(emode) $(DESTDIR)/$(bindir)/$$i; \
done
uninstall_utilities:
- @(cd $(bindir); for i in $(UTIL_PROGS); do \
+ @(cd $(DESTDIR)/$(bindir); for i in $(UTIL_PROGS); do \
$(rm) -f $$i $$i.exe; \
done)
@@ -605,13 +605,13 @@ DOCLIST=\
sleepycat utility
install_docs:
@echo "Installing documentation: $(docdir) ..."
- @test -d $(docdir) || \
- ($(mkdir) -p $(docdir) && $(chmod) $(dmode) $(docdir))
- @cd $(docdir) && $(rm) -rf $(DOCLIST)
- @cd $(srcdir)/docs && $(cp) -pr $(DOCLIST) $(docdir)/
+ @test -d $(DESTDIR)/$(docdir) || \
+ ($(mkdir) -p $(DESTDIR)/$(docdir) && $(chmod) $(dmode) $(DESTDIR)/$(docdir))
+ @cd $(DESTDIR)/$(docdir) && $(rm) -rf $(DOCLIST)
+ @cd $(srcdir)/docs && $(cp) -pr $(DOCLIST) $(DESTDIR)/$(docdir)/
uninstall_docs:
- @cd $(docdir) && $(rm) -rf $(DOCLIST)
+ @cd $(DESTDIR)/$(docdir) && $(rm) -rf $(DOCLIST)
##################################################
# RPM, Embedix build and install.
|