Nicolas Mailhot e416a7b3da Add %new_package
%new_package is a wrapper around Name: and %package that abstracts their quirks
from packagers and macros. Its behavior is controled by the %{source_name}
global variable:
– when %{source_name} is not set, the first call to %new_package will create a
  Name: block and set %{source_name} to the %{name} of this block.
– when %{source_name} is set:
  – a call to %new_package with no arguments creates:
    Name: %{source_name}
  – otherwise, a call to %new_package creates the corresponding:
    %package…
    line, unless the resulting %{name} matches %{source_name}. In that case it
    creates:
    Name: %{source_name}
    as before.

Arguments:
– -n and %1 like %package
– -v to print the variables %new_package sets directly.

The intended use-case it to:
– simplify coordination between macros that create subpackages,
– make it easy for packagers to declare which of the macro-created packages
  owns the SRPM, and
– make %{source_name} available within spec files and not just as a dnf
  synthetic variable.

Unlike %{name} %{source_name} matches the SRPM name regardless of its location
within the spec file.
2020-05-29 08:33:19 +02:00
2016-10-03 17:03:08 -05:00
2014-04-27 11:58:46 +03:00
2020-05-29 08:33:19 +02:00
2020-05-23 16:53:03 +02:00
2019-05-30 19:54:13 +02:00
2014-04-27 11:58:46 +03:00
2020-04-22 07:40:27 +00:00
2020-05-29 08:33:19 +02:00
2018-12-04 17:25:02 +01:00
2018-08-20 22:33:04 +02:00
2014-04-27 11:58:46 +03:00
2020-05-23 16:53:03 +02:00
2019-07-25 10:12:03 +01:00
Languages
RPM Spec 43.5%
Shell 34.1%
Lua 20.4%
Perl 2%