Ce contenu n'est pas disponible dans la langue sélectionnée.
2.7.2. Creating a Metapackage
When creating a new metapackage:
- It is recommended to define the following macros at the top of the metapackage spec file:
scl_name_prefixthat specifies the provider's name to be used as a prefix in your Software Collection's name, for example, myorganization-. This is different from_scl_prefix, which specifies the root of your Software Collection but also uses the provider's name. See Section 2.4, “The Software Collection Prefix” for more information.scl_name_basethat specifies the base name of your Software Collection, for example, ruby.scl_name_versionthat specifies the version of your Software Collection, for example, 193.
- You are advised to define a Software Collection macro
nfsmountablethat changes the location of configuration and state files and makes your Software Collection usable over NFS. For more information, see Section 3.1, “Using Software Collections over NFS”. - Consider specifying all packages in your Software Collection that are essential for the Software Collection run time as dependencies of the metapackage. That way you can ensure that the packages are installed with the Software Collection metapackage.
- You are advised to add
Requires: scl-utils-buildto the build subpackage. - You are not required to use conditionals for Software Collection-specific macros in the metapackage.
- Include any path redefinition that the packages in your Software Collection may require in the
enablescriptlet.For information on commonly used path redefinitions, see Section 2.9, “Commonly Used Path Redefinitions”. - Always make sure that the metapackage contains the
%setupmacro in the%prepsection, otherwise building the Software Collection will fail. If you do not need to use a particular option with the%setupmacro, add the%setup -c -Tcommand to the%prepsection.This is because the%setupmacro defines and creates the%buildsubdirdirectory, which is normally used for storing temporary files at build time. If you do not define%setupin your Software Collection packages, files in the%buildsubdirdirectory will be overwritten, causing the build to fail. - Add any macros you need to use to the
macros.%{scl}-configfile in the build subpackage.
Example of the Metapackage
To get an idea of what a typical metapackage for a Software Collection named myorganization-ruby193 looks like, see the following example: