이 콘텐츠는 선택한 언어로 제공되지 않습니다.

Chapter 4. Extending Red Hat Software Collections


This chapter describes extending Software Collections that are part of the Red Hat Software Collections offering.

4.1. Providing an scldevel Subpackage

The purpose of an scldevel subpackage is to make the process of creating dependent Software Collections easier by providing a number of generic macro files. Packagers then use these macro files when they are extending existing Software Collections. scldevel is provided as a subpackage of your Software Collection's metapackage.
The following section describes creating an scldevel subpackage for Ruby-based Software Collections, ruby193 and ruby200.

Procedure 4.1. Providing your own scldevel subpackage

  1. In your Software Collection's metapackage, add the scldevel subpackage by defining its name, summary, and description:
    %package scldevel
    Summary: Package shipping development files for %scl
    Provides: scldevel(%{scl_name_base})
    
    %description scldevel
    Package shipping development files, especially useful for development of
    packages depending on %scl Software Collection.
    Copy to Clipboard Toggle word wrap
    You are advised to use the virtual Provides: scldevel(%{scl_name_base}) during the build of packages of dependent Software Collections. This will ensure availability of a version of the %{scl_name_base} Software Collection and its macros, as specified in the following step.
  2. In the %install section of your Software Collection's metapackage, create the macros.%{scl_name_base}-scldevel file that is part of the scldevel subpackage and contains:
    cat >> %{buildroot}%{_root_sysconfdir}/rpm/macros.%{scl_name_base}-scldevel << EOF
    %%scl_%{scl_name_base} %{scl}
    %%scl_prefix_%{scl_name_base} %{scl_prefix}
    EOF
    Copy to Clipboard Toggle word wrap
    Note that between all Software Collections that share the same %{scl_name_base} name, the provided macros.%{scl_name_base}-scldevel files must conflict. This is to disallow installing multiple versions of the %{scl_name_base} Software Collections. For example, in Red Hat Software Collections, the ruby193-scldevel subpackage cannot be installed when there is the ruby200-scldevel subpackage installed.

4.1.1. Using an scldevel Subpackage in a Dependent Software Collection

To use your scldevel subpackage in a Software Collection that depends on a Software Collection ruby200, update the metapackage of the dependent Software Collection as described below.

Procedure 4.2. Using your own scldevel subpackage in a dependent Software Collection

  1. Consider adding the following at the beginning of the metapackage's spec file:
    %{!?scl_ruby:%global scl_ruby ruby200}
    %{!?scl_prefix_ruby:%global scl_prefix_ruby %{scl_ruby}-}
    Copy to Clipboard Toggle word wrap
    These two lines are optional. They are only meant as a visual hint that the dependent Software Collection has been designed to depend on the ruby200 Software Collection. If there is no other scldevel subpackage available in the build root, then the ruby200-scldevel subpackage is used as a build requirement.
    You can substitute these lines with the following line:
    %{?scl_prefix_ruby}
    Copy to Clipboard Toggle word wrap
  2. Add the following build requirement to the metapackage:
    BuildRequires: %{scl_prefix_ruby}scldevel
    Copy to Clipboard Toggle word wrap
    By specifying this build requirement, you ensure that the scldevel subpackage is in the build root and that the default values are not in use. Omitting this package could result in broken requires at the subsequent packages' build time.
  3. Ensure that the %package runtime part of the metapackage's spec file includes the following lines:
    %package runtime
    Summary: Package that handles %scl Software Collection.
    Requires: scl-utils
    Requires: %{scl_prefix_ruby}runtime
    Copy to Clipboard Toggle word wrap
  4. Ensure that the %package build part of the metapackage's spec file includes the following lines:
    %package build
    Summary: Package shipping basic build configuration
    Requires: %{scl_prefix_ruby}scldevel
    Copy to Clipboard Toggle word wrap
    Specifying Requires: %{scl_prefix_ruby}scldevel ensures that macros are available in all packages of the Software Collection.
맨 위로 이동
Red Hat logoGithubredditYoutubeTwitter

자세한 정보

평가판, 구매 및 판매

커뮤니티

Red Hat 문서 정보

Red Hat을 사용하는 고객은 신뢰할 수 있는 콘텐츠가 포함된 제품과 서비스를 통해 혁신하고 목표를 달성할 수 있습니다. 최신 업데이트를 확인하세요.

보다 포괄적 수용을 위한 오픈 소스 용어 교체

Red Hat은 코드, 문서, 웹 속성에서 문제가 있는 언어를 교체하기 위해 최선을 다하고 있습니다. 자세한 내용은 다음을 참조하세요.Red Hat 블로그.

Red Hat 소개

Red Hat은 기업이 핵심 데이터 센터에서 네트워크 에지에 이르기까지 플랫폼과 환경 전반에서 더 쉽게 작업할 수 있도록 강화된 솔루션을 제공합니다.

Theme

© 2025 Red Hat