2.2. Software Collection Macros

The Software Collection packaging macro scl relocates the file structure, which is part of the Software Collection, to a file system that is used exclusively by the Software Collection.
The scl macro also defines files ownership for the Software Collection's meta package and provides additional packaging macros to use in the Software Collection environment.
When using Software Collection macros in the spec file, you must prefix them with %{?scl:macro}, as in the following example:
%{?scl:Requires:%scl_runtime}
In the example above, the %scl_runtime macro is the value of the Requires tag. Both the macro and the tag use the %{?scl: prefix.

2.2.1. Macros Specific to a Software Collection

The table below shows a list of all macros specific to a particular Software Collection.

Table 2.1. Software Collection Specific Macros

Macro
Description
Example value
%scl_name
name of the Software Collection
software_collection_1
%pkg_name
name of the original package
perl
%_scl_prefix
root of the Software Collection (not package's root)
/opt/provider/
%_scl_scripts
location of Software Collection's scriptlets
/opt/provider/software_collection_1/
%_scl_root
installation root (install-root) of the package
/opt/provider/software_collection_1/root/
%_scl_require_package
depend on a particular package from the Software Collection
software_collection_1-package_2