[CMake] CPACK_PACKAGE_DESCRIPTION_FILE for debian

Eric Noulard eric.noulard at gmail.com
Tue Nov 1 06:47:50 EDT 2011


2011/11/1 Erik Hofman <erik at ehofman.com>:
>
> Hi,
>
> I'm new to this list and just recently started to use CMake and CPack.
> So far I'm very pleased but there's one thing that I think could use
> some improvement;
>
> As far as I van see (from Wiki) the RPM generating backend of CPack use

You can get up to date doc with

cmake --help-module CPackRPM
same for
cmake --help-module CPackDeb

> CPACK_PACKAGE_DESCRIPTION_FILE if CPACK_RPM_PACKAGE_DESCRIPTION is not
> provided, but the Debian backend does not use
> PACK_PACKAGE_DESCRIPTION_FILE in any way although adding it is just a
> three line patch:
>
>  file(STRINGS description descriptionFile)
>  STRING(REGEX REPLACE ";" " " descriptionFile "${descriptionFile}")
>  SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY ${descriptionFile})

You could even do this is a single line:

file(READ ${CPACK_PACKAGE_DESCRIPTION_FILE} CPACK_PACKAGE_DESCRIPTION_SUMMARY)

Your point is good,
Could you open a bug report,
http://public.kitware.com/Bug/bug_report_page.php

then attach your proposed patch (probably from withing CPackDeb.cmake)

I'll review it and probably merge it soon, since this looks reasonable.
Note however that with CPackRPM you have both

CPACK_RPM_PACKAGE_SUMMARY
and
CPACK_RPM_PACKAGE_DESCRIPTION

whereas for DEB you don't have summary, just:
CPACK_DEBIAN_PACKAGE_DESCRIPTION

thus the difference

> It would be nice if this is the default behavior for all backends.

We would have to review other CPack generators behavior w.r.t.
CPACK_PACKAGE_DESCRIPTION_SUMMARY
CPACK_PACKAGE_DESCRIPTION_FILE

as you can see with RPM and Deb some may use both for the same meaning
some really wants separate usage.

Waiting for your patch :-]
-- 
Erk
Membre de l'April - « promouvoir et défendre le logiciel libre » -
http://www.april.org


More information about the CMake mailing list