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
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
|
- Make OpenSRF parallel-build safe
- DESTDIR fixups
- split out install targets to build the apache modules
- disable perl and apache install targets, will use gentoo tools instead
- compile fix to osrf_chat.c
- Hardcode location of osrf_config instead of using a long recursive find statement
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
diff -Nuar OpenSRF-1.0.1.orig/Makefile.am OpenSRF-1.0.1/Makefile.am
--- OpenSRF-1.0.1.orig/Makefile.am 2008-10-26 22:10:21.000000000 -0700
+++ OpenSRF-1.0.1/Makefile.am 2008-12-08 23:44:44.402248471 -0800
@@ -115,13 +115,13 @@
SUBDIRS = src
jserver:
- make -s -C src jserver
+ $(MAKE) -s -C src jserver
jserver-install:
- make -s -C src jserver-install
+ $(MAKE) -s -C src jserver-install
javascript-install:
- make -s -C src javascript-install
+ $(MAKE) -s -C src javascript-install
install-data-hook:
cp @srcdir@/src/gateway/apachetools.h @includedir@/opensrf/apachetools.h
diff -Nuar OpenSRF-1.0.1.orig/src/gateway/Makefile.am OpenSRF-1.0.1/src/gateway/Makefile.am
--- OpenSRF-1.0.1.orig/src/gateway/Makefile.am 2008-08-18 12:14:00.000000000 -0700
+++ OpenSRF-1.0.1/src/gateway/Makefile.am 2008-12-08 23:44:44.405703486 -0800
@@ -16,16 +16,25 @@
AM_CFLAGS = -D_LARGEFILE64_SOURCE -Wall -I@abs_top_srcdir@/include/ -I$(LIBXML2_HEADERS) -I$(APACHE2_HEADERS) -I$(APR_HEADERS)
AM_LDFLAGS = -L$(LIBDIR) -L@top_builddir@/src/libopensrf
+APACHE_DEPS = apachetools.c apachetools.h
+LIBS=libopensrf.so
+TARGETS = osrf_json_gateway.la osrf_http_translator.la
-install-exec-local:
- if [ ! "$$(grep mod_placeholder `apxs2 -q SYSCONFDIR`/httpd.conf)" ]; \
- then echo -e "#\n#LoadModule mod_placeholder /usr/lib/apache2/modules/mod_placeholder.so" \
- >> `apxs2 -q SYSCONFDIR`/httpd.conf; \
- fi
- $(APXS2) -c $(DEF_LDLIBS) $(AM_CFLAGS) $(AM_LDFLAGS) @srcdir@/osrf_json_gateway.c apachetools.c apachetools.h libopensrf.so
- $(APXS2) -c $(DEF_LDLIBS) $(AM_CFLAGS) $(AM_LDFLAGS) @srcdir@/osrf_http_translator.c apachetools.c apachetools.h libopensrf.so
- $(APXS2) -i -a @srcdir@/osrf_json_gateway.la
- $(APXS2) -i -a @srcdir@/osrf_http_translator.la
+all: $(TARGETS)
+
+osrf_json_gateway.la: osrf_json_gateway.c $(APACHE_DEPS)
+ $(APXS2) -c $(DEF_LDLIBS) $(AM_CFLAGS) $(AM_LDFLAGS) $^ $(LIBS)
+
+osrf_http_translator.la: osrf_http_translator.c $(APACHE_DEPS)
+ $(APXS2) -c $(DEF_LDLIBS) $(AM_CFLAGS) $(AM_LDFLAGS) $^ $(LIBS)
+
+#install-exec-local: $(TARGETS)
+# if [ ! "$$(grep mod_placeholder `apxs2 -q SYSCONFDIR`/httpd.conf)" ]; \
+# then echo -e "#\n#LoadModule mod_placeholder /usr/lib/apache2/modules/mod_placeholder.so" \
+# >> `apxs2 -q SYSCONFDIR`/httpd.conf; \
+# fi
+# $(APXS2) -i -a osrf_json_gateway.la
+# $(APXS2) -i -a osrf_http_translator.la
clean-local:
rm -f @srcdir@/osrf_http_translator.la @srcdir@/osrf_http_translator.lo @srcdir@/osrf_http_translator.slo @srcdir@/osrf_json_gateway.la @srcdir@/osrf_json_gateway.lo @srcdir@/osrf_json_gateway.slo
diff -Nuar OpenSRF-1.0.1.orig/src/java/Makefile.am OpenSRF-1.0.1/src/java/Makefile.am
--- OpenSRF-1.0.1.orig/src/java/Makefile.am 2008-07-17 11:15:09.000000000 -0700
+++ OpenSRF-1.0.1/src/java/Makefile.am 2008-12-08 23:44:44.405703486 -0800
@@ -48,8 +48,8 @@
rm files;
install-data-local:
- mkdir -p $(LIBDIR)/java
- cp opensrf.jar $(LIBDIR)/java
+ mkdir -p $(DESTDIR)$(LIBDIR)/java
+ cp opensrf.jar $(DESTDIR)$(LIBDIR)/java
dep_clean:
rm -rf deps
diff -Nuar OpenSRF-1.0.1.orig/src/jserver/osrf_chat.c OpenSRF-1.0.1/src/jserver/osrf_chat.c
--- OpenSRF-1.0.1.orig/src/jserver/osrf_chat.c 2008-04-11 07:13:49.000000000 -0700
+++ OpenSRF-1.0.1/src/jserver/osrf_chat.c 2008-12-08 23:44:44.405703486 -0800
@@ -18,6 +18,10 @@
#include <stdio.h>
#include <time.h>
+#ifndef HOST_NAME_MAX
+#define HOST_NAME_MAX 256
+#endif
+
static int osrfChatXMLErrorOcurred = 0;
/* This is used by code in osrfChatPushData, but that code is
diff -Nuar OpenSRF-1.0.1.orig/src/libopensrf/Makefile.am OpenSRF-1.0.1/src/libopensrf/Makefile.am
--- OpenSRF-1.0.1.orig/src/libopensrf/Makefile.am 2008-08-07 09:54:56.000000000 -0700
+++ OpenSRF-1.0.1/src/libopensrf/Makefile.am 2008-12-08 23:44:44.405703486 -0800
@@ -94,6 +94,7 @@
opensrf_c_SOURCES = opensrf.c
opensrf_c_DEPENDENCIES = libopensrf.la
+osrf_json_test_DEPENDENCIES = libopensrf.la libosrf_json.la
osrf_json_test_SOURCES = osrf_json_test.c $(JSON_TARGS) $(JSON_DEP) $(JSON_TARGS_HEADS) $(JSON_DEP_HEADS)
noinst_LTLIBRARIES = libosrf_json.la
diff -Nuar OpenSRF-1.0.1.orig/src/Makefile.am OpenSRF-1.0.1/src/Makefile.am
--- OpenSRF-1.0.1.orig/src/Makefile.am 2008-11-03 19:04:24.000000000 -0800
+++ OpenSRF-1.0.1/src/Makefile.am 2008-12-08 23:44:44.405703486 -0800
@@ -41,12 +41,12 @@
dist_sysconf_DATA = @top_srcdir@/examples/opensrf.xml.example @top_srcdir@/examples/opensrf_core.xml.example @top_srcdir@/examples/srfsh.xml.example
install-exec-local:
- mkdir -p $(VAR)
- mkdir -p $(PID)
- mkdir -p $(LOG)
- mkdir -p $(SOCK)
- mkdir -p $(jsdir)
- make install-perl
+ mkdir -p $(DESTDIR)$(VAR)
+ mkdir -p $(DESTDIR)$(PID)
+ mkdir -p $(DESTDIR)$(LOG)
+ mkdir -p $(DESTDIR)$(SOCK)
+ mkdir -p $(DESTDIR)$(jsdir)
+# $(MAKE) install-perl
install-exec-hook:
sed -i 's|LOCALSTATEDIR|$(VAR)|g' '$(DESTDIR)@sysconfdir@/opensrf.xml.example'
@@ -59,10 +59,10 @@
install-perl:
- cd ./perl && perl Makefile.PL || make -s install-perl-fail
- make -C perl
- make -C perl test || make -s install-perl-fail
- make -C perl install
+# cd ./perl && perl Makefile.PL || $(MAKE) -s install-perl-fail
+# $(MAKE) -C perl
+# $(MAKE) -C perl test || $(MAKE) -s install-perl-fail
+# $(MAKE) -C perl install
install-perl-fail:
echo
diff -Nuar OpenSRF-1.0.1.orig/src/Makefile.am OpenSRF-1.0.1/src/Makefile.am
--- OpenSRF-1.0.1.orig/src/Makefile.am 2008-12-08 23:55:32.012609493 -0800
+++ OpenSRF-1.0.1/src/Makefile.am 2008-12-08 23:56:54.739569108 -0800
@@ -55,7 +55,7 @@
sed -i 's|SYSCONFDIR|$(ETCDIR)|g' '$(DESTDIR)@sysconfdir@/opensrf_core.xml.example'
sed -i 's|LOCALSTATEDIR|$(VAR)|g' '$(DESTDIR)@sysconfdir@/srfsh.xml.example'
sed -i 's|SYSCONFDIR|$(ETCDIR)|g' '$(DESTDIR)@sysconfdir@/srfsh.xml.example'
- cp -r @srcdir@/javascript/* $(jsdir)/
+ cp -r @srcdir@/javascript/* $(DESTDIR)$(jsdir)/
install-perl:
diff -Nuar OpenSRF-1.0.1.orig/Makefile.am OpenSRF-1.0.1/Makefile.am
--- OpenSRF-1.0.1.orig/Makefile.am 2008-12-08 23:57:09.459287812 -0800
+++ OpenSRF-1.0.1/Makefile.am 2008-12-08 23:58:26.355782021 -0800
@@ -124,5 +124,5 @@
$(MAKE) -s -C src javascript-install
install-data-hook:
- cp @srcdir@/src/gateway/apachetools.h @includedir@/opensrf/apachetools.h
+ cp @srcdir@/src/gateway/apachetools.h $(DESTDIR)@includedir@/opensrf/apachetools.h
diff -Nuar OpenSRF-1.0.1/bin/osrf_ctl.sh
--- OpenSRF-1.0.1.orig/bin/osrf_ctl.sh 2008-09-24 20:27:44.000000000 -0700
+++ OpenSRF-1.0.1/bin/osrf_ctl.sh 2008-12-09 02:25:39.018456228 -0800
@@ -87,7 +87,8 @@
esac;
done
-OSRF_CONFIG=`find $BASEDIR -name osrf_config`
+#OSRF_CONFIG=`find $BASEDIR -name osrf_config`
+OSRF_CONFIG=/usr/bin/osrf_config
[ -z "$OPT_CONFIG" ] && OPT_CONFIG=`$OSRF_CONFIG --sysconfdir`/opensrf_core.xml;
if [ ! -r "$OPT_CONFIG" ]; then
|