cmCPackRPMGenerator.cxx 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. /*=========================================================================
  2. Program: CMake - Cross-Platform Makefile Generator
  3. Module: $RCSfile$
  4. Language: C++
  5. Date: $Date$
  6. Version: $Revision$
  7. Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved.
  8. See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.
  9. This software is distributed WITHOUT ANY WARRANTY; without even
  10. the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
  11. PURPOSE. See the above copyright notices for more information.
  12. =========================================================================*/
  13. #include "cmCPackRPMGenerator.h"
  14. #include "cmCPackLog.h"
  15. //----------------------------------------------------------------------
  16. cmCPackRPMGenerator::cmCPackRPMGenerator()
  17. {
  18. }
  19. //----------------------------------------------------------------------
  20. cmCPackRPMGenerator::~cmCPackRPMGenerator()
  21. {
  22. }
  23. //----------------------------------------------------------------------
  24. int cmCPackRPMGenerator::InitializeInternal()
  25. {
  26. this->SetOptionIfNotSet("CPACK_PACKAGING_INSTALL_PREFIX", "/usr");
  27. return this->Superclass::InitializeInternal();
  28. }
  29. //----------------------------------------------------------------------
  30. int cmCPackRPMGenerator::CompressFiles(const char* /*outFileName*/,
  31. const char* /*toplevel*/,
  32. const std::vector<std::string>& /*files*/)
  33. {
  34. this->ReadListFile("CPackRPM.cmake");
  35. if (!this->IsSet("RPMBUILD_EXECUTABLE"))
  36. {
  37. cmCPackLogger(cmCPackLog::LOG_ERROR, "Cannot find rpmbuild" << std::endl);
  38. return 0;
  39. }
  40. return 1;
  41. }