Updated patch to reflect the changes since the revision that just
happened in trunk (r1372).
Kevin
-------------------------------------------
Developer's Certificate of Origin 1.1
By making a contribution to this project, I certify that:
(a) The contribution was created in whole or in part by me and I
have the right to submit it under the open source license
indicated in the file; or
(b) The contribution is based upon previous work that, to the best
of my knowledge, is covered under an appropriate open source
license and I have the right under that license to submit that
work with modifications, whether created in whole or in part
by me, under the same open source license (unless I am
permitted to submit under a different license), as indicated
in the file; or
(c) The contribution was provided directly to me by some other
person who certified (a), (b) or (c) and I have not modified
it.
(d) I understand and agree that this project and the contribution
are public and that a record of the contribution (including all
personal information I submit with it, including my sign-off) is
maintained indefinitely and may be redistributed consistent with
this project or the open source license(s) involved.
Signed-off-by: [Kevin Beswick ([EMAIL PROTECTED])]
On Fri, 2008-07-25 at 10:31 -0400, Kevin Beswick wrote:
> Enclosed is a patch to update the OpenSRF autotools implementation. It
> fixes most bugs such as:
> -correctly replacing hardcoded directory paths in various files
> -correctly implementing clean, and uninstall make targets
> -fixes building src/c-apps modules without the lib prefix
> -builds the src/gateway apache modules with apxs
> -fixed the naming of the opensrf-c binary
>
> Also, it implements more of the autotools features:
> -rolling a tarball with make dist
> -enables VPATH (parallel) builds
> -checking a distribution with make distcheck
>
>
> Kevin.
>
> -----------------------------------------
>
> Developer's Certificate of Origin 1.1
>
> By making a contribution to this project, I certify that:
>
> (a) The contribution was created in whole or in part by me and I
> have the right to submit it under the open source license
> indicated in the file; or
>
> (b) The contribution is based upon previous work that, to the best
> of my knowledge, is covered under an appropriate open source
> license and I have the right under that license to submit that
> work with modifications, whether created in whole or in part
> by me, under the same open source license (unless I am
> permitted to submit under a different license), as indicated
> in the file; or
>
> (c) The contribution was provided directly to me by some other
> person who certified (a), (b) or (c) and I have not modified
> it.
>
> (d) I understand and agree that this project and the contribution
> are public and that a record of the contribution (including all
> personal information I submit with it, including my sign-off) is
> maintained indefinitely and may be redistributed consistent with
> this project or the open source license(s) involved.
>
> Signed-off-by: [Kevin Beswick ([EMAIL PROTECTED])]
>
=== modified file 'Makefile.am'
--- Makefile.am 2008-07-17 18:15:09 +0000
+++ Makefile.am 2008-07-25 13:48:43 +0000
@@ -33,44 +33,44 @@
AM_CFLAGS = $(DEF_CFLAGS)
-DOC_FILES = doc/Application-HOWTO.txt \
- doc/dokuwiki-doc-stubber.pl \
- doc/OpenSRF-Messaging-Protocol.html \
- doc/Persist-API.html \
- doc/Roadmap.txt
-
-EXAMPLES_FILES = examples/fieldmapper2cdbi.xsl \
- examples/fieldmapper2javascript.xsl \
- examples/fieldmapper2perl.xsl \
- examples/gen-fieldmapper.xml \
- examples/math_bench.pl \
- examples/multisession-test.pl \
- examples/register.pl \
- examples/srfsh_config.xsd \
- examples/math_xul_client/math \
- examples/math_xul_client/install.js
-
-strn_compat_FILES = src/ports/strn_compat/strndup.c \
- src/ports/strn_compat/strndup.h \
- src/ports/strn_compat/strnlen.c \
- src/ports/strn_compat/strnlen.h
-
-python_FILES = src/python/opensrf.py \
- src/python/setup.py \
- src/python/srfsh.py \
- src/python/osrf
-
-java_FILES = src/java/deps.inc \
- src/java/deps.sh \
- src/java/org
-
-libosrf_FILES = src/libopensrf/basic_client.c \
- src/libopensrf/osrf_big_hash.c \
- src/libopensrf/osrf_big_list.c \
- src/libopensrf/osrfConfig.c
-
-
-EXTRA_DIST = $(DOC_FILES) $(EXAMPLES_FILES) $(libosrf_FILES) $(strn_compat_FILES) $(python_FILES) $(java_FILES) autogen.sh src/extras src/gateway/fieldmapper-c-xml-out.pl DCO-1.1.txt LICENSE.txt src/perlmods src/javascript
+DOC_FILES = @srcdir@/doc/Application-HOWTO.txt \
+ @srcdir@/doc/dokuwiki-doc-stubber.pl \
+ @srcdir@/doc/OpenSRF-Messaging-Protocol.html \
+ @srcdir@/doc/Persist-API.html \
+ @srcdir@/doc/Roadmap.txt
+
+EXAMPLES_FILES = @srcdir@/examples/fieldmapper2cdbi.xsl \
+ @srcdir@/examples/fieldmapper2javascript.xsl \
+ @srcdir@/examples/fieldmapper2perl.xsl \
+ @srcdir@/examples/gen-fieldmapper.xml \
+ @srcdir@/examples/math_bench.pl \
+ @srcdir@/examples/multisession-test.pl \
+ @srcdir@/examples/register.pl \
+ @srcdir@/examples/srfsh_config.xsd \
+ @srcdir@/examples/math_xul_client/math \
+ @srcdir@/examples/math_xul_client/install.js
+
+strn_compat_FILES = @srcdir@/src/ports/strn_compat/strndup.c \
+ @srcdir@/src/ports/strn_compat/strndup.h \
+ @srcdir@/src/ports/strn_compat/strnlen.c \
+ @srcdir@/src/ports/strn_compat/strnlen.h
+
+python_FILES = @srcdir@/src/python/opensrf.py \
+ @srcdir@/src/python/setup.py \
+ @srcdir@/src/python/srfsh.py \
+ @srcdir@/src/python/osrf
+
+java_FILES = @srcdir@/src/java/deps.inc \
+ @srcdir@/src/java/deps.sh \
+ @srcdir@/src/java/org
+
+libosrf_FILES = @srcdir@/src/libopensrf/basic_client.c \
+ @srcdir@/src/libopensrf/osrf_big_hash.c \
+ @srcdir@/src/libopensrf/osrf_big_list.c \
+ @srcdir@/src/libopensrf/osrfConfig.c
+
+
+EXTRA_DIST = $(DOC_FILES) $(EXAMPLES_FILES) $(libosrf_FILES) $(strn_compat_FILES) $(python_FILES) $(java_FILES) @srcdir@/autogen.sh @srcdir@/src/extras @srcdir@/src/gateway/fieldmapper-c-xml-out.pl @srcdir@/DCO-1.1.txt @srcdir@/LICENSE.txt @srcdir@/src/perlmods @srcdir@/src/javascript
objsonincludedir = @includedir@/objson
opensrfincludedir = @includedir@/opensrf
@@ -122,5 +122,5 @@
make -s -C src javascript-install
install-data-hook:
- mv @srcdir@/src/gateway/apachetools.h @includedir@/opensrf/apachetools.h
+ cp @srcdir@/src/gateway/apachetools.h @includedir@/opensrf/apachetools.h
=== modified file 'bin/osrf_config.in'
--- bin/osrf_config.in 2008-07-17 18:15:09 +0000
+++ bin/osrf_config.in 2008-07-25 15:18:49 +0000
@@ -52,10 +52,8 @@
function cconfig {
-sed -i 's|SYSCONFDIR|@sysconfdir@|g' '@srcdir@/src/gateway/osrf_json_gateway.c'
-sed -i 's|${prefix}|@prefix@|g' '@srcdir@/src/gateway/osrf_json_gateway.c'
-sed -i 's|osrf|@abs_top_srcdir@/src/python/osrf|g' '@srcdir@/src/python/setup.py'
-sed -i 's|srfsh\.py|@abs_top_srcdir@/src/python/srfsh.py|g' '@srcdir@/src/python/setup.py'
+sed -e 's|osrf|@abs_top_srcdir@/src/python/osrf|g' \
+ -e 's|srfsh\.py|@abs_top_srcdir@/src/python/srfsh.py|g' @srcdir@/src/python/setup.py.in > @srcdir@/src/python/setup.py
}
function showHelp {
=== modified file 'src/Makefile.am'
--- src/Makefile.am 2008-07-17 19:43:42 +0000
+++ src/Makefile.am 2008-07-25 13:48:43 +0000
@@ -14,13 +14,11 @@
# Declare some directory variables
-export TMPDIR = $(TMP)
export OPENSRF = opensrf
export BINDIR = @bindir@
export LIBDIR = @libdir@
perldir = $(LIBDIR)/perl5
jsdir = $(LIBDIR)/javascript
-export INCLUDEDIR= @includedir@
export OSRF_JAVA_DEPSDIR = @OSRF_JAVA_DEPSDIR@
etcdir = $(ETCDIR)
@@ -43,28 +41,26 @@
SUBDIRS = libopensrf c-apps router srfsh jserver gateway $(MAYBE_PY) $(MAYBE_JA)
-dist_bin_SCRIPTS = ../bin/osrf_ctl.sh
-bin_SCRIPTS = ../bin/osrf_config
+dist_bin_SCRIPTS = @top_srcdir@/bin/osrf_ctl.sh
+bin_SCRIPTS = @top_srcdir@/bin/osrf_config
-dist_etc_DATA = @top_srcdir@/examples/opensrf.xml.example @top_srcdir@/examples/opensrf_core.xml.example @top_srcdir@/examples/srfsh.xml.example
+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 $(ETCDIR)
mkdir -p $(jsdir)
mkdir -p $(perldir)
-install-data-hook:
- ln -sf $(BINDIR)/opensrf $(BINDIR)/opensrf-c
- sed -i 's|LOCALSTATEDIR|$(VAR)|g' '$(ETCDIR)/opensrf.xml.example'
- sed -i 's|SYSCONFDIR|$(ETCDIR)|g' '$(ETCDIR)/opensrf.xml.example'
- sed -i 's|LOCALSTATEDIR|$(VAR)|g' '$(ETCDIR)/opensrf_core.xml.example'
- sed -i 's|SYSCONFDIR|$(ETCDIR)|g' '$(ETCDIR)/opensrf_core.xml.example'
- sed -i 's|LOCALSTATEDIR|$(VAR)|g' '$(ETCDIR)/srfsh.xml.example'
- sed -i 's|SYSCONFDIR|$(ETCDIR)|g' '$(ETCDIR)/srfsh.xml.example'
+install-exec-hook:
+ sed -i 's|LOCALSTATEDIR|$(VAR)|g' '$(DESTDIR)@sysconfdir@/opensrf.xml.example'
+ sed -i 's|SYSCONFDIR|$(ETCDIR)|g' '$(DESTDIR)@sysconfdir@/opensrf.xml.example'
+ sed -i 's|LOCALSTATEDIR|$(VAR)|g' '$(DESTDIR)@sysconfdir@/opensrf_core.xml.example'
+ 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'
sed -i 's|SYSCONFDIR|$(ETCDIR)|g' '@abs_top_srcdir@/examples/math_bench.pl'
sed -i 's|LIBDIR|$(LIBDIR)|g' '@abs_top_srcdir@/examples/multisession-test.pl'
sed -i 's|SYSCONFDIR|$(ETCDIR)|g' '@abs_top_srcdir@/doc/dokuwiki-doc-stubber.pl'
@@ -74,5 +70,7 @@
uninstall-hook:
- rm $(INCLUDEDIR)/opensrf/apachetools.h
- rm $(bindir)/opensrf-c
+ rm @includedir@/opensrf/apachetools.h
+ rm -R $(jsdir)
+ rm -R $(perldir)
+
=== modified file 'src/c-apps/Makefile.am'
--- src/c-apps/Makefile.am 2008-07-17 18:15:09 +0000
+++ src/c-apps/Makefile.am 2008-07-25 13:48:43 +0000
@@ -13,16 +13,19 @@
AM_CFLAGS = $(DEF_CFLAGS) -DORSF_LOG_PARAMS
-AM_LDFLAGS = $(DEF_LDFLAGS) -L../libopensrf/
+AM_LDFLAGS = $(DEF_LDFLAGS) [EMAIL PROTECTED]@/src/libopensrf
noinst_PROGRAMS = timejson
-lib_LTLIBRARIES = libosrf_dbmath.la libosrf_math.la libosrf_version.la
+lib_LTLIBRARIES = osrf_dbmath.la osrf_math.la osrf_version.la
timejson_SOURCES = timejson.c
timejson_LDADD = -lobjson -lopensrf
-libosrf_dbmath_la_SOURCES = osrf_dbmath.c
-libosrf_dbmath_la_LIBADD = -lobjson -lopensrf
-libosrf_math_la_SOURCES = osrf_math.c
-libosrf_math_la_LIBADD = -lobjson -lopensrf
-libosrf_version_la_SOURCES = osrf_version.c
-libosrf_version_la_LIBADD = -lobjson -lopensrf
+osrf_dbmath_la_SOURCES = osrf_dbmath.c
+osrf_dbmath_la_LDFLAGS = $(AM_LDFLAGS) -module
+osrf_dbmath_la_LIBADD = -lobjson -lopensrf
+osrf_math_la_SOURCES = osrf_math.c
+osrf_math_la_LDFLAGS = $(AM_LDFLAGS) -module
+osrf_math_la_LIBADD = -lobjson -lopensrf
+osrf_version_la_SOURCES = osrf_version.c
+osrf_version_la_LDFLAGS = $(AM_LDFLAGS) -module
+osrf_version_la_LIBADD = -lobjson -lopensrf
=== modified file 'src/gateway/Makefile.am'
--- src/gateway/Makefile.am 2008-07-09 19:18:51 +0000
+++ src/gateway/Makefile.am 2008-07-23 17:17:45 +0000
@@ -12,21 +12,17 @@
# GNU General Public License for more details.
-AM_LDFLAGS = $(DEF_LDFLAGS)
-AM_CFLAGS = $(DEF_CFLAGS) -DASSUME_STATELESS -L../libopensrf/
-
-curdir = @abs_top_builddir@/src/gateway/
-
-cur_LTLIBRARIES = libosrf_json_gateway.la libosrf_http_translator.la
-libosrf_json_gateway_la_SOURCES = apachetools.c apachetools.h osrf_json_gateway.c
-libosrf_json_gateway_la_LIBADD = -lobjson -lopensrf
-libosrf_http_translator_la_SOURCES = apachetools.c apachetools.h osrf_http_translator.c
-libosrf_http_translator_la_LIBADD = -lobjson -lopensrf
-
-include_HEADERS = apachetools.h
+EXTRA_DIST = @srcdir@/apachetools.c @srcdir@/apachetools.h @srcdir@/osrf_json_gateway.c @srcdir@/osrf_http_translator.c
+
+options=-D_LARGEFILE64_SOURCE -Wall [EMAIL PROTECTED]@/include/ -I$(LIBXML2_HEADERS) -I$(APACHE2_HEADERS) -I$(APR_HEADERS) -L$(LIBDIR) [EMAIL PROTECTED]@/src/libopensrf
+
+all-local:
+ $(APXS2) -c $(DEF_LDLIBS) $(options) @srcdir@/osrf_json_gateway.c
+ $(APXS2) -c $(DEF_LDLIBS) $(options) @srcdir@/osrf_http_translator.c
install-exec-local:
- cp .libs/libosrf_json_gateway.so osrf_json_gateway.so
- $(APXS2) -i -a -n osrf_json_gateway osrf_json_gateway.so
- cp .libs/libosrf_http_translator.so osrf_http_translator.so
- $(APXS2) -i -a -n osrf_http_translator osrf_http_translator.so
+ $(APXS2) -i -a @srcdir@/osrf_json_gateway.c
+ $(APXS2) -i -a @srcdir@/osrf_http_translator.c
+
+clean-local:
+ rm @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
=== modified file 'src/jserver/Makefile.am'
--- src/jserver/Makefile.am 2008-07-01 03:33:23 +0000
+++ src/jserver/Makefile.am 2008-07-22 14:10:14 +0000
@@ -13,7 +13,7 @@
LDADD = -lxml2 $(DEF_LDLIBS)
-AM_CFLAGS = $(DEF_CFLAGS) -D_GNU_SOURCE -L../libopensrf/
+AM_CFLAGS = $(DEF_CFLAGS) -D_GNU_SOURCE [EMAIL PROTECTED]@/src/libopensrf
AM_LDFLAGS = $(DEF_LDFLAGS)
bin_PROGRAMS = chopchop
=== modified file 'src/libopensrf/Makefile.am'
--- src/libopensrf/Makefile.am 2008-07-17 18:15:09 +0000
+++ src/libopensrf/Makefile.am 2008-07-25 13:48:43 +0000
@@ -90,9 +90,9 @@
noinst_PROGRAMS = osrf_json_test
-bin_PROGRAMS = opensrf
-opensrf_SOURCES = opensrf.c
-opensrf_DEPENDENCIES = libopensrf.la
+bin_PROGRAMS = opensrf-c
+opensrf_c_SOURCES = opensrf.c
+opensrf_c_DEPENDENCIES = libopensrf.la
osrf_json_test_SOURCES = osrf_json_test.c $(JSON_TARGS) $(JSON_DEP) $(JSON_TARGS_HEADS) $(JSON_DEP_HEADS)
=== modified file 'src/python/Makefile.am'
--- src/python/Makefile.am 2008-07-17 18:15:09 +0000
+++ src/python/Makefile.am 2008-07-23 18:28:19 +0000
@@ -11,3 +11,12 @@
@echo $@
python @srcdir@/setup.py install
+distclean-local:
+ rm @builddir@/OpenSRF.egg-info/PKG-INFO
+ rm @builddir@/OpenSRF.egg-info/requires.txt
+ rm @builddir@/OpenSRF.egg-info/top_level.txt
+ rm @builddir@/OpenSRF.egg-info/SOURCES.txt
+ rm @builddir@/OpenSRF.egg-info/dependency_links.txt
+ rm @builddir@/build/scripts-2.5/srfsh.py
+ rm @builddir@/dist/OpenSRF-1.0.0-py2.5.egg
+
=== removed file 'src/python/setup.py'
--- src/python/setup.py 2008-03-06 03:02:59 +0000
+++ src/python/setup.py 1970-01-01 00:00:00 +0000
@@ -1,24 +0,0 @@
-#!/usr/bin/env python
-
-from setuptools import setup
-
-setup(name='OpenSRF',
- version='1.0.0',
- install_requires=[
- 'dnspython', # required by pyxmpp
- 'python-memcached',
- 'pyxmpp>=1.0.0',
- 'simplejson>=1.7.1'
- ],
- dependency_links = [
- "http://pyxmpp.jajcus.net/downloads/",
- "ftp://ftp.tummy.com/pub/python-memcached/python-memcached-latest.tar.gz"
- ],
- description='OpenSRF Python Modules',
- author='Bill Erickson',
- author_email='[EMAIL PROTECTED]',
- license="GPL",
- url='http://www.open-ils.org/',
- packages=['osrf'],
- scripts=['srfsh.py']
-)
=== added file 'src/python/setup.py.in'
--- src/python/setup.py.in 1970-01-01 00:00:00 +0000
+++ src/python/setup.py.in 2008-06-25 13:48:05 +0000
@@ -0,0 +1,24 @@
+#!/usr/bin/env python
+
+from setuptools import setup
+
+setup(name='OpenSRF',
+ version='1.0.0',
+ install_requires=[
+ 'dnspython', # required by pyxmpp
+ 'python-memcached',
+ 'pyxmpp>=1.0.0',
+ 'simplejson>=1.7.1'
+ ],
+ dependency_links = [
+ "http://pyxmpp.jajcus.net/downloads/",
+ "ftp://ftp.tummy.com/pub/python-memcached/python-memcached-latest.tar.gz"
+ ],
+ description='OpenSRF Python Modules',
+ author='Bill Erickson',
+ author_email='[EMAIL PROTECTED]',
+ license="GPL",
+ url='http://www.open-ils.org/',
+ packages=['osrf'],
+ scripts=['srfsh.py']
+)
=== modified file 'src/router/Makefile.am'
--- src/router/Makefile.am 2008-07-01 03:33:23 +0000
+++ src/router/Makefile.am 2008-07-22 14:10:36 +0000
@@ -13,7 +13,7 @@
LDADD = -lxml2 $(DEF_LDLIBS)
-AM_CFLAGS = $(DEF_CFLAGS) -D_ROUTER -L../libopensrf/
+AM_CFLAGS = $(DEF_CFLAGS) -D_ROUTER [EMAIL PROTECTED]@/src/libopensrf
AM_LDFLAGS = $(DEF_LDFLAGS)
bin_PROGRAMS = opensrf_router
=== modified file 'src/srfsh/Makefile.am'
--- src/srfsh/Makefile.am 2008-07-01 03:33:23 +0000
+++ src/srfsh/Makefile.am 2008-07-22 14:10:49 +0000
@@ -13,7 +13,7 @@
LDADD = -lreadline -lxml2 -lncurses $(DEF_LDLIBS)
-AM_CFLAGS = $(DEF_CFLAGS) -DEXEC_DEFAULT -L../libopensrf/
+AM_CFLAGS = $(DEF_CFLAGS) -DEXEC_DEFAULT [EMAIL PROTECTED]@/src/libopensrf
AM_LDFLAGS = $(DEF_LDFLAGS)
bin_PROGRAMS = srfsh