Skip to content

Commit c92a5ba

Browse files
author
Gleb Aronsky
committed
HPCC-10088 Ganglia Web Service
Signed-off-by: Gleb Aronsky <gleb.aronsky@lexisnexis.com>
1 parent 2538ebe commit c92a5ba

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+4508
-8
lines changed

CMakeLists.txt

+29-3
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,34 @@ if (NOT LICENSE_FILE)
1818
set (LICENSE_FILE "LICENSE.txt")
1919
endif()
2020

21+
set (HPCC_SOURCE_ROOT_DIR ${CMAKE_CURRENT_SOURCE_DIR}/..)
22+
23+
IF ("${HPCC_SOURCE_DIR}" STREQUAL "")
24+
SET (HPCC_SOURCE_DIR ${HPCC_SOURCE_ROOT_DIR}/HPCC-Platform)
25+
ENDIF()
26+
2127
include (${HPCC_GM_SOURCE_DIR}/version.cmake)
28+
include (${HPCC_GM_SOURCE_DIR}/cmake_modules/optionDefaults.cmake)
2229
include (${HPCC_GM_SOURCE_DIR}/cmake_modules/gmCommonSetup.cmake)
30+
include (${HPCC_SOURCE_DIR}/version.cmake)
31+
32+
33+
SET (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -frtti -fPIC -fmessage-length=0 -Wformat -Wformat-security -Wformat-nonliteral -pthread -Wuninitialized")
34+
35+
MESSAGE (HPCC_SOURCE_DIR: ${HPCC_SOURCE_DIR})
36+
ADD_SUBDIRECTORY(${HPCC_SOURCE_DIR} oss EXCLUDE_FROM_ALL)
37+
CONFIGURE_FILE(${HPCC_SOURCE_DIR}/build-config.h.cmake "build-config.h" )
38+
CONFIGURE_FILE(${HPCC_GM_SOURCE_DIR}/scripts/getMetrics.sh.in "getMetrics.sh" )
39+
INSTALL ( PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/getMetrics.sh DESTINATION sbin COMPONENT Runtime)
40+
41+
42+
HPCC_ADD_SUBDIRECTORY (esp)
43+
HPCC_ADD_SUBDIRECTORY (initfiles)
44+
#HPCC_ADD_SUBDIRECTORY (scripts)
45+
46+
CONFIGURE_FILE( "postinst.in" "postinst" )
47+
CONFIGURE_FILE( "postrm.in" "postrm" )
48+
2349
SET(CPACK_PACKAGE_VERSION_MAJOR ${majorver})
2450
SET(CPACK_PACKAGE_VERSION_MINOR ${minorver})
2551
SET(CPACK_PACKAGE_VERSION_PATCH ${point}${stagever})
@@ -95,7 +121,7 @@ IF (NOT "${CMAKE_VERSION}" VERSION_LESS "2.8.2")
95121
## CPack instruction required for Debian
96122
###
97123
MESSAGE ("-- Packing BASH installation files")
98-
SET ( CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA "${CMAKE_SOURCE_DIR}/postinst;${CMAKE_SOURCE_DIR}/prerm;${CMAKE_SOURCE_DIR}/postrm" )
124+
SET ( CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA "${CMAKE_BINARY_DIR}/postinst;${CMAKE_SOURCE_DIR}/prerm;${CMAKE_BINARY_DIR}/postrm" )
99125
ENDIF ()
100126

101127
ELSEIF ( ${packageManagement} STREQUAL "RPM" )
@@ -105,9 +131,9 @@ IF (NOT "${CMAKE_VERSION}" VERSION_LESS "2.8.2")
105131
###
106132
MESSAGE("-- Will build RPM package")
107133
MESSAGE ("-- Packing BASH installation files")
108-
SET ( CPACK_RPM_POST_INSTALL_SCRIPT_FILE "${CMAKE_SOURCE_DIR}/postinst" )
134+
SET ( CPACK_RPM_POST_INSTALL_SCRIPT_FILE "${CMAKE_BINARY_DIR}/postinst" )
109135
SET ( CPACK_RPM_PRE_UNINSTALL_SCRIPT_FILE "${CMAKE_SOURECE_DIR}/prerm" )
110-
SET ( CPACK_RPM_POST_UNINSTALL_SCRIPT_FILE "${CMAKE_SOURCE_DIR}/postrm" )
136+
SET ( CPACK_RPM_POST_UNINSTALL_SCRIPT_FILE "${CMAKE_BINARY_DIR}/postrm" )
111137
ELSE()
112138
MESSAGE("WARNING: Unsupported package ${packageManagement}.")
113139
ENDIF ()

cmake_modules/FindLIBXML2.cmake

+63
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
################################################################################
2+
# HPCC SYSTEMS software Copyright (C) 2012 HPCC Systems.
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
################################################################################
16+
17+
18+
# - Try to find the libxml2 xml library
19+
# Once done this will define
20+
#
21+
# LIBXML2_FOUND - system has the libxml2 library
22+
# LIBXML2_INCLUDE_DIR - the libxml2 include directory
23+
# LIBXML2_LIBRARIES - The libraries needed to use libxml2
24+
25+
if (NOT LIBXML2_FOUND)
26+
IF (WIN32)
27+
SET (libxml2_libs "xml2 libxml2")
28+
ELSE()
29+
SET (libxml2_libs "xml2 libxml2")
30+
ENDIF()
31+
32+
IF (NOT "${EXTERNALS_DIRECTORY}" STREQUAL "")
33+
IF (UNIX)
34+
IF (${ARCH64BIT} EQUAL 1)
35+
SET (osdir "linux64_gcc4.1.1")
36+
ELSE()
37+
SET (osdir "linux32_gcc4.1.1")
38+
ENDIF()
39+
ELSEIF(WIN32)
40+
SET (osdir "lib")
41+
ELSE()
42+
SET (osdir "unknown")
43+
ENDIF()
44+
IF (NOT ("${osdir}" STREQUAL "unknown"))
45+
FIND_PATH (LIBXML2_INCLUDE_DIR NAMES libxml/xpath.h PATHS "${EXTERNALS_DIRECTORY}/libxml2/include/" NO_DEFAULT_PATH)
46+
FIND_LIBRARY (LIBXML2_LIBRARIES NAMES ${libxml2_libs} PATHS "${EXTERNALS_DIRECTORY}/libxml2/${osdir}" NO_DEFAULT_PATH)
47+
ENDIF()
48+
ENDIF()
49+
50+
if (USE_NATIVE_LIBRARIES)
51+
# if we didn't find in externals, look in system include path
52+
FIND_PATH (LIBXML2_INCLUDE_DIR NAMES libxml/xpath.h PATH_SUFFIXES libxml2)
53+
FIND_LIBRARY (LIBXML2_LIBRARIES NAMES xml2 libxml2)
54+
endif()
55+
56+
include(FindPackageHandleStandardArgs)
57+
find_package_handle_standard_args(Libxml2 DEFAULT_MSG
58+
LIBXML2_LIBRARIES
59+
LIBXML2_INCLUDE_DIR
60+
)
61+
MARK_AS_ADVANCED(LIBXML2_INCLUDE_DIR LIBXML2_LIBRARIES)
62+
ENDIF()
63+

cmake_modules/dependencies/el6.cmake

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
set ( CPACK_RPM_PACKAGE_REQUIRES "hpccsystems-platform, ganglia-gmond-python, python-lxml" )
1+
set ( CPACK_RPM_PACKAGE_REQUIRES "hpccsystems-platform, ganglia-gmond-python, python-lxml, rrdtool" )
+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
set ( CPACK_DEBIAN_PACKAGE_DEPENDS "hpccsystems-platform, collectd-core, ganglia-monitor, python-lxml")
1+
set ( CPACK_DEBIAN_PACKAGE_DEPENDS "hpccsystems-platform, ganglia-monitor, ganglia-monitor-python, python-lxml, rrdtool")
+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
set ( CPACK_DEBIAN_PACKAGE_DEPENDS "hpccsystems-platform, ganglia-monitor, ganglia-monitor-python, python-lxml, rrdtool")
+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
set ( CPACK_DEBIAN_PACKAGE_DEPENDS "hpccsystems-platform, ganglia-monitor, ganglia-monitor-python, python-lxml, rrdtool")

0 commit comments

Comments
 (0)