summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
Diffstat (limited to 'Source')
-rw-r--r--Source/CPack/cmCPackRPMGenerator.cxx25
-rw-r--r--Source/CPack/cmCPackRPMGenerator.h6
2 files changed, 25 insertions, 6 deletions
diff --git a/Source/CPack/cmCPackRPMGenerator.cxx b/Source/CPack/cmCPackRPMGenerator.cxx
index e4e0b05..83d653f 100644
--- a/Source/CPack/cmCPackRPMGenerator.cxx
+++ b/Source/CPack/cmCPackRPMGenerator.cxx
@@ -35,19 +35,34 @@ cmCPackRPMGenerator::~cmCPackRPMGenerator()
}
//----------------------------------------------------------------------
-int cmCPackRPMGenerator::CompressFiles(const char* outFileName,
- const char* toplevel,
+int cmCPackRPMGenerator::CompressFiles(const char* /*outFileName*/,
+ const char* /*toplevel*/,
const std::vector<std::string>& /*files*/)
{
this->ReadListFile("CPackRPM.cmake");
+// const char* cmakeExecutable = this->GetOption("CMAKE_COMMAND");
+
if (!this->IsSet("RPMBUILD_EXECUTABLE"))
{
cmCPackLogger(cmCPackLog::LOG_ERROR, "Cannot find rpmbuild" << std::endl);
return 0;
}
- const char* rpmbuildExecutable = this->GetOption("RPMBUILD_EXECUTABLE");
- printf("rpmbuild: %s outFileName: %s toplevel: %s\n", rpmbuildExecutable,
- outFileName, toplevel);
+
+ /* FIXME we should be able to stick with RPM naming scheme
+ * and not following CMake naming scheme?
+ const char* rpmFileName = this->GetOption("RPM_FILE_NAME");
+ const char* rpmDirectory = this->GetOption("RPM_DIRECTORY");
+ this->SetOption("CPACK_OUTPUT_FILE_NAME",rpmFileName);
+ std::string rpmFilePath;
+ rpmFilePath += rpmDirectory;
+ rpmFilePath += "/";
+ rpmFilePath += rpmFileName;
+ this->SetOption("CPACK_TEMPORARY_PACKAGE_FILE_NAME",rpmFilePath.c_str());
+ */
+ // this->SetOption("CPACK_OUTPUT_FILE_PATH",rpmFilePath);
+
+ //FIXME I think we should split CPackRPM.cmake into (at least)
+ // 2 differents files
return 1;
}
diff --git a/Source/CPack/cmCPackRPMGenerator.h b/Source/CPack/cmCPackRPMGenerator.h
index 17c93f4..c3b7a07 100644
--- a/Source/CPack/cmCPackRPMGenerator.h
+++ b/Source/CPack/cmCPackRPMGenerator.h
@@ -23,7 +23,11 @@
/** \class cmCPackRPMGenerator
* \brief A generator for RPM packages
- *
+ * The idea of the CPack RPM generator is to use
+ * as minimal C++ code as possible.
+ * Ideally the C++ part of the CPack RPM generator
+ * will only 'execute' (aka ->ReadListFile) several
+ * CMake macros files.
*/
class cmCPackRPMGenerator : public cmCPackGenericGenerator
{