MantisBT - CMake
View Issue Details
0015486CMakeCPackpublic2015-03-31 13:282016-06-10 14:31
Curtis Mahieu 
Domen Vrankar 
normalfeaturehave not tried
closedmoved 
Apple MacOS X10.4.10
CMake 3.2.1 
 
0015486: CPackRPM - Move Component handling into .spec file
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);


No tags attached.
Issue History
2015-03-31 13:28Curtis MahieuNew Issue
2015-03-31 13:31Brad KingAssigned To => Domen Vrankar
2015-03-31 13:31Brad KingStatusnew => assigned
2016-06-10 14:29Kitware RobotNote Added: 0042747
2016-06-10 14:29Kitware RobotStatusassigned => resolved
2016-06-10 14:29Kitware RobotResolutionopen => moved
2016-06-10 14:31Kitware RobotStatusresolved => closed

Notes
(0042747)
Kitware Robot   
2016-06-10 14:29   
Resolving issue as `moved`.

This issue tracker is no longer used. Further discussion of this issue may take place in the current CMake Issues page linked in the banner at the top of this page.