[mapguide-commits] r9302 - in sandbox/jng/cmake_v2: Oem/LinuxApt Web/src/JavaApi Web/src/JavaApiEx cmake/configs
svn_mapguide at osgeo.org
svn_mapguide at osgeo.org
Tue Jan 9 07:53:01 PST 2018
Author: jng
Date: 2018-01-09 07:53:01 -0800 (Tue, 09 Jan 2018)
New Revision: 9302
Added:
sandbox/jng/cmake_v2/cmake/configs/tomcat_startup.sh.in
Modified:
sandbox/jng/cmake_v2/Oem/LinuxApt/CMakeLists.txt
sandbox/jng/cmake_v2/Web/src/JavaApi/CMakeLists.txt
sandbox/jng/cmake_v2/Web/src/JavaApiEx/CMakeLists.txt
Log:
Add tomcat
Modified: sandbox/jng/cmake_v2/Oem/LinuxApt/CMakeLists.txt
===================================================================
--- sandbox/jng/cmake_v2/Oem/LinuxApt/CMakeLists.txt 2018-01-09 13:41:53 UTC (rev 9301)
+++ sandbox/jng/cmake_v2/Oem/LinuxApt/CMakeLists.txt 2018-01-09 15:53:01 UTC (rev 9302)
@@ -5,9 +5,22 @@
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/mapguide.conf DESTINATION ${MG_INSTALL_WEB_PREFIX}/apache2/conf/mapguide COMPONENT ${MG_COMPONENT})
if (WITH_JAVA)
+ configure_file(${CMAKE_MODULE_PATH}/../configs/workers.properties.in ${CMAKE_CURRENT_BINARY_DIR}/workers.properties)
+ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/workers.properties DESTINATION ${MG_INSTALL_WEB_PREFIX}/apache2/conf/mapguide COMPONENT ${MG_COMPONENT})
+
configure_file(${CMAKE_MODULE_PATH}/../configs/tomcat.conf.in ${CMAKE_CURRENT_BINARY_DIR}/tomcat.conf)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/tomcat.conf DESTINATION ${MG_INSTALL_WEB_PREFIX}/apache2/conf/mapguide COMPONENT ${MG_COMPONENT})
- configure_file(${CMAKE_MODULE_PATH}/../configs/workers.properties.in ${CMAKE_CURRENT_BINARY_DIR}/workers.properties)
- install(FILES ${CMAKE_CURRENT_BINARY_DIR}/workers.properties DESTINATION ${MG_INSTALL_WEB_PREFIX}/apache2/conf/mapguide COMPONENT ${MG_COMPONENT})
+ file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/tomcat)
+ execute_process(COMMAND tar -zxf ${CMAKE_CURRENT_SOURCE_DIR}/apache-tomcat-7.0.68.tar.gz -C ${CMAKE_CURRENT_BINARY_DIR}/tomcat --strip-components=1)
+
+ configure_file(${CMAKE_MODULE_PATH}/../configs/mapguide.xml.in ${CMAKE_CURRENT_BINARY_DIR}/tomcat/conf/Catalina/localhost/mapguide.xml)
+ # Don't overwrite startup.sh in the CMAKE_CURRENT_BINARY_DIR as the subseqent install will do the same thing
+ # and we'll get auto chmod+x as a bonus
+ configure_file(${CMAKE_MODULE_PATH}/../configs/tomcat_startup.sh.in ${CMAKE_CURRENT_BINARY_DIR}/startup.sh)
+
+ install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/tomcat DESTINATION ${MG_INSTALL_WEB_PREFIX})
+ file(GLOB TOMCAT_SCRIPTS "${CMAKE_CURRENT_BINARY_DIR}/tomcat/bin/*.sh")
+ install(PROGRAMS ${TOMCAT_SCRIPTS} DESTINATION ${MG_INSTALL_WEB_PREFIX}/tomcat/bin)
+ install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/startup.sh DESTINATION ${MG_INSTALL_WEB_PREFIX}/tomcat/bin)
endif (WITH_JAVA)
\ No newline at end of file
Modified: sandbox/jng/cmake_v2/Web/src/JavaApi/CMakeLists.txt
===================================================================
--- sandbox/jng/cmake_v2/Web/src/JavaApi/CMakeLists.txt 2018-01-09 13:41:53 UTC (rev 9301)
+++ sandbox/jng/cmake_v2/Web/src/JavaApi/CMakeLists.txt 2018-01-09 15:53:01 UTC (rev 9302)
@@ -64,6 +64,12 @@
install(TARGETS MapGuideJavaApi${MG_VERSION_SUFFIX} DESTINATION ${LIB_INSTALL_DIR} COMPONENT ${MG_COMPONENT})
install_symlink(${CMAKE_INSTALL_PREFIX}/${LIB_INSTALL_DIR}/libMapGuideJavaApi${MG_VERSION_SUFFIX}.so libMapGuideJavaApi.so ${MG_COMPONENT})
+set(MG_JARS
+ "${CMAKE_CURRENT_BINARY_DIR}/../WEB-INF/lib/MapGuideApi.jar"
+ "${CMAKE_CURRENT_BINARY_DIR}/../WEB-INF/lib/MapGuideApi-sources.jar"
+)
+install(FILES ${MG_JARS} DESTINATION ${MG_WWWROOT}/WEB-INF/lib)
+
target_link_libraries(MapGuideJavaApi${MG_VERSION_SUFFIX}
${ACE_LIBRARY}
${JNI_LIBRARIES}
Modified: sandbox/jng/cmake_v2/Web/src/JavaApiEx/CMakeLists.txt
===================================================================
--- sandbox/jng/cmake_v2/Web/src/JavaApiEx/CMakeLists.txt 2018-01-09 13:41:53 UTC (rev 9301)
+++ sandbox/jng/cmake_v2/Web/src/JavaApiEx/CMakeLists.txt 2018-01-09 15:53:01 UTC (rev 9302)
@@ -65,6 +65,12 @@
install(TARGETS MapGuideJavaApiEx${MG_VERSION_SUFFIX} DESTINATION ${LIB_INSTALL_DIR} COMPONENT ${MG_COMPONENT})
install_symlink(${CMAKE_INSTALL_PREFIX}/${LIB_INSTALL_DIR}/libMapGuideJavaApiEx${MG_VERSION_SUFFIX}.so libMapGuideJavaApiEx.so ${MG_COMPONENT})
+set(MG_JARS
+ "${CMAKE_CURRENT_BINARY_DIR}/../WEB-INF/lib/MapGuideApiEx.jar"
+ "${CMAKE_CURRENT_BINARY_DIR}/../WEB-INF/lib/MapGuideApiEx-sources.jar"
+)
+install(FILES ${MG_JARS} DESTINATION ${MG_WWWROOT}/WEB-INF/lib)
+
target_link_libraries(MapGuideJavaApiEx${MG_VERSION_SUFFIX}
${ACE_LIBRARY}
${JNI_LIBRARIES}
Added: sandbox/jng/cmake_v2/cmake/configs/tomcat_startup.sh.in
===================================================================
--- sandbox/jng/cmake_v2/cmake/configs/tomcat_startup.sh.in (rev 0)
+++ sandbox/jng/cmake_v2/cmake/configs/tomcat_startup.sh.in 2018-01-09 15:53:01 UTC (rev 9302)
@@ -0,0 +1,65 @@
+#!/bin/sh
+
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Required for MapGuide integration
+export LD_LIBRARY_PATH=@MG_INSTALL_WEB_PREFIX@/lib at LIB_SUFFIX@:@MG_INSTALL_PREFIX@/lib at LIB_SUFFIX@
+export MENTOR_DICTIONARY_PATH=@MG_INSTALL_COORDSYS_PREFIX@
+export JAVA_OPTS="-Djava.library.path=@MG_INSTALL_WEB_PREFIX@/lib at LIB_SUFFIX@:@MG_INSTALL_PREFIX@/lib at LIB_SUFFIX@"
+
+# -----------------------------------------------------------------------------
+# Start Script for the CATALINA Server
+# -----------------------------------------------------------------------------
+
+# Better OS/400 detection: see Bugzilla 31132
+os400=false
+case "`uname`" in
+OS400*) os400=true;;
+esac
+
+# resolve links - $0 may be a softlink
+PRG="$0"
+
+while [ -h "$PRG" ] ; do
+ ls=`ls -ld "$PRG"`
+ link=`expr "$ls" : '.*-> \(.*\)$'`
+ if expr "$link" : '/.*' > /dev/null; then
+ PRG="$link"
+ else
+ PRG=`dirname "$PRG"`/"$link"
+ fi
+done
+
+PRGDIR=`dirname "$PRG"`
+EXECUTABLE=catalina.sh
+
+# Check that target executable exists
+if $os400; then
+ # -x will Only work on the os400 if the files are:
+ # 1. owned by the user
+ # 2. owned by the PRIMARY group of the user
+ # this will not work if the user belongs in secondary groups
+ eval
+else
+ if [ ! -x "$PRGDIR"/"$EXECUTABLE" ]; then
+ echo "Cannot find $PRGDIR/$EXECUTABLE"
+ echo "The file is absent or does not have execute permission"
+ echo "This file is needed to run this program"
+ exit 1
+ fi
+fi
+
+exec "$PRGDIR"/"$EXECUTABLE" start "$@"
More information about the mapguide-commits
mailing list