ENH: add installed size to deb package

This commit is contained in:
Bill Hoffman 2008-09-11 10:48:49 -04:00
parent 7d01e62a92
commit 7e5222165d
1 changed files with 11 additions and 0 deletions

View File

@ -116,6 +116,17 @@ int cmCPackDebGenerator::CompressFiles(const char* outFileName,
{
out << "Suggests: " << debian_pkg_sug << "\n";
}
unsigned long totalSize = 0;
{
std::string dirName = this->GetOption("CPACK_TEMPORARY_DIRECTORY");
dirName += '/';
for (std::vector<std::string>::const_iterator fileIt = files.begin();
fileIt != files.end(); ++ fileIt )
{
totalSize += cmSystemTools::FileLength(fileIt->c_str());
}
}
out << "Installed-Size: " << totalSize << "\n";
out << "Maintainer: " << maintainer << "\n";
out << "Description: " << desc << "\n";
out << std::endl;