cmCPackRPMGenerator.cxx 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. /*============================================================================
  2. CMake - Cross Platform Makefile Generator
  3. Copyright 2000-2009 Kitware, Inc., Insight Software Consortium
  4. Distributed under the OSI-approved BSD License (the "License");
  5. see accompanying file Copyright.txt for details.
  6. This software is distributed WITHOUT ANY WARRANTY; without even the
  7. implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  8. See the License for more information.
  9. ============================================================================*/
  10. #include "cmCPackRPMGenerator.h"
  11. #include "cmCPackLog.h"
  12. //----------------------------------------------------------------------
  13. cmCPackRPMGenerator::cmCPackRPMGenerator()
  14. {
  15. }
  16. //----------------------------------------------------------------------
  17. cmCPackRPMGenerator::~cmCPackRPMGenerator()
  18. {
  19. }
  20. //----------------------------------------------------------------------
  21. int cmCPackRPMGenerator::InitializeInternal()
  22. {
  23. this->SetOptionIfNotSet("CPACK_PACKAGING_INSTALL_PREFIX", "/usr");
  24. return this->Superclass::InitializeInternal();
  25. }
  26. //----------------------------------------------------------------------
  27. int cmCPackRPMGenerator::CompressFiles(const char* /*outFileName*/,
  28. const char* /*toplevel*/,
  29. const std::vector<std::string>& /*files*/)
  30. {
  31. this->ReadListFile("CPackRPM.cmake");
  32. if (!this->IsSet("RPMBUILD_EXECUTABLE"))
  33. {
  34. cmCPackLogger(cmCPackLog::LOG_ERROR, "Cannot find rpmbuild" << std::endl);
  35. return 0;
  36. }
  37. return 1;
  38. }