From a1a5895c8946474e987742b32d60ea4800ee40ca Mon Sep 17 00:00:00 2001 From: Bill Hoffman Date: Thu, 1 Nov 2007 09:52:09 -0400 Subject: [PATCH] ENH: fix for RPM generator from Eric --- Modules/CPackRPM.cmake | 30 ++++++++++++++++++++---------- 1 file changed, 20 insertions(+), 10 deletions(-) diff --git a/Modules/CPackRPM.cmake b/Modules/CPackRPM.cmake index 917f67507..02bd1516c 100644 --- a/Modules/CPackRPM.cmake +++ b/Modules/CPackRPM.cmake @@ -110,7 +110,19 @@ ENDIF(NOT CPACK_RPM_PACKAGE_VENDOR) # a source RPM # CPACK_RPM_PACKAGE_DESCRIPTION -# FIXME may be found in CPACK_PACKAGE_DESCRIPTION_FILE +# The variable content may be either +# - explicitely given by tthe user or +# - filled with the content of CPACK_PACKAGE_DESCRIPTION_FILE +# if it is defined +# - set to a default value +# +IF (NOT CPACK_RPM_PACKAGE_DESCRIPTION) + IF (CPACK_PACKAGE_DESCRIPTION_FILE) + FILE(READ ${CPACK_PACKAGE_DESCRIPTION_FILE} CPACK_RPM_PACKAGE_DESCRIPTION) + ELSE (CPACK_PACKAGE_DESCRIPTION_FILE) + SET(CPACK_RPM_PACKAGE_DESCRIPTION "no package description available") + ENDIF (CPACK_PACKAGE_DESCRIPTION_FILE) +ENDIF (NOT CPACK_RPM_PACKAGE_DESCRIPTION) # CPACK_RPM_USER_BINARY_SPECFILE # FIXME when this is set then CPack should us the @@ -173,19 +185,17 @@ Vendor: ${CPACK_RPM_PACKAGE_VENDOR} %define _topdir ${CPACK_RPM_DIRECTORY} %description -${CPACK_RPM_PACKAGE_NAME} : will come soon -with the value of CPACK_RPM_PACKAGE_DESCRIPTION -or -the content of CPACK_PACKAGE_DESCRIPTION_FILE -*** ${CPACK_RPM_PACKAGE_DESCRIPTION} -*** -%prep +# This is a shortcutted spec file +# generated by CMake RPM generator +# we skip the %prepn %build and %install +# steps because CPack does that for us +#%prep -%build +#%build -%install +#%install %clean