[CMake] [CPACK] debian package + CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA patch
Mathieu Malaterre
mathieu.malaterre at gmail.com
Wed Apr 2 03:05:52 EDT 2008
Thanks ! I tried grepping the src, but could never find this
cmSystemTools::ExpandListArgument func.
Anyway this is working like a charm (extra shell script are there):
$ dpkg --info GDCMREADAHEAD-1.0.0-Linux-x86_64.deb
new debian package, version 2.0.
size 7452 bytes: control archive= 782 bytes.
26 bytes, 1 lines conffiles
206 bytes, 8 lines control
116 bytes, 2 lines md5sums
371 bytes, 21 lines * postinst #!/bin/sh
126 bytes, 8 lines * postrm #!/bin/sh
399 bytes, 24 lines * prerm #!/bin/sh
Package: gdcmreadahead
Version: 1.0.0
Section: devel
Priority: optional
Architecture: amd64
Maintainer: gdcm-developers at lists.sourceforge.net
Description: GDCMREADAHEAD - Grass Root DICOM READAHEAD daemon
thanks
-Mathieu
On Tue, Apr 1, 2008 at 11:55 PM, Bill Hoffman <bill.hoffman at kitware.com> wrote:
> Mathieu Malaterre wrote:
> I checked in a version of your fix, but changed it to use
> ExpandListArguement. Can you please test?
>
>
>
> Index: cmCPackDebGenerator.cxx
> ===================================================================
> RCS file: /cvsroot/CMake/CMake/Source/CPack/cmCPackDebGenerator.cxx,v
> retrieving revision 1.21
> diff -r1.21 cmCPackDebGenerator.cxx
> 202a203,226
> > 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;
> > }
> > }
> > }
>
> hoffman at CORRIN ~/My Builds/CMake/Source/CPack
> $ cvs commit -m "ENH: add CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA variable" -l
> cvs commit: Examining .
> /cvsroot/CMake/CMake/Source/CPack/cmCPackDebGenerator.cxx,v <--
> cmCPackDebGenerator.cxx
> new revision: 1.22; previous revision: 1.21
>
>
--
Mathieu
More information about the CMake
mailing list