Commit de1d29d9 authored by Shervin Nourbakhsh's avatar Shervin Nourbakhsh
Browse files

Installation of cameo-server and cmo scripts, removed dependency on java from debian packages

parent 0ea6ea17
......@@ -12,8 +12,9 @@ if(NOT DEFINED CMAKE_BUILD_TYPE)
endif()
# find the jar file produced by MAVEN
set(PROJECT_JAR_FILE_NAME ${PROJECT_NAME}${JAVA_JZMQ}-${PROJECT_VERSION}-full.jar)
set(PROJECT_TARGET_DIR "${CMAKE_CURRENT_SOURCE_DIR}/target")
set(PROJECT_JAR ${PROJECT_TARGET_DIR}/${PROJECT_NAME}${JAVA_JZMQ}-${PROJECT_VERSION}-full.jar)
set(PROJECT_JAR ${PROJECT_TARGET_DIR}/${PROJECT_JAR_FILE_NAME})
set(JAVA_INSTALL_DIR ${CMAKE_INSTALL_DATAROOTDIR}/java/cameo)
file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/installed/${JAVA_INSTALL_DIR})
......@@ -33,9 +34,15 @@ add_custom_target(console
install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/installed/${JAVA_INSTALL_DIR}/
DESTINATION ${JAVA_INSTALL_DIR}
COMPONENT console
# COMPONENT console
)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/../cameo-console/scripts/cmo.in
${CMAKE_CURRENT_BINARY_DIR}/cmo)
install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/cmo
TYPE BIN
)
#------------------------------------------------------------
# CPack
......
set(CPACK_DEBIAN_PACKAGE_ARCHITECTURE all)
set(CPACK_RPM_PACKAGE_ARCHITECTURE noarch)
set(CPACK_DEBIAN_PACKAGE_DEPENDS "java9-sdk, cameo-server (>=1.0.2)")
set(CPACK_DEBIAN_PACKAGE_DEPENDS "cameo-server (>=1.0.2)")
set(CPACK_DEBIAN_PACKAGE_PROVIDES "cameo-console (=${PROJECT_VERSION})")
#!/bin/sh
java --illegal-access=deny -jar "`dirname $0`/../@JAVA_INSTALL_DIR@/@PROJECT_JAR_FILE_NAME@" "$@"
......@@ -12,8 +12,9 @@ if(NOT DEFINED CMAKE_BUILD_TYPE)
endif()
# find the jar file produced by MAVEN
set(PROJECT_JAR_FILE_NAME ${PROJECT_NAME}${JAVA_JZMQ}-${PROJECT_VERSION}-full.jar)
set(PROJECT_TARGET_DIR "${CMAKE_CURRENT_SOURCE_DIR}/target")
set(PROJECT_JAR ${PROJECT_TARGET_DIR}/${PROJECT_NAME}${JAVA_JZMQ}-${PROJECT_VERSION}-full.jar)
set(PROJECT_JAR ${PROJECT_TARGET_DIR}/${PROJECT_JAR_FILE_NAME})
set(JAVA_INSTALL_DIR ${CMAKE_INSTALL_DATAROOTDIR}/java/cameo)
file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/installed/${JAVA_INSTALL_DIR})
......@@ -36,7 +37,10 @@ install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/installed/${JAVA_INSTALL_DIR}/
DESTINATION ${JAVA_INSTALL_DIR}
)
install(PROGRAMS ${CMAKE_CURRENT_SOURCE_DIR}/../cameo-server/scripts/cameo-server
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/../cameo-server/scripts/cameo-server.in
${CMAKE_CURRENT_BINARY_DIR}/cameo-server)
install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/cameo-server
TYPE BIN
)
......
set(CPACK_DEBIAN_PACKAGE_ARCHITECTURE all)
set(CPACK_RPM_PACKAGE_ARCHITECTURE noarch)
set(CPACK_DEBIAN_PACKAGE_DEPENDS "java9-sdk")
set(CPACK_DEBIAN_PACKAGE_DEPENDS "")
set(CPACK_DEBIAN_PACKAGE_SUGGESTS "java9-sdk")
set(CPACK_DEBIAN_PACKAGE_PROVIDES "cameo-server (=${PROJECT_VERSION})")
#!/bin/sh
java -jar "/usr/local/share/java//cameo-server.jar" $@
#!/bin/sh
java --illegal-access=deny -jar "`dirname $0`/../@JAVA_INSTALL_DIR@/@PROJECT_JAR_FILE_NAME@" "$@"
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment