all:
-install: perl-install javascript-install web-templates-install string-templates-install
+install: perl-install javascript-install web-templates-install string-templates-install storage-bootstrap
marcdumper:
make -C extras/marcdumper
cp ../../$(OPENSRFDIR)/javascript/JSON.js $(WEBDIR)/util/
cp ../../$(OPENSRFDIR)/javascript/md5.js $(WEBDIR)/util/
+storage-bootstrap:
+ mkdir -p $(CGIDIR)
+ cp -r cgi-bin/* $(CGIDIR)
+
web-templates-install:
mkdir -p $(TEMPLATEDIR)
cp -r templates/opac $(TEMPLATEDIR)
# --------------------------------------------------------------------
# Copyright (C) 2005 Georgia Public Library Service
# Bill Erickson <highfalutin@gmail.com>
+# Mike Rylander <mrylander@gmail.com>
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
PERLDIR="$LIBDIR/perl5/";
INCLUDEDIR="$PREFIX/include/";
WEBDIR="$PREFIX/web";
+ CGIDIR="$PREFIX/cgi-bin";
ETCDIR="$PREFIX/etc";
TEMPLATEDIR="$PREFIX/templates";
fi
prompt "Web Root Directory [$WEBDIR] "
read X; if [ ! -z "$X" ]; then WEBDIR="$X"; fi;
+ prompt "Web CGI Directory [$CGIDIR] "
+ read X; if [ ! -z "$X" ]; then CGIDIR="$X"; fi;
+
prompt "Templates directory [$TEMPLATEDIR] "
read X; if [ ! -z "$X" ]; then TEMPLATEDIR="$X"; fi;
prompt "Build targets [${TARGETS[@]:0}] "
read X; if [ ! -z "$X" ]; then TARGETS=("$X"); fi;
+ prompt "Bootstrapping Database Driver [$DBDRVR] "
+ read X; if [ ! -z "$X" ]; then DBDRVR="$X"; fi;
+
+ prompt "Bootstrapping Database Host [$DBHOST] "
+ read X; if [ ! -z "$X" ]; then DBHOST="$X"; fi;
+
+ prompt "Bootstrapping Database Name [$DBNAME] "
+ read X; if [ ! -z "$X" ]; then DBNAME="$X"; fi;
+
+ prompt "Bootstrapping Database User [$DBUSER] "
+ read X; if [ ! -z "$X" ]; then DBUSER="$X"; fi;
+
+ prompt "Bootstrapping Database Password [$DBPW] "
+ read X; if [ ! -z "$X" ]; then DBPW="$X"; fi;
+
writeConfig;
}
_write "OPENILSDIR=\"Open-ILS/src/\"";
_write "EVERGREENDIR=\"Evergreen/\"";
+
+ # Now we'll write out the DB bootstrapping config
+ CONFIG_FILE='Open-ILS/src/cgi-bin/setup.pl';
+ rm -f "$CONFIG_FILE";
+
+ STR='$main::config{dsn} =';
+ STR="$STR 'dbi:${DBDRVR}:host=";
+ STR="${STR}${DBHOST};dbname=";
+ STR="${STR}${DBNAME}';";
+ _write "$STR"
+
+ STR='$main::config{usr} =';
+ STR="$STR '$DBUSER';";
+ _write "$STR"
+
+ STR='$main::config{pw} =';
+ STR="$STR '$DBPW';";
+ _write "$STR"
+
+ _write '$main::config{index} = "config.html";';
+
+
prompt "To write a new config, run 'make config'";
prompt "";
INCLUDEDIR="$PREFIX/include/";
ETCDIR="$PREFIX/etc/";
WEBDIR="$PREFIX/web/";
+CGIDIR="$PREFIX/cgi-bin/";
TEMPLATEDIR="$PREFIX/templates";
OPENILSDIR="Open-ILS/src/";
EVERGREENDIR="Evergreen/";
+
+
+
+# --------------------------------------------------------------------
+# These are used to create the perl DBI DSN for the bootstrapping
+# scripts.
+# --------------------------------------------------------------------
+DBDRVR="Pg";
+DBHOST="127.0.0.1";
+DBNAME="demo-dev";
+DBUSER="postgres";
+DBPW="";
+