Resync.
[CMakeLuaTailorHgBridge.git] / CMakeLua / Source / CPack / cmCPackRPMGenerator.cxx
blobffd568b045f70a24de59deb3700e9ad8f4bc7272
1 /*=========================================================================
3 Program: CMake - Cross-Platform Makefile Generator
4 Module: $RCSfile: cmCPackRPMGenerator.cxx,v $
5 Language: C++
6 Date: $Date: 2007/10/31 12:50:17 $
7 Version: $Revision: 1.6 $
9 Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved.
10 See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.
12 This software is distributed WITHOUT ANY WARRANTY; without even
13 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
14 PURPOSE. See the above copyright notices for more information.
16 =========================================================================*/
17 #include "cmCPackRPMGenerator.h"
18 #include "cmCPackLog.h"
20 //----------------------------------------------------------------------
21 cmCPackRPMGenerator::cmCPackRPMGenerator()
25 //----------------------------------------------------------------------
26 cmCPackRPMGenerator::~cmCPackRPMGenerator()
30 //----------------------------------------------------------------------
31 int cmCPackRPMGenerator::InitializeInternal()
33 this->SetOptionIfNotSet("CPACK_PACKAGING_INSTALL_PREFIX", "/usr");
35 return this->Superclass::InitializeInternal();
38 //----------------------------------------------------------------------
39 int cmCPackRPMGenerator::CompressFiles(const char* /*outFileName*/,
40 const char* /*toplevel*/,
41 const std::vector<std::string>& /*files*/)
43 this->ReadListFile("CPackRPM.cmake");
44 if (!this->IsSet("RPMBUILD_EXECUTABLE"))
46 cmCPackLogger(cmCPackLog::LOG_ERROR, "Cannot find rpmbuild" << std::endl);
47 return 0;
49 return 1;