[Cmake-commits] [cmake-commits] hoffman committed cmCPackDebGenerator.cxx 1.21 1.22

cmake-commits at cmake.org cmake-commits at cmake.org
Tue Apr 1 17:51:12 EDT 2008


Update of /cvsroot/CMake/CMake/Source/CPack
In directory public:/mounts/ram/cvs-serv28279

Modified Files:
	cmCPackDebGenerator.cxx 
Log Message:
ENH: add CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA variable


Index: cmCPackDebGenerator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/CPack/cmCPackDebGenerator.cxx,v
retrieving revision 1.21
retrieving revision 1.22
diff -C 2 -d -r1.21 -r1.22
*** cmCPackDebGenerator.cxx	29 Mar 2008 00:23:01 -0000	1.21
--- cmCPackDebGenerator.cxx	1 Apr 2008 21:51:10 -0000	1.22
***************
*** 201,204 ****
--- 201,228 ----
    cmd += cmakeExecutable;
    cmd += "\" -E tar cfz control.tar.gz ./control ./md5sums";
+   const char* controlExtra = 
+     this->GetOption("CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA");
+   if( controlExtra )
+     { 
+     std::vector<std::string> controlExtraList;
+     cmSystemTools::ExpandListArgument(controlExtra, controlExtraList);
+     for(std::vector<std::string>::iterator i = 
+           controlExtraList.begin(); i != controlExtraList.end(); ++i)
+       {
+       std::string filenamename = 
+         cmsys::SystemTools::GetFilenameName(i->c_str());
+       std::string localcopy = toplevel;
+       localcopy += "/";
+       localcopy += filenamename;
+       // if we can copy the file, it means it does exist, let's add it:
+       if( cmsys::SystemTools::CopyFileIfDifferent(
+             i->c_str(), localcopy.c_str()) )
+         {
+         // debian is picky and need relative to ./ path in the tar.gz
+         cmd += " ./";
+         cmd += filenamename;
+         }
+       }
+     }
    res = cmSystemTools::RunSingleCommand(cmd.c_str(), &output,
      &retVal, toplevel, this->GeneratorVerbose, 0);



More information about the Cmake-commits mailing list