MantisBT - CMake
View Issue Details
0010935CMakeCPackpublic2010-07-04 11:072010-12-14 18:50
Eric NOULARD 
Eric NOULARD 
normalfeaturealways
closedfixed 
CMake-2-8 
CMake-2-8 
0010935: Lack of support for relocatable package
I would like to add an other missing feature:
 * Lack of support for relocatable package

To make a relocatable package, you have to add a tag "Prefix: " whose the value is generally the CMake prefix.


If I mimic the Buildarch tag, it would be something like that

# CPACK_RPM_PACKAGE_PREFIX (optional)
IF(CPACK_RPM_PACKAGE_PREFIX)
  SET(TMP_RPM_PREFIX "Prefix: ${CPACK_RPM_PACKAGE_PREFIX}")
  IF(CPACK_RPM_PACKAGE_DEBUG)
    MESSAGE("CPackRPM:Debug: using user-specified prefix (for relocatable package) = ${CPACK_RPM_PACKAGE_PREFIX}")
  ENDIF(CPACK_RPM_PACKAGE_DEBUG)
ELSE(CPACK_RPM_PACKAGE_PREFIX)
  SET(TMP_RPM_BUILDARCH "")
ENDIF(CPACK_RPM_PACKAGE_PREFIX)


and adding \@TMP_RPM_PREFIX\@ after \@TMP_RPM_BUILDARCH\@ in the specfile template.

It's not tested but it's very similar to Buildarch tag.

For more specific information, see Maximum RPM (http://www.rpm.org/max-rpm/ch-rpm-reloc.html [^] [^] ).


Please, tell me if I must create a new issue but it's very similar to this one. Thanks.
No tags attached.
parent of 0007000closed Eric NOULARD CPack RPM generator should always "CPACK_SET_DESTDIR" 
related to 0010701closed Eric NOULARD Lack of "%doc, %config, Obsolete" in CPackRPM 
Issue History
2010-07-04 11:07Eric NOULARDNew Issue
2010-07-04 11:08Eric NOULARDRelationship addedrelated to 0010701
2010-07-04 11:09Eric NOULARDStatusnew => assigned
2010-07-04 11:09Eric NOULARDAssigned To => Eric NOULARD
2010-07-04 11:29Eric NOULARDNote Added: 0021232
2010-07-04 11:30Eric NOULARDRelationship addedparent of 0007000
2010-07-09 14:06Eric NOULARDNote Added: 0021338
2010-07-09 14:07Eric NOULARDNote Added: 0021339
2010-07-09 14:07Eric NOULARDStatusassigned => resolved
2010-07-09 14:07Eric NOULARDFixed in Version => CMake-2-8
2010-07-09 14:07Eric NOULARDResolutionopen => fixed
2010-12-14 18:50David ColeNote Added: 0024103
2010-12-14 18:50David ColeStatusresolved => closed

Notes
(0021232)
Eric NOULARD   
2010-07-04 11:29   
The line to add is easy.
Prefix: \@CPACK_PACKAGING_INSTALL_PREFIX\@


However it may be added iff there is no absolute path file installed
or the packaging will break.
(0021338)
Eric NOULARD   
2010-07-09 14:06   
This has been pushed to next.

To git@cmake.org:cmake.git
   35ab6ee..c8c3211 next -> next

Note we are still depending on bug 7000 in order to support relocatable
package with file installed using absolute path
(provided those are %config... but this is another story)
(0021339)
Eric NOULARD   
2010-07-09 14:07   
commit c8c32115c92be0f84a070c7e9cae99b78a0e20cf
Merge: 35ab6ee 604c369
Author: Eric NOULARD <eric.noulard@gmail.com>
Date: Fri Jul 9 20:04:38 2010 +0200

    Merge branch 'CPackRPM-RelocatablePackage' into next

commit 604c3698c1ba517b83b4e6142bf95f9562fed921
Author: Eric NOULARD <eric.noulard@gmail.com>
Date: Fri Jul 9 20:01:57 2010 +0200

    CPackRPM:: [partially] support relocatable package
    
    The support is partial because it cannot be used if
       CPACK_SET_DESTDIR is set
       some file are installed using absolute path
(0024103)
David Cole   
2010-12-14 18:50   
Closing bugs that have been resolved for more than 3 months without any further updates.