[Opensrf-commits] r1375 - in trunk: . bin include/opensrf src
src/c-apps src/gateway src/jserver src/libopensrf src/python
src/router src/srfsh
svn at svn.open-ils.org
svn at svn.open-ils.org
Sun Jul 27 23:55:09 EDT 2008
Author: dbs
Date: 2008-07-27 23:55:01 -0400 (Sun, 27 Jul 2008)
New Revision: 1375
Added:
trunk/src/python/setup.py.in
Removed:
trunk/src/python/setup.py
Modified:
trunk/Makefile.am
trunk/bin/osrf_config.in
trunk/include/opensrf/osrfConfig.h
trunk/src/Makefile.am
trunk/src/c-apps/Makefile.am
trunk/src/gateway/Makefile.am
trunk/src/jserver/Makefile.am
trunk/src/libopensrf/Makefile.am
trunk/src/python/Makefile.am
trunk/src/router/Makefile.am
trunk/src/srfsh/Makefile.am
Log:
Commit autotools patch from Kevin Beswick
(adjusted slightly for Bill's objson API compatibility layer removal)
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
-------------------------------------------
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 (kevinbeswick00 at gmail.com)]
Modified: trunk/Makefile.am
===================================================================
--- trunk/Makefile.am 2008-07-27 16:46:21 UTC (rev 1374)
+++ trunk/Makefile.am 2008-07-28 03:55:01 UTC (rev 1375)
@@ -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
+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 = 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
+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 = src/ports/strn_compat/strndup.c \
- src/ports/strn_compat/strndup.h \
- src/ports/strn_compat/strnlen.c \
- src/ports/strn_compat/strnlen.h
+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 = src/python/opensrf.py \
- src/python/setup.py \
- src/python/srfsh.py \
- src/python/osrf
+python_FILES = @srcdir@/src/python/opensrf.py \
+ @srcdir@/src/python/setup.py \
+ @srcdir@/src/python/srfsh.py \
+ @srcdir@/src/python/osrf
-java_FILES = src/java/deps.inc \
- src/java/deps.sh \
- src/java/org
+java_FILES = @srcdir@/src/java/deps.inc \
+ @srcdir@/src/java/deps.sh \
+ @srcdir@/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
+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) autogen.sh src/extras src/gateway/fieldmapper-c-xml-out.pl DCO-1.1.txt LICENSE.txt src/perlmods src/javascript
+EXTRA_DIST = $(DOC_FILES) $(EXAMPLES_FILES) $(libosrf_FILES) $(strn_compat_FILES) $(python_FILES) $(java_FILES) @srcdir@/autogen.sh @srcdir@/src/extras @srcdir@/DCO-1.1.txt @srcdir@/LICENSE.txt @srcdir@/src/perlmods @srcdir@/src/javascript
opensrfincludedir = @includedir@/opensrf
@@ -119,5 +119,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: trunk/bin/osrf_config.in
===================================================================
--- trunk/bin/osrf_config.in 2008-07-27 16:46:21 UTC (rev 1374)
+++ trunk/bin/osrf_config.in 2008-07-28 03:55:01 UTC (rev 1375)
@@ -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: trunk/include/opensrf/osrfConfig.h
===================================================================
--- trunk/include/opensrf/osrfConfig.h 2008-07-27 16:46:21 UTC (rev 1374)
+++ trunk/include/opensrf/osrfConfig.h 2008-07-28 03:55:01 UTC (rev 1375)
@@ -46,10 +46,10 @@
/**
Replaces the config object's json object. This is useful
- if you have an ojbson object already and not an XML config
+ if you have a json object already and not an XML config
file to parse.
@param cfg The config object to alter
- @param obj The json objet to use when searching values
+ @param obj The json object to use when searching values
*/
void osrfConfigReplaceConfig(osrfConfig* cfg, const jsonObject* obj);
Modified: trunk/src/Makefile.am
===================================================================
--- trunk/src/Makefile.am 2008-07-27 16:46:21 UTC (rev 1374)
+++ trunk/src/Makefile.am 2008-07-28 03:55:01 UTC (rev 1375)
@@ -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)
@@ -38,28 +36,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'
@@ -69,5 +65,7 @@
uninstall-hook:
- rm $(INCLUDEDIR)/opensrf/apachetools.h
- rm $(bindir)/opensrf-c
+ rm @includedir@/opensrf/apachetools.h
+ rm -R $(jsdir)
+ rm -R $(perldir)
+
Modified: trunk/src/c-apps/Makefile.am
===================================================================
--- trunk/src/c-apps/Makefile.am 2008-07-27 16:46:21 UTC (rev 1374)
+++ trunk/src/c-apps/Makefile.am 2008-07-28 03:55:01 UTC (rev 1375)
@@ -13,16 +13,19 @@
AM_CFLAGS = $(DEF_CFLAGS) -DORSF_LOG_PARAMS
-AM_LDFLAGS = $(DEF_LDFLAGS) -L../libopensrf/
+AM_LDFLAGS = $(DEF_LDFLAGS) -L at top_builddir@/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 = -lopensrf
-libosrf_dbmath_la_SOURCES = osrf_dbmath.c
-libosrf_dbmath_la_LIBADD = -lopensrf
-libosrf_math_la_SOURCES = osrf_math.c
-libosrf_math_la_LIBADD = -lopensrf
-libosrf_version_la_SOURCES = osrf_version.c
-libosrf_version_la_LIBADD = -lopensrf
+osrf_dbmath_la_SOURCES = osrf_dbmath.c
+osrf_dbmath_la_LDFLAGS = $(AM_LDFLAGS) -module
+osrf_dbmath_la_LIBADD = -lopensrf
+osrf_math_la_SOURCES = osrf_math.c
+osrf_math_la_LDFLAGS = $(AM_LDFLAGS) -module
+osrf_math_la_LIBADD = -lopensrf
+osrf_version_la_SOURCES = osrf_version.c
+osrf_version_la_LDFLAGS = $(AM_LDFLAGS) -module
+osrf_version_la_LIBADD = -lopensrf
Modified: trunk/src/gateway/Makefile.am
===================================================================
--- trunk/src/gateway/Makefile.am 2008-07-27 16:46:21 UTC (rev 1374)
+++ trunk/src/gateway/Makefile.am 2008-07-28 03:55:01 UTC (rev 1375)
@@ -12,21 +12,17 @@
# GNU General Public License for more details.
-AM_LDFLAGS = $(DEF_LDFLAGS)
-AM_CFLAGS = $(DEF_CFLAGS) -DASSUME_STATELESS -L../libopensrf/
+EXTRA_DIST = @srcdir@/apachetools.c @srcdir@/apachetools.h @srcdir@/osrf_json_gateway.c @srcdir@/osrf_http_translator.c
-curdir = @abs_top_builddir@/src/gateway/
+options=-D_LARGEFILE64_SOURCE -Wall -I at abs_top_srcdir@/include/ -I$(LIBXML2_HEADERS) -I$(APACHE2_HEADERS) -I$(APR_HEADERS) -L$(LIBDIR) -L at top_builddir@/src/libopensrf
-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 = -lopensrf
-libosrf_http_translator_la_SOURCES = apachetools.c apachetools.h osrf_http_translator.c
-libosrf_http_translator_la_LIBADD = -lopensrf
+all-local:
+ $(APXS2) -c $(DEF_LDLIBS) $(options) @srcdir@/osrf_json_gateway.c
+ $(APXS2) -c $(DEF_LDLIBS) $(options) @srcdir@/osrf_http_translator.c
-include_HEADERS = apachetools.h
-
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 -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
Modified: trunk/src/jserver/Makefile.am
===================================================================
--- trunk/src/jserver/Makefile.am 2008-07-27 16:46:21 UTC (rev 1374)
+++ trunk/src/jserver/Makefile.am 2008-07-28 03:55:01 UTC (rev 1375)
@@ -13,7 +13,7 @@
LDADD = -lxml2 $(DEF_LDLIBS)
-AM_CFLAGS = $(DEF_CFLAGS) -D_GNU_SOURCE -L../libopensrf/
+AM_CFLAGS = $(DEF_CFLAGS) -D_GNU_SOURCE -L at top_builddir@/src/libopensrf
AM_LDFLAGS = $(DEF_LDFLAGS)
bin_PROGRAMS = chopchop
Modified: trunk/src/libopensrf/Makefile.am
===================================================================
--- trunk/src/libopensrf/Makefile.am 2008-07-27 16:46:21 UTC (rev 1374)
+++ trunk/src/libopensrf/Makefile.am 2008-07-28 03:55:01 UTC (rev 1375)
@@ -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)
@@ -105,9 +105,5 @@
libopensrf_la_CFLAGS = $(AM_CFLAGS)
libopensrf_la_DEPENDENCIES = libosrf_json.la
-if BUILDJSON
-libopensrf_la_SOURCES = $(TARGS) $(TARGS_HEADS)
-else
libopensrf_la_SOURCES = $(TARGS) $(TARGS_HEADS) $(JSON_TARGS) $(JSON_TARGS_HEADS)
-endif
Modified: trunk/src/python/Makefile.am
===================================================================
--- trunk/src/python/Makefile.am 2008-07-27 16:46:21 UTC (rev 1374)
+++ trunk/src/python/Makefile.am 2008-07-28 03:55:01 UTC (rev 1375)
@@ -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
+
Deleted: trunk/src/python/setup.py
===================================================================
--- trunk/src/python/setup.py 2008-07-27 16:46:21 UTC (rev 1374)
+++ trunk/src/python/setup.py 2008-07-28 03:55:01 UTC (rev 1375)
@@ -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='erickson at esilibrary.com',
- license="GPL",
- url='http://www.open-ils.org/',
- packages=['osrf'],
- scripts=['srfsh.py']
-)
Added: trunk/src/python/setup.py.in
===================================================================
--- trunk/src/python/setup.py.in (rev 0)
+++ trunk/src/python/setup.py.in 2008-07-28 03:55:01 UTC (rev 1375)
@@ -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='erickson at esilibrary.com',
+ license="GPL",
+ url='http://www.open-ils.org/',
+ packages=['osrf'],
+ scripts=['srfsh.py']
+)
Modified: trunk/src/router/Makefile.am
===================================================================
--- trunk/src/router/Makefile.am 2008-07-27 16:46:21 UTC (rev 1374)
+++ trunk/src/router/Makefile.am 2008-07-28 03:55:01 UTC (rev 1375)
@@ -13,7 +13,7 @@
LDADD = -lxml2 $(DEF_LDLIBS)
-AM_CFLAGS = $(DEF_CFLAGS) -D_ROUTER -L../libopensrf/
+AM_CFLAGS = $(DEF_CFLAGS) -D_ROUTER -L at top_builddir@/src/libopensrf
AM_LDFLAGS = $(DEF_LDFLAGS)
bin_PROGRAMS = opensrf_router
Modified: trunk/src/srfsh/Makefile.am
===================================================================
--- trunk/src/srfsh/Makefile.am 2008-07-27 16:46:21 UTC (rev 1374)
+++ trunk/src/srfsh/Makefile.am 2008-07-28 03:55:01 UTC (rev 1375)
@@ -13,7 +13,7 @@
LDADD = -lreadline -lxml2 -lncurses $(DEF_LDLIBS)
-AM_CFLAGS = $(DEF_CFLAGS) -DEXEC_DEFAULT -L../libopensrf/
+AM_CFLAGS = $(DEF_CFLAGS) -DEXEC_DEFAULT -L at top_builddir@/src/libopensrf
AM_LDFLAGS = $(DEF_LDFLAGS)
bin_PROGRAMS = srfsh
More information about the opensrf-commits
mailing list