How to build subpackages defined in .spec files using CPACK

旧城冷巷雨未停 提交于 2019-12-23 22:15:56

问题


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?


回答1:


Take a look at the CMake CPackRPM module. It looks like all you need to do is specify your spec file through a variable. You will still need to set appropriate CPack variables.



来源:https://stackoverflow.com/questions/46727419/how-to-build-subpackages-defined-in-spec-files-using-cpack

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!