incubator-celix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From abroekh...@apache.org
Subject svn commit: r1203193 - in /incubator/celix/trunk: Remote Services.launch cmake/CPackConfig.in cmake/Packaging.cmake deployment_admin/CMakeLists.txt
Date Thu, 17 Nov 2011 14:06:38 GMT
Author: abroekhuis
Date: Thu Nov 17 14:06:38 2011
New Revision: 1203193

URL: http://svn.apache.org/viewvc?rev=1203193&view=rev
Log:
Initial DeploymentAdmin version and support

Modified:
    incubator/celix/trunk/Remote Services.launch
    incubator/celix/trunk/cmake/CPackConfig.in
    incubator/celix/trunk/cmake/Packaging.cmake
    incubator/celix/trunk/deployment_admin/CMakeLists.txt

Modified: incubator/celix/trunk/Remote Services.launch
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/Remote%20Services.launch?rev=1203193&r1=1203192&r2=1203193&view=diff
==============================================================================
--- incubator/celix/trunk/Remote Services.launch (original)
+++ incubator/celix/trunk/Remote Services.launch Thu Nov 17 14:06:38 2011
@@ -29,7 +29,7 @@
 <stringAttribute key="org.eclipse.cdt.launch.DEBUGGER_STOP_AT_MAIN_SYMBOL" value="main"/>
 <booleanAttribute key="org.eclipse.cdt.launch.ENABLE_REGISTER_BOOKKEEPING" value="false"/>
 <booleanAttribute key="org.eclipse.cdt.launch.ENABLE_VARIABLE_BOOKKEEPING" value="false"/>
-<stringAttribute key="org.eclipse.cdt.launch.FORMAT" value="&lt;?xml version=&quot;1.0&quot;
encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&lt;contentList&gt;&lt;content
id=&quot;userData-bundleActivator_stop-(cast)&quot; val=&quot;DEPENDENCY_ACTIVATOR_BASE&quot;/&gt;&lt;content
id=&quot;*table-table-exportedServices-admin-activator-bundleActivator_stop-(cast_to_array)&quot;
val=&quot;0:1&quot;/&gt;&lt;content id=&quot;componentData-bundleActivator_create-(cast)&quot;
val=&quot;log_writer_t&quot;/&gt;&lt;content id=&quot;key-hashMapIterator_remove-(cast)&quot;
val=&quot;char *&quot;/&gt;&lt;content id=&quot;userData-userData-fw_startBundle-(cast)&quot;
val=&quot;log_writer_t&quot;/&gt;&lt;content id=&quot;*userData-userData-bundleActivator_create-(cast)&quot;
val=&quot;DEPENDENCY_ACTIVATOR_BASE&quot;/&gt;&lt;content id=&quot;userData-*userData-userData-bundleActivator_create-(cast)&quot;
val=&quot;log_writer_t&quot;/&gt;&lt;content id=&quot;userData-data-bundleAct
 ivator_start-(cast)&quot; val=&quot;log_writer_t&quot;/&gt;&lt;content
id=&quot;userData-fw_startBundle-(cast)&quot; val=&quot;DEPENDENCY_ACTIVATOR_BASE&quot;/&gt;&lt;content
id=&quot;userData-userData-bundleActivator_stop-(cast)&quot; val=&quot;log_writer_t&quot;/&gt;&lt;/contentList&gt;"/>
+<stringAttribute key="org.eclipse.cdt.launch.FORMAT" value="&lt;?xml version=&quot;1.0&quot;
encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&lt;contentList&gt;&lt;content
id=&quot;userData-userData-bundleActivator_stop-(cast)&quot; val=&quot;log_writer_t&quot;/&gt;&lt;content
id=&quot;userData-fw_startBundle-(cast)&quot; val=&quot;DEPENDENCY_ACTIVATOR_BASE&quot;/&gt;&lt;content
id=&quot;userData-data-bundleActivator_start-(cast)&quot; val=&quot;log_writer_t&quot;/&gt;&lt;content
id=&quot;userData-*userData-userData-bundleActivator_create-(cast)&quot; val=&quot;log_writer_t&quot;/&gt;&lt;content
id=&quot;*userData-userData-bundleActivator_create-(cast)&quot; val=&quot;DEPENDENCY_ACTIVATOR_BASE&quot;/&gt;&lt;content
id=&quot;userData-userData-fw_startBundle-(cast)&quot; val=&quot;log_writer_t&quot;/&gt;&lt;content
id=&quot;key-hashMapIterator_remove-(cast)&quot; val=&quot;char *&quot;/&gt;&lt;content
id=&quot;componentData-bundleActivator_create-(cast)&quot; val=&quo
 t;log_writer_t&quot;/&gt;&lt;content id=&quot;*table-table-exportedServices-admin-activator-bundleActivator_stop-(cast_to_array)&quot;
val=&quot;0:1&quot;/&gt;&lt;content id=&quot;userData-bundleActivator_stop-(cast)&quot;
val=&quot;DEPENDENCY_ACTIVATOR_BASE&quot;/&gt;&lt;/contentList&gt;"/>
 <stringAttribute key="org.eclipse.cdt.launch.GLOBAL_VARIABLES" value="&lt;?xml version=&quot;1.0&quot;
encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#10;&lt;globalVariableList/&gt;&#10;"/>
 <stringAttribute key="org.eclipse.cdt.launch.MEMORY_BLOCKS" value="&lt;?xml version=&quot;1.0&quot;
encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#10;&lt;memoryBlockExpressionList/&gt;&#10;"/>
 <stringAttribute key="org.eclipse.cdt.launch.PROGRAM_NAME" value="build/launcher/launcher"/>

Modified: incubator/celix/trunk/cmake/CPackConfig.in
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/cmake/CPackConfig.in?rev=1203193&r1=1203192&r2=1203193&view=diff
==============================================================================
--- incubator/celix/trunk/cmake/CPackConfig.in (original)
+++ incubator/celix/trunk/cmake/CPackConfig.in Thu Nov 17 14:06:38 2011
@@ -17,13 +17,23 @@
 
 SET(CPACK_CMAKE_GENERATOR "@CMAKE_GENERATOR@")
 SET(CPACK_GENERATOR "@CPACK_GENERATOR@")
-SET(CPACK_INSTALL_CMAKE_PROJECTS "@BUNDLE_BIN_DIR@;@BUNDLE_NAME@;@BUNDLE_NAME@;/")
+SET(CPACK_INSTALL_CMAKE_PROJECTS "@PROJECT_BINARY_DIR@;@PROJECT_NAME@;@BUNDLE_NAME@;/")
 SET(CPACK_MODULE_PATH "")
 SET(CPACK_PACKAGE_DESCRIPTION "Package description")
+#SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "IBS @BUNDLE_NAME@ Package")
+#SET(CPACK_PACKAGE_FILE_NAME "@BUNDLE_NAME@-@IBS_VERSION@")
 SET(CPACK_PACKAGE_FILE_NAME "@BUNDLE_NAME@")
+#SET(CPACK_PACKAGE_INSTALL_DIRECTORY "IBS")
 SET(CPACK_PACKAGE_NAME "@CPACK_PACKAGE_NAME@")
+#SET(CPACK_PACKAGE_VENDOR "HPA")
 SET(CPACK_PACKAGE_VERSION "@IBS_VERSION@")
+#SET(CPACK_PACKAGE_VERSION_MAJOR "@IBS_MAJOR@")
+#SET(CPACK_PACKAGE_VERSION_MINOR "@IBS_MINOR@")
+#SET(CPACK_PACKAGE_VERSION_PATCH "@IBS_PATCH@")
+#SET(CPACK_RESOURCE_FILE_LICENSE "@PROJECT_SOURCE_DIR@/cpack/License.txt")
+#SET(CPACK_RESOURCE_FILE_README "@PROJECT_SOURCE_DIR@/cpack/Readme.txt")
+#SET(CPACK_RESOURCE_FILE_WELCOME "@PROJECT_SOURCE_DIR@/cpack/Welcome.txt")
 SET(CPACK_SYSTEM_NAME "@CPACK_SYSTEM_NAME@")
 SET(CPACK_TOPLEVEL_TAG "@CPACK_TOPLEVEL_TAG@")
 SET(CPACK_INCLUDE_TOPLEVEL_DIRECTORY "0")
-#set(CPACK_INSTALLED_DIRECTORIES "@BUNDLE_SOURCE_DIR@/META-INF;/META-INF")
+set(CPACK_INSTALLED_DIRECTORIES "@BUNDLE_SOURCE_DIR@/META-INF;/META-INF")

Modified: incubator/celix/trunk/cmake/Packaging.cmake
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/cmake/Packaging.cmake?rev=1203193&r1=1203192&r2=1203193&view=diff
==============================================================================
--- incubator/celix/trunk/cmake/Packaging.cmake (original)
+++ incubator/celix/trunk/cmake/Packaging.cmake Thu Nov 17 14:06:38 2011
@@ -22,39 +22,49 @@ IF(NOT CPACK_COMMAND)
 	MESSAGE(FATAL_ERROR "Need CPack!")
 ENDIF(NOT CPACK_COMMAND)
 
+#IF(UNIX)
+#	SET(CPACK_GENERATOR "TGZ;STGZ")
+#ENDIF(UNIX)
+#IF(CMAKE_SYSTEM_NAME STREQUAL "Linux")
+#	SET(CPACK_GENERATOR "TBZ2;STGZ")
+#ENDIF(CMAKE_SYSTEM_NAME STREQUAL "Linux")
+#IF(WIN32)
+#	SET(CPACK_GENERATOR "NSIS;ZIP")
+#ENDIF(WIN32)
+
 SET(CPACK_GENERATOR "ZIP")
 
-file(MAKE_DIRECTORY ${PROJECT_BINARY_DIR}/bundles ${PROJECT_BINARY_DIR}/packages)
+ADD_CUSTOM_TARGET(bundles)
+ADD_CUSTOM_TARGET(packages)
 
 MACRO(bundle)
-    PARSE_ARGUMENTS(BUNDLE "SOURCES;FILES;DIRECTORIES" "" ${ARGN})
+    PARSE_ARGUMENTS(BUNDLE "FILES;DIRECTORIES" "" ${ARGN})
     LIST(GET BUNDLE_DEFAULT_ARGS 0 BUNDLE_NAME)
     
-	add_library(${BUNDLE_NAME} SHARED ${BUNDLE_SOURCES})
-    
-    install (DIRECTORY META-INF DESTINATION . COMPONENT ${BUNDLE_NAME} FILES_MATCHING PATTERN
"*" PATTERN ".svn" EXCLUDE)
+    #install (DIRECTORY META-INF DESTINATION . COMPONENT ${BUNDLE_NAME} FILES_MATCHING PATTERN
"*" PATTERN ".svn" EXCLUDE)
+	
 	install (TARGETS ${BUNDLE_NAME} DESTINATION . COMPONENT ${BUNDLE_NAME})
+    
     if (BUNDLE_FILES)
 	    install (FILES ${BUNDLE_FILES} DESTINATION . COMPONENT ${BUNDLE_NAME})
     endif(BUNDLE_FILES)
     if (BUNDLE_DIRECTORIES)
 	    install (DIRECTORY ${BUNDLE_DIRECTORIES} DESTINATION . COMPONENT ${BUNDLE_NAME})
     endif(BUNDLE_DIRECTORIES)
+    
 
+	SET(__bundleTarget bundle_${BUNDLE_NAME})
 	SET(__bundleConfig ${CMAKE_CURRENT_BINARY_DIR}/CPackConfig-${BUNDLE_NAME}-bundle.cmake)
-	SET(BUNDLE_BIN_DIR ${CMAKE_CURRENT_BINARY_DIR})
+	SET(BUNDLE_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR})
+
 	CONFIGURE_FILE(${PROJECT_SOURCE_DIR}/cmake/CPackConfig.in ${__bundleConfig} @ONLY)
-	ADD_CUSTOM_COMMAND(TARGET ${BUNDLE_NAME}
-		POST_BUILD
-		COMMAND ${CPACK_COMMAND} ARGS --config ${__bundleConfig}
-		COMMAND mkdir -p ${PROJECT_BINARY_DIR}/ziptojar \;
-			cd ${PROJECT_BINARY_DIR}/ziptojar \;
-			jar -xf ${PROJECT_BINARY_DIR}/bundles/${BUNDLE_NAME}.zip \;
-			jar -cfm ${PROJECT_BINARY_DIR}/bundles/${BUNDLE_NAME}.zip META-INF/MANIFEST.MF . \;
-			rm -rf ${PROJECT_BINARY_DIR}/ziptojar/*
-		WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/bundles
+	ADD_CUSTOM_TARGET(${__bundleTarget}
+		mkdir -p ${PROJECT_BINARY_DIR}/bundles \;
+		cd ${PROJECT_BINARY_DIR}/bundles \; 
+		${CPACK_COMMAND} --config "${__bundleConfig}"
 	)
-	SET_DIRECTORY_PROPERTIES(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES ${PROJECT_BINARY_DIR}/bundles/${BUNDLE_NAME}.zip)
+	ADD_DEPENDENCIES(bundles ${__bundleTarget})
+	ADD_DEPENDENCIES(${__bundleTarget} ${BUNDLE_NAME})
 ENDMACRO(bundle)
 	
 MACRO(package)
@@ -62,6 +72,9 @@ MACRO(package)
     LIST(GET PACKAGE_DEFAULT_ARGS 0 PACKAGE_NAME)
 	
 	SET(PACKAGE_COMPONENT package_${PACKAGE_NAME})
+	SET(__packageTarget package_${PACKAGE_NAME})
+	SET(__bundleTarget bundle_${PACKAGE_NAME})
+	SET(__packageConfig ${CMAKE_CURRENT_BINARY_DIR}/CPackConfig-${PACKAGE_NAME}-pkg.cmake)
 	
 	install (FILES ${PROJECT_BINARY_DIR}/bundles/${PACKAGE_NAME}.zip DESTINATION . COMPONENT
${PACKAGE_COMPONENT})
 	
@@ -72,18 +85,17 @@ MACRO(package)
 	    install (DIRECTORY ${PACKAGE_DIRECTORIES} DESTINATION . COMPONENT ${PACKAGE_COMPONENT})
     endif(PACKAGE_DIRECTORIES)
 
-	SET(__packageConfig ${CMAKE_CURRENT_BINARY_DIR}/CPackConfig-${PACKAGE_NAME}-pkg.cmake)
 	CONFIGURE_FILE(${PROJECT_SOURCE_DIR}/cmake/CPackConfigPKG.in ${__packageConfig} @ONLY)
-	ADD_CUSTOM_COMMAND(TARGET ${PACKAGE_NAME}
-		POST_BUILD
-		COMMAND mkdir -p ${PROJECT_BINARY_DIR}/packages \;
-			cd ${PROJECT_BINARY_DIR}/packages \; 
-			${CPACK_COMMAND} --config "${__packageConfig}"
-		WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/packages
+	ADD_CUSTOM_TARGET(${__packageTarget}
+		mkdir -p ${CMAKE_CURRENT_BINARY_DIR}/packages \;
+		cd ${CMAKE_CURRENT_BINARY_DIR}/packages \; 
+		${CPACK_COMMAND} --config "${__packageConfig}"
 	)
-	
-	GET_DIRECTORY_PROPERTY(PROPS ADDITIONAL_MAKE_CLEAN_FILES)
-	SET_DIRECTORY_PROPERTIES(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES "${PROPS};${PROJECT_BINARY_DIR}/packages/${PACKAGE_NAME}_pkg.zip")
+	ADD_DEPENDENCIES(${__packageTarget} ${__bundleTarget})
+	ADD_DEPENDENCIES(packages ${__packageTarget})
+	ADD_CUSTOM_TARGET(clean_${__packageTarget}
+	    rm ${PROJECT_BINARY_DIR}/packages/IBS-${PACKAGE_NAME}
+    )
 ENDMACRO(package)
 
 
@@ -94,32 +106,25 @@ MACRO(deploy)
 	
 	SET(DEPLOY_COMPONENT deploy_${DEPLOY_NAME})
 	SET(__deployTarget deploy_${DEPLOY_NAME})
-	#SET(__deployConfig ${CMAKE_CURRENT_BINARY_DIR}/CPackConfig-${DEPLOY_NAME}-deploy.cmake)
+	SET(__deployConfig ${CMAKE_CURRENT_BINARY_DIR}/CPackConfig-${DEPLOY_NAME}-deploy.cmake)
 		
-	#SET(DEPLOY_BIN_DIR ${CMAKE_CURRENT_BINARY_DIR}/deploy/${DEPLOY_NAME})
-	#CONFIGURE_FILE(${PROJECT_SOURCE_DIR}/cmake/CPackConfigDeploy.in ${__deployConfig} @ONLY)
+	CONFIGURE_FILE(${PROJECT_SOURCE_DIR}/cmake/CPackConfigDeploy.in ${__deployConfig} @ONLY)
+	ADD_CUSTOM_TARGET(${__deployTarget}
+		mkdir -p ${CMAKE_CURRENT_BINARY_DIR}/deploy \;
+		cd ${CMAKE_CURRENT_BINARY_DIR}/deploy \; 
+		${CPACK_COMMAND} --config "${__deployConfig}"
+	)
 	#install(FILES ${EXT_DIR}/celix/* DESTINATION . COMPONENT ${DEPLOY_COMPONENT})
 	
 	SET(BUNDLES "")
-	SET(DEPS)
-	FOREACH(BUNDLE ${DEPLOY_BUNDLES})
-		SET(DEP_NAME ${DEPLOY_NAME}_${BUNDLE}) 
-		add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/deploy/${DEPLOY_NAME}/bundles/${BUNDLE}.zip
+	foreach(BUNDLE ${DEPLOY_BUNDLES})
+		add_custom_command(TARGET ${__deployTarget}
       		COMMAND ${CMAKE_COMMAND} -E copy ${PROJECT_BINARY_DIR}/bundles/${BUNDLE}.zip 
       			${CMAKE_CURRENT_BINARY_DIR}/deploy/${DEPLOY_NAME}/bundles/${BUNDLE}.zip
-  			DEPENDS ${BUNDLE}
-  			COMMENT "Deploying ${BUNDLE} to ${DEPLOY_NAME}"
       	)
 	    SET(BUNDLES "${BUNDLES} bundles/${BUNDLE}.zip")
-	    SET(DEPS ${DEPS};${CMAKE_CURRENT_BINARY_DIR}/deploy/${DEPLOY_NAME}/bundles/${BUNDLE}.zip)
-	ENDFOREACH(BUNDLE)
-    ADD_CUSTOM_TARGET(${__deployTarget} 
-    	#mkdir -p ${CMAKE_CURRENT_BINARY_DIR}/deploy \;
-		#	cd ${CMAKE_CURRENT_BINARY_DIR}/deploy \; 
-		#	${CPACK_COMMAND} --config "${__deployConfig}"
-    	DEPENDS ${DEPS} launcher
-    	COMMENT "Deploy target ${DEPLOY_NAME}")
-    ADD_DEPENDENCIES(deploy ${__deployTarget})
+	    ADD_DEPENDENCIES(${__deployTarget} bundle_${BUNDLE})
+	endforeach(BUNDLE)
 	
 	CONFIGURE_FILE(${PROJECT_SOURCE_DIR}/cmake/config.properties.in ${CMAKE_CURRENT_BINARY_DIR}/deploy/${DEPLOY_NAME}/config.properties
@ONLY)
 	
@@ -137,10 +142,8 @@ MACRO(deploy)
 	
 	CONFIGURE_FILE(${PROJECT_SOURCE_DIR}/cmake/run.sh.in ${CMAKE_CURRENT_BINARY_DIR}/deploy/${DEPLOY_NAME}/run.sh
@ONLY)
 	
-	GET_DIRECTORY_PROPERTY(PROPS ADDITIONAL_MAKE_CLEAN_FILES)
-	SET_DIRECTORY_PROPERTIES(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES "${PROPS};${CMAKE_CURRENT_BINARY_DIR}/deploy/${DEPLOY_NAME}")
-	
-	#install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/deploy/${DEPLOY_NAME} DESTINATION . COMPONENT
${DEPLOY_COMPONENT})
+	install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/deploy/${DEPLOY_NAME} DESTINATION . COMPONENT
${DEPLOY_COMPONENT})
+	ADD_DEPENDENCIES(deploy ${__deployTarget})
 	#ADD_CUSTOM_TARGET(clean_${__packageTarget}
 	#    rm ${PROJECT_BINARY_DIR}/packages/IBS-${PACKAGE_NAME}
     #)

Modified: incubator/celix/trunk/deployment_admin/CMakeLists.txt
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/deployment_admin/CMakeLists.txt?rev=1203193&r1=1203192&r2=1203193&view=diff
==============================================================================
--- incubator/celix/trunk/deployment_admin/CMakeLists.txt (original)
+++ incubator/celix/trunk/deployment_admin/CMakeLists.txt Thu Nov 17 14:06:38 2011
@@ -22,7 +22,7 @@ include_directories("${PROJECT_SOURCE_DI
 include_directories("${PROJECT_SOURCE_DIR}/deployment_admin/private/include")
 
 link_directories("/opt/local/lib")
-bundle(deployment_admin SOURCES
+add_library(deployment_admin SHARED
 	private/src/deployment_package 
 	private/src/deployment_admin
 	private/src/deployment_admin_activator
@@ -32,4 +32,6 @@ bundle(deployment_admin SOURCES
 )
 target_link_libraries(deployment_admin framework curl)
 
+bundle(deployment_admin)
+
 deploy("deployment-admin" BUNDLES deployment_admin shell shell_tui log_service log_writer)



Mime
View raw message