Changeset: b09b2713d405 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=b09b2713d405 Added Files: tools/merovingian/client/CMakeLists.txt tools/merovingian/daemon/CMakeLists.txt tools/merovingian/daemon/config/CMakeLists.txt tools/merovingian/utils/CMakeLists.txt Modified Files: CMakeLists.txt clients/mapiclient/CMakeLists.txt common/options/CMakeLists.txt common/stream/CMakeLists.txt gdk/CMakeLists.txt monetdb5/mal/CMakeLists.txt sql/CMakeLists.txt sql/server/CMakeLists.txt tools/merovingian/CMakeLists.txt tools/merovingian/daemon/config/.merovingian_properties.in tools/merovingian/daemon/config/monetdbd.in tools/mserver/CMakeLists.txt Branch: cmake-fun Log Message:
Compiles and installs monetdbd. diffs (239 lines): diff --git a/CMakeLists.txt b/CMakeLists.txt --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -188,7 +188,7 @@ if(UNIX OR APPLE) # instalation director set(LIBDIR "${CMAKE_INSTALL_FULL_LIBDIR}") set(LIBEXECDIR "${CMAKE_INSTALL_FULL_LIBEXECDIR}") set(LOCALSTATEDIR "${CMAKE_INSTALL_FULL_LOCALSTATEDIR}") - set(INCLUDEDIR "${CMAKE_INSTALL_FULL_INCLUDEDIR}/monetdb") + set(INCLUDEDIR "${CMAKE_INSTALL_FULL_INCLUDEDIR}") set(PKGCONFIGDIR "${LIBDIR}/pkgconfig") set(SYSCONFDIR "${CMAKE_INSTALL_FULL_SYSCONFDIR}") set(MANDIR "${CMAKE_INSTALL_FULL_MANDIR}") @@ -1985,6 +1985,7 @@ set(compilercall "${CMAKE_C_COMPILER}${C set(linkercall "${CMAKE_LINKER}${CMAKE_REQUIRED_FLAGS}") configure_file(${CMAKE_SOURCE_DIR}/cmake/monetdb_config.h.in ${CMAKE_SOURCE_DIR}/monetdb_config.h) +install(FILES monetdb_config.h DESTINATION ${INCLUDEDIR}/monetdb) include_directories(${CMAKE_SOURCE_DIR}) add_subdirectory(buildtools) diff --git a/clients/mapiclient/CMakeLists.txt b/clients/mapiclient/CMakeLists.txt --- a/clients/mapiclient/CMakeLists.txt +++ b/clients/mapiclient/CMakeLists.txt @@ -36,3 +36,4 @@ target_link_libraries(tomograph PRIVATE ${Iconv_LIBRARY} ${OPENSSL_LIBRARIES}) install(TARGETS mclient msqldump stethoscope tachograph tomograph DESTINATION ${BINDIR}) +install(FILES mclient.1 msqldump.1 DESTINATION ${DATADIR}/man/man1) diff --git a/common/options/CMakeLists.txt b/common/options/CMakeLists.txt --- a/common/options/CMakeLists.txt +++ b/common/options/CMakeLists.txt @@ -9,4 +9,4 @@ add_library(moptions OBJECT monet_options.c monet_options.h monet_getopt.h) set_target_properties(moptions PROPERTIES POSITION_INDEPENDENT_CODE ON) -install(FILES monet_options.h DESTINATION ${INCLUDEDIR}) +install(FILES monet_options.h DESTINATION ${INCLUDEDIR}/monetdb) diff --git a/common/stream/CMakeLists.txt b/common/stream/CMakeLists.txt --- a/common/stream/CMakeLists.txt +++ b/common/stream/CMakeLists.txt @@ -16,7 +16,7 @@ target_include_directories(stream PRIVAT set_target_properties(stream PROPERTIES VERSION ${STREAM_VERSION} SOVERSION ${STREAM_VERSION_MAJOR}) install(TARGETS stream LIBRARY DESTINATION ${LIBDIR}) -install(FILES stream_socket.h stream.h DESTINATION ${INCLUDEDIR}) +install(FILES stream_socket.h stream.h DESTINATION ${INCLUDEDIR}/monetdb) if(NOT WIN32) if(CURL_LIBRARY) diff --git a/gdk/CMakeLists.txt b/gdk/CMakeLists.txt --- a/gdk/CMakeLists.txt +++ b/gdk/CMakeLists.txt @@ -52,7 +52,7 @@ install(FILES gdk_hash.h gdk_system.h gdk_utils.h - DESTINATION ${INCLUDEDIR}) + DESTINATION ${INCLUDEDIR}/monetdb) if(NOT WIN32) if(MATH_LIBS) diff --git a/monetdb5/mal/CMakeLists.txt b/monetdb5/mal/CMakeLists.txt --- a/monetdb5/mal/CMakeLists.txt +++ b/monetdb5/mal/CMakeLists.txt @@ -59,4 +59,4 @@ install(FILES mal_resolve.h mal_stack.h mal_type.h - DESTINATION ${INCLUDEDIR}) + DESTINATION ${INCLUDEDIR}/monetdb) diff --git a/sql/CMakeLists.txt b/sql/CMakeLists.txt --- a/sql/CMakeLists.txt +++ b/sql/CMakeLists.txt @@ -15,3 +15,5 @@ add_subdirectory(scripts) #if(WIN32) # add_subdirectory(NT) #endif() + +install(FILES dump-restore.txt dump-restore.html DESTINATION ${DATADIR}/doc/MonetDB-SQL) diff --git a/sql/server/CMakeLists.txt b/sql/server/CMakeLists.txt --- a/sql/server/CMakeLists.txt +++ b/sql/server/CMakeLists.txt @@ -6,7 +6,7 @@ # Copyright 1997 - July 2008 CWI, August 2008 - 2019 MonetDB B.V. #]] -include_directories(../include ../common ../storage ../../monetdb5/mal ../../monetdb5/modules/atoms +include_directories(. ../include ../common ../storage ../../monetdb5/mal ../../monetdb5/modules/atoms ../../monetdb5/modules/mal ../../monetdb5/extras/rapi ../../clients/mapilib ../../common/options ../../common/stream ../../gdk) diff --git a/tools/merovingian/CMakeLists.txt b/tools/merovingian/CMakeLists.txt --- a/tools/merovingian/CMakeLists.txt +++ b/tools/merovingian/CMakeLists.txt @@ -6,4 +6,8 @@ # Copyright 1997 - July 2008 CWI, August 2008 - 2019 MonetDB B.V. #]] -#TODO +add_subdirectory(utils) +add_subdirectory(client) +if(HAVE_MONETDB5) + add_subdirectory(daemon) +endif() diff --git a/tools/merovingian/client/CMakeLists.txt b/tools/merovingian/client/CMakeLists.txt new file mode 100644 --- /dev/null +++ b/tools/merovingian/client/CMakeLists.txt @@ -0,0 +1,16 @@ +#[[ +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# +# Copyright 1997 - July 2008 CWI, August 2008 - 2019 MonetDB B.V. +#]] + +include_directories(../../../common/stream ../../../common/utils ../utils) + +add_executable(monetdb monetdb.c) +target_link_libraries(monetdb PRIVATE meroutil mcrypt msabaoth mutils stream ${UUID_LIBRARIES} ${OPENSSL_LIBRARIES} + ${SOCKET_LIBRARIES} ${ZLIB_LIBRARIES} ${BZIP2_LIBRARIES} ${SNAPPY_LIBRARIES} ${LZ4_LIBRARIES} + ${LIBLZMA_LIBRARY} ${CURL_LIBRARY} ${Iconv_LIBRARY}) +install(TARGETS monetdb DESTINATION ${BINDIR}) +install(FILES monetdb.1 DESTINATION ${DATADIR}/man/man1) diff --git a/tools/merovingian/daemon/CMakeLists.txt b/tools/merovingian/daemon/CMakeLists.txt new file mode 100644 --- /dev/null +++ b/tools/merovingian/daemon/CMakeLists.txt @@ -0,0 +1,24 @@ +#[[ +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# +# Copyright 1997 - July 2008 CWI, August 2008 - 2019 MonetDB B.V. +#]] + +add_subdirectory(config) + +include_directories(.. ../../../common/stream ../../../common/utils ../../../common/options ../../../clients/mapilib + ../../../gdk ../../../monetdb5/mal) + +add_executable(monetdbd merovingian.c merovingian.h argvcmds.c argvcmds.h client.c client.h connections.c connections.h + controlrunner.c controlrunner.h discoveryrunner.c discoveryrunner.h forkmserver.c forkmserver.h + handlers.c handlers.h multiplex-funnel.c multiplex-funnel.h proxy.c proxy.h) +target_link_libraries(monetdbd PRIVATE meroutil mcrypt msabaoth mutils stream mapi monetdb5 gdk ${UUID_LIBRARIES} + ${OPENSSL_LIBRARIES} ${SOCKET_LIBRARIES} ${ZLIB_LIBRARIES} ${BZIP2_LIBRARIES} ${SNAPPY_LIBRARIES} + ${LZ4_LIBRARIES} ${LIBLZMA_LIBRARY} ${CURL_LIBRARY} ${Iconv_LIBRARY} ${MATH_LIBS} ${MALLOC_LIBS} + ${PTHREAD_LIBRARIES} ${CMAKE_DL_LIBS} ${PCRE_LIBRARIES} ${LIBXML2_LIBRARIES}) +install(TARGETS monetdbd DESTINATION ${BINDIR}) + +configure_file(monetdbd.1.in monetdbd.1 @ONLY) +install(FILES monetdbd.1 DESTINATION ${DATADIR}/man/man1) diff --git a/tools/merovingian/daemon/config/.merovingian_properties.in b/tools/merovingian/daemon/config/.merovingian_properties.in --- a/tools/merovingian/daemon/config/.merovingian_properties.in +++ b/tools/merovingian/daemon/config/.merovingian_properties.in @@ -12,5 +12,5 @@ # is, however, crucial that the file locations in this file are present. -logfile=@Elogdir@@dir...@merovingian.log -pidfile=@Erundir@@dir...@merovingian.pid +logfile=@Elogdir@@dir_sep_...@merovingian.log +pidfile=@Erundir@@dir_sep_...@merovingian.pid diff --git a/tools/merovingian/daemon/config/CMakeLists.txt b/tools/merovingian/daemon/config/CMakeLists.txt new file mode 100644 --- /dev/null +++ b/tools/merovingian/daemon/config/CMakeLists.txt @@ -0,0 +1,20 @@ +#[[ +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# +# Copyright 1997 - July 2008 CWI, August 2008 - 2019 MonetDB B.V. +#]] + +set(Elogdir "${LOGDIR}") +set(Erundir "${RUNDIR}") +set(Ebindir "${BINDIR}") +set(Elocalstatedir "${LOCALSTATEDIR}") + +configure_file(.merovingian_properties.in .merovingian_properties @ONLY) +configure_file(monetdbd.service.in monetdbd.service @ONLY) +configure_file(monetdbd.in monetdbd @ONLY) + +install(FILES .merovingian_properties DESTINATION ${LOCALSTATEDIR}/monetdb5/dbfarm) +install(FILES monetdbd.service DESTINATION ${LIBDIR}/systemd/system) +install(FILES monetdbd DESTINATION ${SYSCONFDIR}/logrotate.d) diff --git a/tools/merovingian/daemon/config/monetdbd.in b/tools/merovingian/daemon/config/monetdbd.in --- a/tools/merovingian/daemon/config/monetdbd.in +++ b/tools/merovingian/daemon/config/monetdbd.in @@ -1,9 +1,9 @@ # this is the logrotate configuration for merovingian -@Elogdir@@dir...@merovingian.log { +@Elogdir@@dir_sep_...@merovingian.log { su monetdb monetdb missingok notifempty postrotate - [ -s @Erundir@@dir...@merovingian.pid ] && kill -HUP $(cat @Erundir@@dir...@merovingian.pid) + [ -s @Erundir@@dir_sep_...@merovingian.pid ] && kill -HUP $(cat @Erundir@@dir_sep_...@merovingian.pid) endscript } diff --git a/tools/merovingian/utils/CMakeLists.txt b/tools/merovingian/utils/CMakeLists.txt new file mode 100644 --- /dev/null +++ b/tools/merovingian/utils/CMakeLists.txt @@ -0,0 +1,12 @@ +#[[ +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# +# Copyright 1997 - July 2008 CWI, August 2008 - 2019 MonetDB B.V. +#]] + +include_directories(../../../common/stream ../../../common/options ../../../common/utils ${OPENSSL_INCS}) + +add_library(meroutil OBJECT control.c control.h database.c database.h glob.c glob.h properties.c properties.h utils.c + utils.h) diff --git a/tools/mserver/CMakeLists.txt b/tools/mserver/CMakeLists.txt --- a/tools/mserver/CMakeLists.txt +++ b/tools/mserver/CMakeLists.txt @@ -20,6 +20,13 @@ target_link_libraries(mserver5 PRIVATE m ${SNAPPY_LIBRARIES} ${LZ4_LIBRARIES} ${LIBLZMA_LIBRARY} ${CURL_LIBRARY} ${Iconv_LIBRARY}) install(TARGETS mserver5 DESTINATION ${BINDIR}) +install(FILES tomographintro.docx tomographintro.pdf DESTINATION ${DATADIR}/doc/MonetDB-client-tools) +install(FILES monetdblogo.png DESTINATION ${DATADIR}/doc/MonetDB) + +set(localstatedir "${LOCALSTATEDIR}") +configure_file(mserver5.1.in mserver5.1 @ONLY) +install(FILES mserver5.1 DESTINATION ${DATADIR}/man/man1) + if(HAVE_TESTING) add_executable(shutdowntest shutdowntest.c) target_link_libraries(shutdowntest PRIVATE monetdb5 mal gdk stream mapi ${UUID_LIBRARIES} ${MATH_LIBS} _______________________________________________ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list