# --------------------------------------------------------------------
# Build targets. Options include:
#
-# jserver - custom 'single-domain' jabber server which may be used
-# in place of jabberd2
-# router - jabber router.
-# gateway - mod_ils_gateway, Apache module for proxying API calls
-# srfsh - diagnostic shell interface to OpenSRF
-# marcdumper - utility code for converting MARC to MARCXML
-# opensrf_perl - install the OpenSRF perl modules
-# openils_perl - install the Open-ILS perl modules
-# xul - client XUL application
-# opensrf - builds all OpenSRF compenents
-# openils - builds all OpenILS compenents
-# evergreen - builds all Evergreen components
+# opensrf_jserver - custom 'single-domain' jabber server which may be used in place of jabberd2
+# opensrf_router - jabber router.
+# opensrf_gateway - mod_ils_gateway, Apache module for proxying API calls
+# opensrf_srfsh - diagnostic shell interface to OpenSRF
+# opensrf_perl - install the OpenSRF perl modules
+# opensrf_all - builds all OpenSRF compenents
+#
+# openils_marcdumper - utility code for converting MARC to MARCXML
+# openils_perl - install the Open-ILS perl modules
+# openils_all - builds all OpenILS compenents
+# openils_web - copies over the javascript and html templates to the web root directory
+#
+# evergreen_xul_client - client XUL application
+# evergreen_all - builds all Evergreen components
#
# When running the server components of OpenSRF/OpenILS, the simplest
-# thing is to build jserver, router, gateway, and srfsh, even if you
-# don't use all of them. Build marcdumper only if you need to convert
-# MARC files to MARCXML. If you only want to build the client app,
-# then just build xul.
+# thing is to build 'opensrf' even if you
+# don't use all of the components.
+# Build marcdumper only if you need to convert MARC binary files to MARCXML.
+# If you only want to build the client app, then just build evergreen_xul_client.
# --------------------------------------------------------------------
-#TARGETS=("jserver" "router" "gateway" "srfsh" "marcdumper" "xul");
-#TARGETS=("router" "gateway" "jserver" "srfsh" "opensrf_perl" "openils_perl");
-TARGETS=("opensrf");
+TARGETS=("opensrf_all");
# --------------------------------------------------------------------
# libraries will be installed into PERFIX/lib, etc. The user
# running 'install.sh install' must have write permissions to PREFIX
# --------------------------------------------------------------------
-PREFIX="/tmp/ilsinstall/";
+PREFIX="/pines/";
BINDIR="$PREFIX/bin/";
LIBDIR="$PREFIX/lib/";
PERLDIR="$LIBDIR/perl5/";
INCLUDEDIR="$PREFIX/include/";
ETCDIR="$PREFIX/etc/";
+WEB="$PREFIX/web/";
# --------------------------------------------------------------------
}
-function verifyInstallPaths {
-
- cat <<-WORDS
-
- -----------------------------------------------------------------------
- Verify the following install directories are sane.
- Note: * indicates that you must have write privelages for the location
- -----------------------------------------------------------------------
-
- -----------------------------------------------------------------------
- Install prefix [$PREFIX]*
- Temporary files directory [$TMP]*
- Apache2 apxs binary [$APXS2]
- Apache2 header directory [$APACHE2_HEADERS]
- Libxml2 header directory [$LIBXML2_HEADERS]
- Building targets [${TARGETS[@]:0}];
- -----------------------------------------------------------------------
-
- If these are not OK, use control-c to break out and fix the variables
- in install.config. Otherwise, type enter.
-
- To disable this message, run "./install.sh force".
-
- WORDS
- read OK;
-}
-
#function postMessage {
#cat <<-WORDS
#}
+
+
# --------------------------------------------------------------------
# Makes sure the install directories exist and are writable
# --------------------------------------------------------------------
}
+
+
+# install targets
+#
+# opensrf_jserver - custom 'single-domain' jabber server which may be used in place of jabberd2
+# opensrf_router - jabber router.
+# opensrf_gateway - mod_ils_gateway, Apache module for proxying API calls
+# opensrf_srfsh - diagnostic shell interface to OpenSRF
+# opensrf_perl - install the OpenSRF perl modules
+# opensrf_all - builds all OpenSRF compenents
+# openils_marcdumper - utility code for converting MARC to MARCXML
+# openils_perl - install the Open-ILS perl modules
+# openils_all - builds all OpenILS compenents
+# openils_web - copies over the javascript and html templates to the web root directory
+# evergreen_xul_client - client XUL application
+# evergreen_all - builds all Evergreen components
function runInstall {
- loadConfig;
- #[ -z "$FORCE" ] && verifyInstallPaths;
- mkInstallDirs;
# pass the collected variables to make
for target in ${TARGETS[@]:0}; do
APACHE2_HEADERS=$APACHE2_HEADERS LIBXML2_HEADERS=$LIBXML2_HEADERS \
BINDIR=$BINDIR LIBDIR=$LIBDIR PERLDIR=$PERLDIR INCLUDEDIR=$INCLUDEDIR";
- echo "Passing to sub-makes: $MAKE"
-
case "$target" in
-
- "jserver" | "router" | "gateway" | "srfsh" )
- if building; then $MAKE -C "$OPENSRF_DIR" "$target"; fi;
- if installing; then $MAKE -C "$OPENSRF_DIR" "$target-install"; fi;
+
+ # OpenSRF ---
+
+ "opensrf_all")
+ if building; then $MAKE -C "$OPENSRF_DIR" all; fi;
+ if installing; then $MAKE -C "$OPENSRF_DIR" install; fi;
+ ;;
+
+ "opensrf_jserver" )
+ if building; then $MAKE -C "$OPENSRF_DIR" "jserver"; fi;
+ if installing; then $MAKE -C "$OPENSRF_DIR" "jserver-install"; fi;
+ ;;
+
+ "opensrf_router" )
+ if building; then $MAKE -C "$OPENSRF_DIR" "router"; fi;
+ if installing; then $MAKE -C "$OPENSRF_DIR" "router-install"; fi;
+ ;;
+
+ "opensrf_gateway" )
+ if building; then $MAKE -C "$OPENSRF_DIR" "gateway"; fi;
+ if installing; then $MAKE -C "$OPENSRF_DIR" "gateway-install"; fi;
+ ;;
+
+ "opensrf_srfsh" )
+ if building; then $MAKE -C "$OPENSRF_DIR" "srfsh"; fi;
+ if installing; then $MAKE -C "$OPENSRF_DIR" "srfsh-install"; fi;
;;
"opensrf_perl")
if installing; then $MAKE -C "$OPENSRF_DIR" "perl-install"; fi;
;;
+
+ # OpenILS ---
+
+ "openils_all")
+ if building; then $MAKE -C "$OPENILS_DIR" all; fi;
+ if installing; then $MAKE -C "$OPENILS_DIR" install; fi;
+ ;;
+
"openils_perl")
if installing; then $MAKE -C "$OPENILS_DIR" "perl-install"; fi;
;;
- "opensrf")
- if building; then $MAKE -C "$OPENSRF_DIR" all; fi;
- if installing; then $MAKE -C "$OPENSRF_DIR" install; fi;
- ;;
- "openils")
- if building; then $MAKE -C "$OPENILS_DIR" all; fi;
- if installing; then $MAKE -C "$OPENILS_DIR" install; fi;
- ;;
+ # Evergreen ---
- "evergreen")
- if building; then $MAKE -C "$EVERGREEN_DIR" all; fi;
- if installing; then $MAKE -C "$EVERGREEN_DIR" install; fi;
+ "evergreen_xul_client")
+ if building; then $MAKE -C "$EVERGREEN_DIR" xul; fi;
;;
# Checks command line parameters for special behavior
# Supported params are:
# clean - cleans all build files
-# force - forces build without the initial message
+# build - builds the specified sources
+# install - installs the specified sources
# --------------------------------------------------------------------
function checkParams {
"clean")
cleanMe;;
- "force")
- FORCE="1";;
-
"build")
BUILDING="1";;
checkParams "$@";
+
+if building; then echo "Building..."; fi;
if installing; then echo "Installing..."; fi;
+
+# --------------------------------------------------------------------
# Kick it off...
+# --------------------------------------------------------------------
+loadConfig;
+mkInstallDirs;
runInstall;