[CMake] CMake & RPM problems

Eric Noulard eric.noulard at gmail.com
Thu May 7 16:10:19 EDT 2009


2009/5/7 Florent Lagaye <florent.lagaye at inrialpes.fr>:

Florent,

Try not to drop CMake ML when answering.

>> Eric Noulard a écrit :
>> Could you explain us (or point the appropriate documentation)
>> on how the "freedesktop file" should work?
>
>
> Freedesktop is The standard used by gnome and kde to specify "desktop
> entries" which in fact are application launchers. That's why when you
> install a KDE app, the menu entry is also present in gnome menus.
>
> http://standards.freedesktop.org/desktop-entry-spec/latest/index.html

OK I'll read this.


>>     - How can I tell CPack to put instruction to create and associate new
>> mime-types ?
>
> For mime-types and icons I got a little further.
>
> The icon is in <data_dir>/share/icons/hicolor/scalable/apps/v4d.svg
>
> I built an xml file according to :
> http://standards.freedesktop.org/shared-mime-info-spec/shared-mime-info-spec-latest.html
> The file is in <data_dir>/share/mime/packages/viewer4d.mime.xml
>
> Now I should add in the RPM SPEC file the three commands needed to update
> the desktop database (update-desktop-database as root), the mime
> (update-mime-database) database and the icon database
> (gtk-update-icon-cache) in the %post and %postun sections.
>
> Would CPack allow to use a template SPEC file, which it would fill (much
> more like UseRpmTools), instead of creating a plain new one from scratch
> each time ?

CPackRPM should be able to work with a custom spec file,

SET(CPACK_RPM_USER_BINARY_SPECFILE   your_custom.spec)
The specified file will be
CONFIGURE_FILE( ... @ONLY)
the current state of the feature is "not tested", thus most probably
not working :-)

I should have time tomorrow for working on this, what I'll most
probably be doing
is to offer two ways to do this:

1) Add more CPACK_RPM_XXX specific var such like:
     CPACK_RPM_POST_INSTALL_SCRIPT_FILE
     CPACK_RPM_POST_UNINSTALL_SCRIPT_FILE

     which may be used to specify the corresponding scripts
     that will be embedded in the generated spec file.

2) Effectively support the custom spec file usage.

I'd like to support both because it's not that intuitive to write a
proper spec file
which works with CPack because it's a kind of "short-cutted" one.
Have a look of the spec file currently generated and you'll see.
(no %prep, %build nor %install sections).


-- 
Erk


More information about the CMake mailing list