View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0008988CMakeCPackpublic2009-05-08 11:432009-11-22 13:32
ReporterEric NOULARD 
Assigned ToEric NOULARD 
PlatformOSOS Version
Product VersionCMake-2-6 
Target VersionFixed in VersionCMake-2-8 
Summary0008988: CPack RPM generator should support post (un)install scripts and/or custom spec file
DescriptionThe RPM spec file enables the developer to specify some
actions (i.e. scripts) to be run:

before installing (%pre)
or after installing (%post).

In the same way before un-installing (%preun)
or after un-installing (%postun)
more informations there: [^]

Some CPack RPM users may want to use thoses features: [^]
TagsNo tags attached.
Attached Files? file icon CPackRPM.cmake [^] (14,709 bytes) 2009-05-08 13:39
patch file icon bug-8988-erk1.patch [^] (9,692 bytes) 2009-05-08 13:39 [Show Content]


Eric NOULARD (developer)
2009-05-08 13:49

The attached patch (against CMake-2-6 branch) add
the requested support.

if the user defines one or several of thoses vars:

with appropriate file names, the content of the specified files
will be embedded in the RPM spec file in the appropriate sections.

Moreover the current patch add custom user spec file.
If the user defines
to a custom made spec file, CPack RPM will use this spec file
instead of using its own generated spec file.
The user provided file will be
CONFIGURE( ... @ONLY) at CPack time.

Since the spec file usable by CPack RPM is a bit special
(because it skips some usual spec file step) one can ask CPackRPM
for a template file using

cd /your/build/dir

then CPack will end with the following "error":
CPack: Compress package
CMake Error at ../../cmake-Verk-2_6/share/cmake-2.6/Modules/CPackRPM.cmake:314 (MESSAGE):
  CPackRPM: STOP here Generated USER binary spec file templare is:

the user may copy the spec file and make appropriate changes before

Note that as usual all this CPACK_RPM_xxx vars may be defined either in
the user CMakeLists.txt or from the cpack command line.
Eric NOULARD (developer)
2009-05-12 10:07

Seems to be working OK for at least one user [^]
Eric NOULARD (developer)
2009-05-12 10:08

More discussion on the topic there [^]
Eric NOULARD (developer)
2009-10-07 15:27

This patch will need an update for CMake-2.8
see related bugs: [^]
Eric NOULARD (developer)
2009-11-11 15:55

Preparing updated patch for CVS HEAD.
Eric NOULARD (developer)
2009-11-11 15:56

Committed to HEAD.

Committer: Eric Noulard <>
/cvsroot/CMake/CMake/Modules/CPackRPM.cmake,v <-- Modules/CPackRPM.cmake
new revision: 1.18; previous revision: 1.17
Eric NOULARD (developer)
2009-11-22 13:32

may be included in 2.8.1

 Issue History
Date Modified Username Field Change
2009-05-08 11:43 Eric NOULARD New Issue
2009-05-08 13:39 Eric NOULARD File Added: CPackRPM.cmake
2009-05-08 13:39 Eric NOULARD File Added: bug-8988-erk1.patch
2009-05-08 13:49 Eric NOULARD Note Added: 0016357
2009-05-12 10:07 Eric NOULARD Note Added: 0016397
2009-05-12 10:08 Eric NOULARD Note Added: 0016398
2009-09-14 14:49 Bill Hoffman Status new => assigned
2009-09-14 14:49 Bill Hoffman Assigned To => Alex Neundorf
2009-09-14 14:49 Bill Hoffman Assigned To Alex Neundorf => Bill Hoffman
2009-10-07 15:27 Eric NOULARD Note Added: 0018018
2009-11-11 15:55 Eric NOULARD Note Added: 0018396
2009-11-11 15:56 Eric NOULARD Note Added: 0018397
2009-11-22 13:32 Eric NOULARD Assigned To Bill Hoffman => Eric NOULARD
2009-11-22 13:32 Eric NOULARD Note Added: 0018537
2009-11-22 13:32 Eric NOULARD Status assigned => closed
2009-11-22 13:32 Eric NOULARD Resolution open => fixed
2009-11-22 13:32 Eric NOULARD Fixed in Version => CMake-2-8

Copyright © 2000 - 2018 MantisBT Team