summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Modules/CPackRPM.cmake30
1 files changed, 20 insertions, 10 deletions
diff --git a/Modules/CPackRPM.cmake b/Modules/CPackRPM.cmake
index 917f6750..02bd151 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