From b26ec75bffb67f5e98aaa5281c125ccdf7b1ff52 Mon Sep 17 00:00:00 2001 From: erickson Date: Wed, 20 Jul 2005 14:19:31 +0000 Subject: [PATCH 1/1] making the install script break out opensrf, openils, and evergreen a little more specifically. added top level Evergreen makefile git-svn-id: svn://svn.open-ils.org/ILS/trunk@1300 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Evergreen/Makefile | 8 +++ config.sh | 9 +++- install.conf.default | 41 +++++++-------- install.sh | 115 ++++++++++++++++++++++++------------------- 4 files changed, 100 insertions(+), 73 deletions(-) create mode 100644 Evergreen/Makefile diff --git a/Evergreen/Makefile b/Evergreen/Makefile new file mode 100644 index 0000000000..bd95f3a1e3 --- /dev/null +++ b/Evergreen/Makefile @@ -0,0 +1,8 @@ +# ------------------------------------------------------------------------ +# Evergreen makefile +# ------------------------------------------------------------------------ + +all: xul + +xul: + make -C staff_client diff --git a/config.sh b/config.sh index f9cbbbd4b2..d662698619 100755 --- a/config.sh +++ b/config.sh @@ -46,6 +46,10 @@ function buildConfig { echo "Type Enter to select the default" echo "-----------------------------------------------------------------------"; + prompt "Temporary files directory [$TMP] " + read X; + if [ ! -z "$X" ]; then TMP="$X"; fi; + prompt "Install prefix [$PREFIX] "; read X; if [ ! -z "$X" ]; then @@ -76,10 +80,11 @@ function buildConfig { read X; if [ ! -z "$X" ]; then ETCDIR="$X"; fi; - prompt "Temporary files directory [$TMP] " + prompt "Web Root Directory [$WEB] " read X; - if [ ! -z "$X" ]; then TMP="$X"; fi; + if [ ! -z "$X" ]; then WEB="$X"; fi; + prompt "Apache2 apxs binary [$APXS2] " read X; if [ ! -z "$X" ]; then APXS2="$X"; fi; diff --git a/install.conf.default b/install.conf.default index 89c2939023..44b3a96286 100644 --- a/install.conf.default +++ b/install.conf.default @@ -19,29 +19,29 @@ # -------------------------------------------------------------------- # 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"); # -------------------------------------------------------------------- @@ -49,12 +49,13 @@ TARGETS=("opensrf"); # 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/"; # -------------------------------------------------------------------- diff --git a/install.sh b/install.sh index c0200984cb..2e438c8286 100755 --- a/install.sh +++ b/install.sh @@ -34,33 +34,6 @@ function fail { } -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 @@ -69,6 +42,8 @@ function verifyInstallPaths { #} + + # -------------------------------------------------------------------- # Makes sure the install directories exist and are writable # -------------------------------------------------------------------- @@ -132,12 +107,25 @@ function loadConfig { } + + +# 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 @@ -154,36 +142,56 @@ function runInstall { 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; ;; @@ -199,7 +207,8 @@ function runInstall { # 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 { @@ -214,9 +223,6 @@ function checkParams { "clean") cleanMe;; - "force") - FORCE="1";; - "build") BUILDING="1";; @@ -240,9 +246,16 @@ function cleanMe { checkParams "$@"; + +if building; then echo "Building..."; fi; if installing; then echo "Installing..."; fi; + +# -------------------------------------------------------------------- # Kick it off... +# -------------------------------------------------------------------- +loadConfig; +mkInstallDirs; runInstall; -- 2.43.2