summaryrefslogtreecommitdiffstats
path: root/Source/CPack/cmCPackRPMGenerator.cxx
diff options
context:
space:
mode:
authorAlexander Neundorf <neundorf@kde.org>2007-08-17 13:13:15 (GMT)
committerAlexander Neundorf <neundorf@kde.org>2007-08-17 13:13:15 (GMT)
commit45da4d2f80bd7ea647b99b7f7e849acbeaec3e3a (patch)
tree000f167ab456cf58a34daee38d5feb8c82b40743 /Source/CPack/cmCPackRPMGenerator.cxx
parent038f3e240c5bb75fd96533b308020772ab0a991f (diff)
downloadCMake-45da4d2f80bd7ea647b99b7f7e849acbeaec3e3a.zip
CMake-45da4d2f80bd7ea647b99b7f7e849acbeaec3e3a.tar.gz
CMake-45da4d2f80bd7ea647b99b7f7e849acbeaec3e3a.tar.bz2
ENH: patch from Eric Noulard for an RPM package generator
It seems rpmbuild can't handle paths with spaces, it complains that Buildroot takes only one tag (or something like this), quoting and escaping don't seem to help. Alex
Diffstat (limited to 'Source/CPack/cmCPackRPMGenerator.cxx')
-rw-r--r--Source/CPack/cmCPackRPMGenerator.cxx25
1 files changed, 20 insertions, 5 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;
}