如何使用CPACK构建.spec文件中定义的子包 [英] How to build subpackages defined in .spec files using CPACK
问题描述
在规范文件更改后,按照本教程进行操作对于子包,我能够通过一个构建来创建两个RPM,并执行以下操作:
Following this tutorial on Spec File Changes For Subpackages I was able to create two RPMs with a single build doing the following:
我的规格文件如下:
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
键入rpmbuild -ba filename.spec
,它将创建两个RPM(一个用于主软件包,一个用于子软件包 utils ).如何使用include(CPACK)
然后键入make package
来实现相同的目的?
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
?
推荐答案
看看CMake CPack
变量.
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.
这篇关于如何使用CPACK构建.spec文件中定义的子包的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!