1 diff --git a/Makefile.am b/Makefile.am
2 index 048b766..7b137aa 100644
5 @@ -118,10 +118,10 @@ endif
9 - make -s -C src jserver
10 + $(MAKE) -s -C src jserver
13 - make -s -C src jserver-install
14 + $(MAKE) -s -C src jserver-install
17 rm -rf ./autom4te.cache
18 diff --git a/src/Makefile.am b/src/Makefile.am
19 index 18fe85c..74227f6 100644
22 @@ -57,11 +57,11 @@ endif
23 SUBDIRS = $(MAYBE_CORE) $(MAYBE_PY) $(MAYBE_JA)
31 + $(MKDIR_P) $(DESTDIR)$(VAR)
32 + $(MKDIR_P) $(DESTDIR)$(PID)
33 + $(MKDIR_P) $(DESTDIR)$(LOG)
34 + $(MKDIR_P) $(DESTDIR)$(SOCK)
35 + $(MKDIR_P) $(DESTDIR)$(jsdir)
38 if [ "$(MAYBE_CORE)" ]; then \
39 @@ -72,7 +72,7 @@ install-exec-hook:
40 rm "$(DESTDIR)@sysconfdir@/$${f}.bak" ; \
43 - cp -r @srcdir@/javascript/* $(jsdir)/
44 + cp -r @srcdir@/javascript/* $(DESTDIR)$(jsdir)/
47 rm -f @includedir@/opensrf/apachetools.h
49 diff --git a/src/gateway/Makefile.am b/src/gateway/Makefile.am
50 --- a/src/gateway/Makefile.am
51 +++ b/src/gateway/Makefile.am
52 @@ -16,6 +16,7 @@ EXTRA_DIST = @srcdir@/apachetools.c @src
54 AM_CFLAGS = -D_LARGEFILE64_SOURCE -Wall -I@abs_top_srcdir@/include/ -I$(LIBXML2_HEADERS) -I$(APACHE2_HEADERS) -I$(APR_HEADERS)
55 AM_LDFLAGS = -L$(LIBDIR) -L@top_builddir@/src/libopensrf
56 +AP_LIBEXECDIR = `$(APXS2) -q LIBEXECDIR`
58 DISTCLEANFILES = Makefile.in Makefile
60 @@ -23,12 +24,8 @@ install-exec-local:
61 - d=`$(APXS2) -q SYSCONFDIR` && \
62 - if ! grep mod_placeholder $${d}/httpd.conf 2>&1 >/dev/null ; \
63 - then echo -e "#\n#LoadModule mod_placeholder /usr/lib/apache2/modules/mod_placeholder.so" \
64 - >> $${d}/httpd.conf; \
66 $(APXS2) -c $(DEF_LDLIBS) $(AM_CFLAGS) $(AM_LDFLAGS) @srcdir@/osrf_json_gateway.c apachetools.c apachetools.h libopensrf.so
67 $(APXS2) -c $(DEF_LDLIBS) $(AM_CFLAGS) $(AM_LDFLAGS) @srcdir@/osrf_http_translator.c apachetools.c apachetools.h libopensrf.so
68 - $(APXS2) -i -a @srcdir@/osrf_json_gateway.la
69 - $(APXS2) -i -a @srcdir@/osrf_http_translator.la
70 + $(MKDIR_P) $(DESTDIR)$(AP_LIBEXECDIR)
71 + $(APXS2) -i -S LIBEXECDIR=$(DESTDIR)$(AP_LIBEXECDIR) -a @srcdir@/osrf_json_gateway.la
72 + $(APXS2) -i -S LIBEXECDIR=$(DESTDIR)$(AP_LIBEXECDIR) -a @srcdir@/osrf_http_translator.la
75 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
76 diff --git a/src/perl/Makefile.am b/src/perl/Makefile.am
77 --- a/src/perl/Makefile.am
78 +++ b/src/perl/Makefile.am
79 @@ -22,6 +22,7 @@ check: build
80 ./Build test || make -s build-perl-fail
83 + perl Build.PL --destdir $(DESTDIR) || make -s build-perl-fail
87 diff a/src/python/Makefile.am b/src/python/Makefile.am
88 --- a/src/python/Makefile.am 2011-07-16 13:38:37.257913449 +0100
89 +++ b/src/python/Makefile.am 2011-07-16 13:38:40.111146737 +0100
93 - python @srcdir@/setup.py build
94 + python2 @srcdir@/setup.py build
96 # ------------------------------------------------------------------------------
98 # ------------------------------------------------------------------------------
101 - python @srcdir@/setup.py install
102 + python2 @srcdir@/setup.py install --root=$(DESTDIR)///
105 rm -f @builddir@/OpenSRF.egg-info/PKG-INFO