Following this tutorial on Spec File Changes For Subpackages I was able to create two RPMs with a single build doing the following:
My spec file is something like:
Name: @CPACK_PACKAGE_NAME@
License: the license
Summary: the summary
Group: Applications
Version: @CPACK_PACKAGE_RELEASE_VERSION@.@CPACK_PACKAGE_MINOR_VERSION@.@CPACK_PACKAGE_SERVICE_PACK@
Release: @CPACK_PACKAGE_BUILD@
%description
the description...
%package utils
Summary: the utils
Group: Applications
%description utils
description for the utils
%files
...
%files utils
different files
Typing rpmbuild -ba filename.spec
it creates two RPMs (one for the main package and one for the subpackage utils). How can I achieve the same using include(CPACK)
, and then typing make package
?