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
This commit is contained in:
Alexander Neundorf
2007-08-17 09:13:15 -04:00
parent 038f3e240c
commit 45da4d2f80
3 changed files with 210 additions and 6 deletions
+20 -5
View File
@@ -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;
}
+5 -1
View File
@@ -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
{