Commit Graph

7 Commits

Author SHA1 Message Date
Nicolas Mailhot
166707b501 clean up macro and lua function documentation 2020-05-29 08:47:28 +02:00
Nicolas Mailhot
a52af8dced new_package: create basic SRPM header as fallback
Make SRPM handover between macros even more graceful and reliable by auto-creating
a basic SRPM header before attempting declaration of a different sub-package.

With this change things will just work as long as the default %{source_name}
%{source_summary} and %{source_description} are set by something to sensible values.
2020-05-29 08:33:19 +02:00
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
Nicolas Mailhot
8394d3cf12
misc: add a wordwrap helper 2019-06-04 08:23:55 +02:00
Jan Pazdziora
e3e0ba6ab7 Add %_swidtagdir for directory for SWID tag files describing the installation.
Signed-off-by: Jan Pazdziora <jpazdziora@redhat.com>
2018-10-11 14:26:10 +02:00
Jason Tibbitts
fdbb98bd99 Add %_metainfodir macro.
An intervening commit added a fix to %forgeautosetup, but the specfile
was not updated.  I indicated the fix in the %changelog.
2018-04-20 12:05:38 -05:00
Jason Tibbitts
be53b9b3c2 Add a file for miscellaneous macros. 2016-04-11 21:41:45 -05:00