Changeset 25251

Show
Ignore:
Timestamp:
23.03.2012 12:22:19 (8 years ago)
Author:
jmt12
Message:

Adding several more changes needed when enabling or disabling tdb

Location:
gs2-extensions/tdb-edit/trunk/src
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • gs2-extensions/tdb-edit/trunk/src/disable_tdb.sh

    r24428 r25251  
    2121rm -f $GSDLHOME/common-src/src/lib/Makefile 
    2222# - Remove symlink 
     23rm -f $GSDLHOME/common-src/src/lib/tdbclass.h 
    2324rm -f $GSDLHOME/common-src/src/lib/tdbclass.cpp 
    2425# - Remove compiled files 
     
    3334rm -f $GSDLHOME/runtime-src/src/colservr/Makefile 
    3435# - collectset.cpp 
    35 # BUG: leaves behind the newlines... weird, shouldn't the $ capture them 
    36 sed -i '/^#include "tdbclass.h" \/\/TDB$/ d' $GSDLHOME/runtime-src/src/colservr/collectset.cpp 
     36# BUG: leaves behind the newlines... 
     37sed -i '/^#include "tdbclass.h" \/\/TDB/ d' $GSDLHOME/runtime-src/src/colservr/collectset.cpp 
    3738sed -i '/^if (infodbtype == "tdb") {db_ptr = new tdbclass(gsdlhome);} \/\/TDB/ d' $GSDLHOME/runtime-src/src/colservr/collectset.cpp 
     39# - collectserver.cpp 
     40sed -i '/^if (infodbtype == "tdb") { } \/\/ TDB Do nothing/ d' $GSDLHOME/runtime-src/src/colservr/collectset.cpp 
    3841# - Remove compiled files 
    3942rm -f $GSDLHOME/runtime-src/src/colservr/gsdlcolservr.a 
     43 
     44 
    4045 
    4146 
     
    5560echo ' - removing TDB support from OAI Server receptionist' 
    5661# - Makefile.in 
     62sed -i 's:\(EXT_DEFINES\s*=.*\)\s-DUSE_TDB\(.*\):\1\2:' $GSDLHOME/runtime-src/src/oaiservr/Makefile.in 
     63sed -i 's:\(EXT_INCLUDES\s*=.*\)\s-I$(GSDL_DIR)/ext/tdb-edit/linux/include\s*-I$(GSDL_DIR)/ext/tdb-edit/darwin/include\s*-I$(GSDL_DIR)/ext/tdb-edit/src/lib\(.*\):\1\2:' $GSDLHOME/runtime-src/src/oaiservr/Makefile.in 
    5764sed -i 's:\(EXT_LDFLAGS\s*=.*\)\s-L$(GSDL_DIR)/ext/tdb-edit/linux/lib -L$(GSDL_DIR)/ext/tdb-edit/darwin/lib\(.*\):\1\2:' $GSDLHOME/runtime-src/src/oaiservr/Makefile.in 
    5865sed -i 's:\(EXT_LIBS\s*=.*\)\s-ltdb\(.*\):\1\2:' $GSDLHOME/runtime-src/src/oaiservr/Makefile.in 
  • gs2-extensions/tdb-edit/trunk/src/enable_tdb.sh

    r24428 r25251  
    1414echo ' - enabling TDB support in common function library' 
    1515# - Symlink the source file into place 
     16ln -f -s $GSDLHOME/ext/tdb-edit/src/lib/tdbclass.h $GSDLHOME/common-src/src/lib/tdbclass.h 
    1617ln -f -s $GSDLHOME/ext/tdb-edit/src/lib/tdbclass.cpp $GSDLHOME/common-src/src/lib/tdbclass.cpp 
    1718# - Makefile.in 
     
    4142fi 
    4243 
     44# - collectserver.cpp 
     45# There are now sanity tests in collectserver to ensure appropriate indexer and 
     46# infodbtype are compiled into colservr. While not fatal to leave this as is, 
     47# it does cause vast amounts of error messages in (Apache) logs 
     48grep -q 'tdb' $GSDLHOME/runtime-src/src/colservr/collectserver.cpp 
     49if [ $? -eq 1 ] 
     50then 
     51  sed -i 's:// @EXTENSION HEADERS@:&\nif (infodbtype == "tdb") { } // TDB Do nothing:' $GSDLHOME/runtime-src/src/colservr/collectset.cpp 
     52fi 
     53 
    4354echo ' - enabling TDB support in Greenstone receptionist' 
    4455# - Makefile.in 
     
    5768if [ $? -eq 1 ] 
    5869then 
     70  sed -i 's:EXT_DEFINES =.*:& -DUSE_TDB:' $GSDLHOME/runtime-src/src/oaiservr/Makefile.in 
     71  sed -i 's:EXT_INCLUDES =.*:& -I$(GSDL_DIR)/ext/tdb-edit/linux/include -I$(GSDL_DIR)/ext/tdb-edit/darwin/include -I$(GSDL_DIR)/ext/tdb-edit/src/lib:' $GSDLHOME/runtime-src/src/oaiservr/Makefile.in 
    5972  sed -i 's:EXT_LDFLAGS =.*:& -L$(GSDL_DIR)/ext/tdb-edit/linux/lib -L$(GSDL_DIR)/ext/tdb-edit/darwin/lib:' $GSDLHOME/runtime-src/src/oaiservr/Makefile.in 
    6073  sed -i 's:EXT_LIBS =.*:& -ltdb:' $GSDLHOME/runtime-src/src/oaiservr/Makefile.in