cmCPackRPMGenerator.h 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. /*============================================================================
  2. CMake - Cross Platform Makefile Generator
  3. Copyright 2000-2009 Kitware, Inc.
  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. #ifndef cmCPackRPMGenerator_h
  11. #define cmCPackRPMGenerator_h
  12. #include "cmCPackGenerator.h"
  13. /** \class cmCPackRPMGenerator
  14. * \brief A generator for RPM packages
  15. * The idea of the CPack RPM generator is to use
  16. * as minimal C++ code as possible.
  17. * Ideally the C++ part of the CPack RPM generator
  18. * will only 'execute' (aka ->ReadListFile) several
  19. * CMake macros files.
  20. */
  21. class cmCPackRPMGenerator : public cmCPackGenerator
  22. {
  23. public:
  24. cmCPackTypeMacro(cmCPackRPMGenerator, cmCPackGenerator);
  25. /**
  26. * Construct generator
  27. */
  28. cmCPackRPMGenerator();
  29. virtual ~cmCPackRPMGenerator();
  30. protected:
  31. virtual int InitializeInternal();
  32. virtual int PackageFiles();
  33. /**
  34. * This method factors out the work done in component packaging case.
  35. */
  36. int PackageOnePack(std::string initialToplevel, std::string packageName);
  37. /**
  38. * The method used to package files when component
  39. * install is used. This will create one
  40. * archive for each component group.
  41. */
  42. int PackageComponents(bool ignoreGroup);
  43. /**
  44. * Special case of component install where all
  45. * components will be put in a single installer.
  46. */
  47. int PackageComponentsAllInOne();
  48. virtual const char* GetOutputExtension() { return ".rpm"; }
  49. virtual bool SupportsComponentInstallation() const;
  50. virtual std::string GetComponentInstallDirNameSuffix(
  51. const std::string& componentName);
  52. };
  53. #endif