summaryrefslogtreecommitdiffstats
path: root/Modules/CPackRPM.cmake
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2007-11-01 13:52:09 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2007-11-01 13:52:09 (GMT)
commita1a5895c8946474e987742b32d60ea4800ee40ca (patch)
treed2a335886a7be9554ea30883042dffc6d40608e6 /Modules/CPackRPM.cmake
parent9371ac21a0188c9efcc3ee74e5447c1c8a6be1b6 (diff)
downloadCMake-a1a5895c8946474e987742b32d60ea4800ee40ca.zip
CMake-a1a5895c8946474e987742b32d60ea4800ee40ca.tar.gz
CMake-a1a5895c8946474e987742b32d60ea4800ee40ca.tar.bz2
ENH: fix for RPM generator from Eric
Diffstat (limited to 'Modules/CPackRPM.cmake')
-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