all: extras
-extras:
- make -C extras
+install: perl-install javascript-install web-templates-install string-templates-install
+
+marcdumper:
+ make -C extras/marcdumper
+
+marcdumper-install:
+ make -C extras/marcdumper install
perl-install:
- cp -r perlmods/* $(PERLDIR);
+ cp -r perlmods/* $(PERLDIR)
+
+javascript-install:
+ cp -r javascript/* $(WEBDIR)
+
+web-templates-install:
+ cp -r templates/opac $(TEMPLATEDIR)
+ cp -r templates/html $(TEMPLATEDIR)
+
+string-templates-install:
+ cp -r templates/strings $(TEMPLATEDIR)
clean:
@echo "Cleaning..."
marcdumper: marcdumper.c
$(CC) marcdumper.c $(COMP) $(LD) -o $@
+install:
+ cp marcdumper $(BINDIR)
+
clean:
/bin/rm -f *.o marcdumper
echo "-----------------------------------------------------------------------";
prompt "Temporary files directory [$TMP] "
- read X;
- if [ ! -z "$X" ]; then TMP="$X"; fi;
+ read X; if [ ! -z "$X" ]; then TMP="$X"; fi;
prompt "Install prefix [$PREFIX] ";
read X;
fi
prompt "Executables directory [$BINDIR] "
- read X;
- if [ ! -z "$X" ]; then BINDIR="$X"; fi;
+ read X; if [ ! -z "$X" ]; then BINDIR="$X"; fi;
prompt "Lib directory [$LIBDIR] "
- read X;
- if [ ! -z "$X" ]; then LIBDIR="$X"; fi;
+ read X; if [ ! -z "$X" ]; then LIBDIR="$X"; fi;
prompt "Perl directory [$PERLDIR] "
- read X;
- if [ ! -z "$X" ]; then PERLDIR="$X"; fi;
+ read X; if [ ! -z "$X" ]; then PERLDIR="$X"; fi;
prompt "Include files directory [$INCLUDEDIR] "
- read X;
- if [ ! -z "$X" ]; then INCLUDEDIR="$X"; fi;
+ read X; if [ ! -z "$X" ]; then INCLUDEDIR="$X"; fi;
prompt "Config files directory [$ETCDIR] "
- read X;
- if [ ! -z "$X" ]; then ETCDIR="$X"; fi;
+ read X; if [ ! -z "$X" ]; then ETCDIR="$X"; fi;
- prompt "Web Root Directory [$WEB] "
- read X;
- if [ ! -z "$X" ]; then WEB="$X"; fi;
+ prompt "Web Root Directory [$WEBDIR] "
+ read X; if [ ! -z "$X" ]; then WEBDIR="$X"; fi;
+
+ prompt "Templates directory [$TEMPLATEDIR] "
+ read X; if [ ! -z "$X" ]; then TEMPLATEDIR="$X"; fi;
-
prompt "Apache2 apxs binary [$APXS2] "
- read X;
- if [ ! -z "$X" ]; then APXS2="$X"; fi;
+ read X; if [ ! -z "$X" ]; then APXS2="$X"; fi;
prompt "Apache2 headers directory [$APACHE2_HEADERS] "
- read X;
- if [ ! -z "$X" ]; then APACHE2_HEADERS="$X"; fi;
+ read X; if [ ! -z "$X" ]; then APACHE2_HEADERS="$X"; fi;
prompt "Libxml2 headers directory [$LIBXML2_HEADERS] "
- read X;
- if [ ! -z "$X" ]; then LIBXML2_HEADERS="$X"; fi;
+ read X; if [ ! -z "$X" ]; then LIBXML2_HEADERS="$X"; fi;
prompt "Build targets [${TARGETS[@]:0}] "
- read X;
- if [ ! -z "$X" ]; then TARGETS=("$X"); fi;
-
-
- 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 headers directory [$APACHE2_HEADERS]
- Libxml2 headers directory [$LIBXML2_HEADERS]
- Build targets [${TARGETS[@]:0}]
- -----------------------------------------------------------------------
-
- If these are not OK, use control-c to break out rerun this script.
- Otherwise, type enter.
-
- WORDS
-
- read OK;
+ read X; if [ ! -z "$X" ]; then TARGETS=("$X"); fi;
writeConfig;
}
_write "APACHE2_HEADERS=\"$APACHE2_HEADERS\"";
_write "LIBXML2_HEADERS=\"$LIBXML2_HEADERS\"";
+ _write "WEBDIR=\"$WEBDIR\"";
+ _write "TEMPLATEDIR=\"$TEMPLATEDIR\"";
+
# print out the targets
STR="TARGETS=(";
for target in ${TARGETS[@]:0}; do
_write "OPENILS_DIR=\"Open-ILS/src/\"";
_write "EVERGREEN_DIR=\"Evergreen/\"";
+ prompt "To write a new config, run 'make config'";
+ sleep 2;
+
}
function _write {
# --------------------------------------------------------------------
# Build targets. Options include:
#
+# opensrf_all - builds all OpenSRF compenents
# 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
+# opensrf_core - install the OpenSRF perl modules and core files for running opensrf
#
-# 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
+# openils_core - install the Open-ILS perl modules, and core files for running and openils server
+# openils_web - copies over the javascript and html templates to the web root directory for running the OPAC
+# openils_marcdumper - utility code for converting MARC to MARCXML
#
-# evergreen_xul_client - client XUL application
# evergreen_all - builds all Evergreen components
+# evergreen_xul_client - client XUL application
#
# When running the server components of OpenSRF/OpenILS, the simplest
# thing is to build 'opensrf' even if you
-# 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 {
MAKE="make APXS2=$APXS2 PREFIX=$PREFIX TMP=$TMP \
APACHE2_HEADERS=$APACHE2_HEADERS LIBXML2_HEADERS=$LIBXML2_HEADERS \
- BINDIR=$BINDIR LIBDIR=$LIBDIR PERLDIR=$PERLDIR INCLUDEDIR=$INCLUDEDIR";
+ BINDIR=$BINDIR LIBDIR=$LIBDIR PERLDIR=$PERLDIR INCLUDEDIR=$INCLUDEDIR \
+ WEBDIR=$WEBDIR TEMPLATEDIR=$TEMPLATEDIR";
case "$target" in
if installing; then $MAKE -C "$OPENSRF_DIR" "srfsh-install"; fi;
;;
- "opensrf_perl")
+ "opensrf_core")
if installing; then $MAKE -C "$OPENSRF_DIR" "perl-install"; fi;
;;
if installing; then $MAKE -C "$OPENILS_DIR" install; fi;
;;
- "openils_perl")
- if installing; then $MAKE -C "$OPENILS_DIR" "perl-install"; fi;
+ "openils_core")
+ if installing; then
+ $MAKE -C "$OPENILS_DIR" "perl-install";
+ $MAKE -C "$OPENILS_DIR" "string-templates-install";
+ fi;
+ ;;
+
+ "openils_web")
+ if installing; then
+ $MAKE -C "$OPENILS_DIR" "javascript-install";
+ $MAKE -C "$OPENILS_DIR" "web-templates-install";
+ fi;
;;
+ "openils_marcdumper")
+ if building; then $MAKE -C "$OPENILS_DIR" "marcdumper"; fi;
+ if installing; then $MAKE -C "$OPENILS_DIR" "marcdumper-install"; fi;
+
# Evergreen ---