Can someone explain this spec file?

General support questions
Post Reply
simon@bp
Posts: 44
Joined: 2014/07/31 20:00:37

Can someone explain this spec file?

Post by simon@bp » 2021/11/12 01:03:29

I am investigating creating some rpm packages for Perl packages that are not included in the SCLO (for example XML::LibXML), so I downloaded and extracted the spec file for an existing package to use as an example:
rh-perl524-perl-Archive-Tar-2.08-5.el7.src.rpm

The spec file has this on the top line:
%{?scl:%scl_package perl-Archive-Tar}

Can someone explain this line to me?

sml
Posts: 305
Joined: 2020/01/17 09:01:44

Re: Can someone explain this spec file?

Post by sml » 2021/11/12 09:24:09

The macro %scl_package is defined in /etc/rpm/macros.scl (or /usr/lib/rpm/macros.d/macros.scl on CentOS 8) which is installed by scl-utils-build. That means a spec file using it BuildRequires scl-utils-build.

As to its semantics, see SCL Guidelines. Another document to consult is Software Collections Guide.

spec2scl helps with conversion.

Post Reply