From: Kornel Benko Date: Wed, 25 Feb 2009 07:42:50 +0000 (+0000) Subject: Added revision as the release number for rpm package X-Git-Tag: 2.0.0~7154 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=9d1a382472b868784d5e5ad802b0c96b391f34ab;p=features.git Added revision as the release number for rpm package to avoid the need of the --force flag when updating. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@28604 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/development/cmake/CMakeLists.txt b/development/cmake/CMakeLists.txt index baec915e79..8d4f4254df 100644 --- a/development/cmake/CMakeLists.txt +++ b/development/cmake/CMakeLists.txt @@ -402,7 +402,7 @@ SET(CPACK_PACKAGE_INSTALL_DIRECTORY "CMake ${LYX_INSTALL_SUFFIX}") # # needed by rpm SET(CPACK_SET_DESTDIR "ON") -SET(CPACK_RPM_PACKAGE_LICENSE "GPL") +FILE(READ "${TOP_SRC_DIR}/development/cmake/LyX_license.txt" CPACK_RPM_PACKAGE_LICENSE) SET(CPACK_RPM_PACKAGE_GROUP "Applications/Publishing") SET(CPACK_RPM_PACKAGE_VENDOR "The LyX team") # @@ -413,6 +413,13 @@ SET(CPACK_SOURCE_PACKAGE_FILE_NAME "lyx-${LYX_INSTALL_SUFFIX}") # for the next ones, cmake insists on data with values in some file SET(CPACK_PACKAGE_DESCRIPTION_FILE "${TOP_SRC_DIR}/development/cmake/LyX_description.txt") SET(CPACK_RESOURCE_FILE_LICENSE "${TOP_SRC_DIR}/development/cmake/LyX_license.txt") + +# Find the revision number and use it as the release in rpm-package-build. +# This way we may omit the otherwise needed "--force" parameter when +# installing from that rpm package. +FIND_PROGRAM(_svnversion svnversion) +EXECUTE_PROCESS(COMMAND ${_svnversion} WORKING_DIRECTORY "${TOP_SRC_DIR}" OUTPUT_VARIABLE CPACK_RPM_PACKAGE_RELEASE OUTPUT_STRIP_TRAILING_WHITESPACE) + # we do not have a readme or welcome data, # so we do not provide infofiles for # CPACK_RESOURCE_FILE_README and CPACK_RESOURCE_FILE_WELCOME @@ -427,4 +434,3 @@ include(CPack) # list # rpm -qlp lyx-2.0.1-Linux.rpm # dpkg-deb -c lyx-2.0.1-Linux.deb # install # rpm -U lyx-2.0.1-Linux.rpm # dpkg -i lyx-2.0.1-Linux.deb # -