Each Software Collection's layout consists of the meta package, which installs a subset of other packages, and a number of the Software Collection's packages, which are installed within the Software Collection namespace.
Each Software Collection includes a meta package, which installs a minimal subset of essential packages. For example, the essential packages can provide the Perl language interpreter, but no Perl extension modules. The meta package contains a basic file system hierarchy and delivers a number of the Software Collection's scriptlets.
The purpose of the meta package is to make sure that all essential packages in the Software Collection are properly installed and that it is possible to enable the Software Collection.
The meta package produces the following packages that are also part of the Software Collection:
- The main package: %scl
- The main package in the Software Collection contains dependencies of the base packages, which are included in the Software Collection. The main package does not contain any files.For example, if the name of the Software Collection is
ruby-1.8.7, then the main package macro is expanded to:ruby-1.8.7
- The runtime subpackage:
name-runtime - The runtime subpackage in the Software Collection owns the Software Collection's file system and delivers the Software Collection's scriptlets.For example, if the name of the Software Collection is
ruby-1.8.7, then the runtime subpackage macro is expanded to:ruby-1.8.7-runtime
- The build subpackage:
name-build - The build subpackage in the Software Collection delivers the Software Collection's build configuration. The build subpackage is optional and can be excluded from the Software Collection.For example, if the name of the Software Collection is
ruby-1.8.7, then the build subpackage macro is expanded to:ruby-1.8.7-build
Example of the Meta Package
To get an idea of what a typical Software Collection meta package looks like, see the following example:
%{!?scl:%global scl example} %scl_package %scl Summary: Package that installs %scl Name: %scl_name Version: 1 Release: 1%{?dist} BuildArch: noarch License: GPLv2+ Requires: %{scl_prefix}less BuildRequires: scl-utils-build %description This is the main package for %scl Software Collection. %package runtime Summary: Package that handles %scl Software Collection. Requires: scl-utils %description runtime Package shipping essential scripts to work with %scl Software Collection. %package build Summary: Package shipping basic build configuration %description build Package shipping essential configuration macros to build %scl Software Collection. %prep %setup -c -T %install rm -rf %{buildroot} mkdir -p %{buildroot}%{_scl_scripts}/root cat >> %{buildroot}%{_scl_scripts}/enable << EOF export PATH=%{_bindir}:\$PATH EOF %scl_install %files %files runtime %scl_files %files build %{_root_sysconfdir}/rpm/macros.%{scl}-config %changelog * Thu Jan 07 2012 John Doe <jdoe@example.com> 1-1 - Initial package