[cmake-developers] [CMake 0015486]: CPackRPM - Move Component handling into .spec file

Mantis Bug Tracker mantis at public.kitware.com
Tue Mar 31 13:28:52 EDT 2015


The following issue has been SUBMITTED. 
====================================================================== 
http://www.cmake.org/Bug/view.php?id=15486 
====================================================================== 
Reported By:                Curtis Mahieu
Assigned To:                
====================================================================== 
Project:                    CMake
Issue ID:                   15486
Category:                   CPack
Reproducibility:            have not tried
Severity:                   feature
Priority:                   normal
Status:                     new
====================================================================== 
Date Submitted:             2015-03-31 13:28 EDT
Last Modified:              2015-03-31 13:28 EDT
====================================================================== 
Summary:                    CPackRPM - Move Component handling into .spec file
Description: 
I think it would make sense to move the Component logic into the spec file
itself and let rpmbuild take care of the naming. 

if there was only one spec file generated for the entire build when Compnonents
are enabled
 then the spec could look like this:

BuildRoot:     
@CPACK_RPM_DIRECTORY@/@CPACK_PACKAGE_FILE_NAME@@CPACK_RPM_PACKAGE_COMPONENT_PART_PATH@
Summary:        @CPACK_RPM_PACKAGE_SUMMARY@
Name:           @CPACK_RPM_PACKAGE_NAME@@CPACK_RPM_PACKAGE_COMPONENT_PART_NAME@
Version:        @CPACK_RPM_PACKAGE_VERSION@
Release:        @CPACK_RPM_PACKAGE_RELEASE@
License:        @CPACK_RPM_PACKAGE_LICENSE@
Group:          @CPACK_RPM_PACKAGE_GROUP@
Vendor:         @CPACK_RPM_PACKAGE_VENDOR@
........

%description
@CPACK_RPM_PACKAGE_DESCRIPTION@
......
%package <COMPONENT1>
Summary: <COMPONENT1_SUMMARY>
Group: <COMPONENT1_GROUP>


%files
%defattr(-,root,root,-)
@CPACK_RPM_INSTALL_FILES@

%files <COMPONENT1>
%defattr(-, root, root, -)
<COMPONENT1_INSTALL_FILES>

....


Then if the logic to specify file names could be set by a user adding a "%define
_rpmfilename".  Gathering all the final files could wait for all the RPM's to be
generated and then scan the output folder and add them all to the final files
list in the c++ code replacing this:
// add the generated package to package file names list
packageFileNames.push_back(packageFileName);



====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2015-03-31 13:28 Curtis Mahieu  New Issue                                    
======================================================================



More information about the cmake-developers mailing list