Dieser Inhalt ist in der von Ihnen ausgewählten Sprache nicht verfügbar.
4.4. Extending the rh-perl524 Software Collection
This section describes extending the rh-perl524 Software Collection by building your own dependent Software Collection.
Important
Examples described in this section only work as expected when extending the rh-perl524 Software Collection with packages that:
- do not provide any Perl modules, and
- only depend on Perl modules provided by the rh-perl524 Software Collection.
4.4.1. The h2m144 Software Collection Link kopierenLink in die Zwischenablage kopiert!
Link kopierenLink in die Zwischenablage kopiert!
This section contains a commented example of a dependent Software Collection's metapackage. The dependent Software Collection is named h2m144 and contains the help2man Perl package version 1.44.1. The h2m144 Software Collection depends on the rh-perl524 Software Collection.
Note the following in the h2m144 Software Collection metapackage:
- The h2m144 Software Collection metapackage has the following build dependency set:
BuildRequires: %{scl_prefix_perl}scldevel
BuildRequires: %{scl_prefix_perl}scldevel
Copy to Clipboard Copied! Toggle word wrap Toggle overflow This expands to rh-perl524-scldevel.The rh-perl524-scldevel subpackage contains two important macros,%scl_perl
and%scl_prefix_perl
, and also provides Perl dependency generators. Note that the macros are defined at the top of the metapackage spec file. Although the definitions are not required, they provide a visual hint that the h2m144 Software Collection has been designed to be built on top of the rh-perl524 Software Collection. They also serve as a fallback value. - The h2m144-build subpackage has the following dependency set:
Requires: %{scl_prefix_perl}scldevel
Requires: %{scl_prefix_perl}scldevel
Copy to Clipboard Copied! Toggle word wrap Toggle overflow This expands to rh-perl524-scldevel. The purpose of this dependency is to ensure that the macros and dependency generators are always present when building packages for the h2m144 Software Collection. - The
enable
scriptlet for the h2m144 Software Collection contains the following line:. scl_source enable %{scl_perl}
. scl_source enable %{scl_perl}
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Note the dot at the beginning of the line. This line makes the Perl Software Collection start implicitly when the h2m144 Software Collection is started so that the user can only typescl enable h2m144 command
instead ofscl enable rh-perl524 h2m144 command
to run command in the Software Collection environment. - The macro file
macros.h2m144-config
calls the Perl dependency generators, and certain Perl-specific macros used in other packages' spec files.
4.4.2. The help2man Package Link kopierenLink in die Zwischenablage kopiert!
Link kopierenLink in die Zwischenablage kopiert!
Below is a commented example of the help2man package spec file. Note the following in the spec file:
- The
BuildRequires
tags are prefixed with%{?scl_prefix_perl}
instead of%{scl_prefix}
.
4.4.3. Building the h2m144 Software Collection Link kopierenLink in die Zwischenablage kopiert!
Link kopierenLink in die Zwischenablage kopiert!
To build the h2m144 Software Collection:
- Install the rh-perl524-scldevel and rh-perl524-perl-macros packages that are part of the perl524 Software Collection.
- Build h2m144.spec and install the h2m144-runtime and h2m144-build packages.
- Install the rh-perl524-perl, rh-perl524-perl-Text-ParseWords and rh-perl524-perl-Getopt-Long packages, which are all build requirements for help2man.
- Build
help2man.spec
.
4.4.4. Testing the h2m144 Software Collection Link kopierenLink in die Zwischenablage kopiert!
Link kopierenLink in die Zwischenablage kopiert!
To test the h2m144 Software Collection:
- Install the h2m144-help2man package.
- Run the following command:
scl enable h2m144 'help2man bash'
$ scl enable h2m144 'help2man bash'
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Verify that the output is similar to the following lines:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow