[Bf-blender-cvs] [6ad9941] master: Add the date to the CPack rpm package version

Dan Eicher noreply at git.blender.org
Wed Feb 12 21:46:31 CET 2014


Commit: 6ad9941c74c5e6c5a1fe519ed1dba2561528d0fe
Author: Dan Eicher
Date:   Wed Feb 12 13:39:23 2014 -0700
https://developer.blender.org/rB6ad9941c74c5e6c5a1fe519ed1dba2561528d0fe

Add the date to the CPack rpm package version

Updating rpms built from 'make package' has issues using the git hash since it isn't in a set order like svn commits, this lets it use the date to determine if the rpm is newer than the installed version.

Also updates the license text.

===================================================================

M	build_files/cmake/packaging.cmake

===================================================================

diff --git a/build_files/cmake/packaging.cmake b/build_files/cmake/packaging.cmake
index ad309b0..735d3fd 100644
--- a/build_files/cmake/packaging.cmake
+++ b/build_files/cmake/packaging.cmake
@@ -35,18 +35,19 @@ set(BUILD_REV ${MY_WC_HASH})
 
 
 # Force Package Name
-set(CPACK_PACKAGE_FILE_NAME ${PROJECT_NAME}-${MAJOR_VERSION}.${MINOR_VERSION}.${PATCH_VERSION}-1.${BUILD_REV}-${CMAKE_SYSTEM_PROCESSOR})
+execute_process(COMMAND date "+%Y%m%d" OUTPUT_VARIABLE CPACK_DATE OUTPUT_STRIP_TRAILING_WHITESPACE)
+set(CPACK_PACKAGE_FILE_NAME ${PROJECT_NAME}-${MAJOR_VERSION}.${MINOR_VERSION}.${PATCH_VERSION}-git${CPACK_DATE}.${BUILD_REV}-${CMAKE_SYSTEM_PROCESSOR})
 
 if(CMAKE_SYSTEM_NAME MATCHES "Linux")
 	# RPM packages
 	include(build_files/cmake/RpmBuild.cmake)
 	if(RPMBUILD_FOUND AND NOT WIN32)
 		set(CPACK_GENERATOR "RPM")
-		set(CPACK_RPM_PACKAGE_RELEASE "1.${BUILD_REV}")
+		set(CPACK_RPM_PACKAGE_RELEASE "git${CPACK_DATE}.${BUILD_REV}")
 		set(CPACK_SET_DESTDIR "true")
 		set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "${PROJECT_DESCRIPTION}")
 		set(CPACK_PACKAGE_RELOCATABLE "false")
-		set(CPACK_RPM_PACKAGE_LICENSE "GPLv2")
+		set(CPACK_RPM_PACKAGE_LICENSE "GPLv2+ and Apache 2.0")
 		set(CPACK_RPM_PACKAGE_GROUP "Amusements/Multimedia")
 		set(CPACK_RPM_USER_BINARY_SPECFILE "${CMAKE_SOURCE_DIR}/build_files/package_spec/rpm/blender.spec.in")
 	endif()




More information about the Bf-blender-cvs mailing list