# SOME DESCRIPTIVE TITLE # Copyright (C) YEAR Free Software Foundation, Inc. # This file is distributed under the same license as the PACKAGE package. # FIRST AUTHOR , YEAR. # #, fuzzy msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "POT-Creation-Date: 2026-06-05 06:40+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #. type: TH #: archlinux debian-unstable fedora-44 fedora-rawhide #, no-wrap msgid "RPM-MACROS" msgstr "" #. type: TH #: archlinux #, no-wrap msgid "2026-03-06" msgstr "" #. type: TH #: archlinux debian-unstable fedora-44 fedora-rawhide #, no-wrap msgid "RPM 6.0.1" msgstr "" #. type: SH #: archlinux debian-unstable fedora-44 fedora-rawhide #, no-wrap msgid "NAME" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "rpm-macros - RPM macro processor" msgstr "" #. type: SH #: archlinux debian-unstable fedora-44 fedora-rawhide #, no-wrap msgid "SYNOPSIS" msgstr "" #. type: SS #: archlinux debian-unstable fedora-44 fedora-rawhide #, no-wrap msgid "Defining" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "B<%>I I" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "B<%>IB<(>[I]B<)> I" msgstr "" #. type: SS #: archlinux debian-unstable fedora-44 fedora-rawhide #, no-wrap msgid "Expanding" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "B<%>I" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "B<%>I [I] [I]" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "B<%{>IB<}>" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "B<%{>I [I] IB<}>" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "B<%{>IB<:>IB<}>" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "B<%{?\\&>IB<}>" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "B<%{?\\&>IB<:>IB<}>" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "B<%{!\\&?\\&>IB<:>IB<}>" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "B<%(>IB<)>" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "B<%[>IB<]>" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "B<%[>I B I B<:> IB<]>" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "B<%{lua:>IB<}>" msgstr "" #. type: SH #: archlinux debian-unstable fedora-44 fedora-rawhide #, no-wrap msgid "DESCRIPTION" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "" "RPM has a powerful built-in macro processor.\\& The primary uses of macros " "are configuration and other utility functions for RPM itself, and as a " "packaging aid in spec files.\\&" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "" "In addition to simple text substitution, the macro processor supports the " "following facilities:" msgstr "" #. type: IP #: archlinux debian-unstable fedora-44 fedora-rawhide #, no-wrap msgid "\\(bu" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "" "function-like B with options and arguments processing and " "locally scoped automatic and user-defined macros" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "B" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "B" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "B for embedded Lua processing" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "various B for string processing and OS interaction" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "The syntax for defining simple macros is:" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "I I" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "" "All whitespace surrounding I is removed.\\& I may be composed of " "alphanumeric characters and the underscore (B<_>), and must be at least two " "characters in length.\\& The body is (re-)expanded on each macro invocation." "\\& Macro names and options are case-sensitive.\\&" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "" "See B for the more advanced macro variant with options " "and arguments processing.\\&" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "" "Macros can be defined via B(5) files, and fully managed with " "macro primitives B<%define>, B<%global> and B<%undefine>, RPM command-line " "described in B(8) and the API (C, Python, Lua).\\&" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "" "Except for those defined inside parametric macros, macros are always global " "in scope.\\&" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "" "RPM macros are stacked, ie.\\& when redefining an already existing macro, it " "shadows the previous definition instead of replacing it, and undefining a " "macro only pops the topmost definition, thus activating the previous macro " "definition.\\&" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "" "Note that this manual only describes the macro processor engine itself.\\& " "On a normal RPM based system, there are a vast number of other macros " "defined through B(5) files that will not be covered here.\\&" msgstr "" #. type: SH #: archlinux debian-unstable fedora-44 fedora-rawhide #, no-wrap msgid "EXPANSION" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "" "To expand a macro, place B<%> in front of it.\\& Several forms are supported:" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "Expand the macro I.\\&" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "" "Expand the macro I, allowing placement adjacent to other text (similar " "to B<${ENV}> in shell).\\&" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "" "Expand the parametric/built-in macro I, using options and arguments " "parsed up to the string end or next newline.\\&" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "B<--> can be used to separate options from arguments.\\&" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "B<%{>I [I] [I]B<}>" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "" "Expand the parametric/built-in macro I, using options and arguments " "parsed up to the closing B<}>.\\& Allows usage adjacent to other text.\\&" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "" "Expand the parametric/built-in macro I, using the string after B<:> as " "the sole argument.\\& Allows usage adjacent to other text.\\&" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "" "Note: The syntaxes for calling parametric and built-in macros are generally " "interchangeable now, but prior to 4.\\&18, the B<%{>IB<:>IB<}" "> syntax was exclusive to built-in macros.\\&" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "" "Macro expansion can be escaped by placing a second B<%> in front of the " "macro, for example B<%%{name}> would be expanded to B<%{name}>.\\&" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "" "Attempting to expand an undefined macro expands to the literal invocation, e." "\\&g.\\& B<%_undefined> expands to B<%_undefined>.\\& If this is not " "desired, use conditionals.\\&" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "Macro expansions can recurse up to 64 levels.\\&" msgstr "" #. type: SS #: archlinux debian-unstable fedora-44 fedora-rawhide #, no-wrap msgid "Shell expansion" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "" "Shell expansion can be performed using B<%(>IB<)>.\\& " "I is expanded before executing it with I, whose " "output becomes the expansion of the macro.\\& The trailing newline is " "deleted.\\&" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "Example:" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide #, no-wrap msgid "%(echo aa-bb-cc | tr \\&'-\\&' \\&'\\&.\\&')\n" msgstr "" #. type: SS #: archlinux debian-unstable fedora-44 fedora-rawhide #, no-wrap msgid "Conditional expansion" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "" "The macro processor supports testing whether a macro is defined or not.\\&" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "B<%{?\\&>IB<:>IB<}>" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "" "Expands to the expansion of I if I is defined, otherwise to an " "empty string.\\&" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "B<%{!\\&?\\&>IB<:>IB<}>" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "" "Expands to the expansion of I if I is I defined, otherwise " "it expands to an empty string.\\&" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "Shorthand for B<%{?\\&>IB<:%{>IB<}}>.\\&" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "" "For more complex tests, use B or B.\\& " "Note that B<%if>, B<%ifarch> and the like are not macros, they are spec " "directives and only usable in that context.\\&" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "" "Note that in RPM E= 4.\\&17, conditionals on built-in macros simply test " "for existence of that built-in, just like with any other macros.\\& In older " "versions, the behavior of conditionals on built-ins is undefined.\\&" msgstr "" #. type: SS #: archlinux debian-unstable fedora-44 fedora-rawhide #, no-wrap msgid "Expression expansion" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "" "Expression expansion can be performed using B<%[>IB<]>.\\& An " "expression consists of terms that can be combined using operators.\\&" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "RPM supports three kinds of terms:" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "numbers made up from digits" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "strings enclosed in double quotes (e.\\&g B<\"somestring\">)" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "" "versions enclosed in double quotes preceded by B (e.\\&g " "B)" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "RPM will expand macros when evaluating terms.\\&" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "You can use the standard operators to combine terms:" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "logical operators B<&&>, B<||>, B" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "" "relational operators B, B<==>, B>, B>, B=>, " "B=>" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "arithmetic operators B<+>, B<->, B, B<*>," msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "the ternary operator B" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "parentheses" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "" "For example, B<%[ 3 + 4 * (1 + %two) ]> will expand to B<15> if B<%two> " "expands to B<2>.\\& Version terms are compared using RPM version " "([I:]I[-I]) comparison algorithm, rather than " "regular string comparison.\\&" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "" "Note that the B<%[>IB<]> expansion is different to the B<%" "{expr:>IB<}> macro.\\& With the latter, the macros in the " "expression are expanded first and then the expression is evaluated (without " "re-expanding the terms).\\& Thus" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide #, no-wrap msgid "rpm --define \\&'foo 1 + 2\\&' --eval \\&'%{expr:%foo}\\&'\n" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "" "will print B<3>.\\& Using B<%[%foo]> instead will result in the error that " "\"1 + 2\" is not a number.\\&" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "" "Doing the macro expansion when evaluating the terms has two advantages.\\& " "First, it allows RPM to do correct short-circuit processing when evaluating " "logical operators.\\& Second, the expansion result does not influence the " "expression parsing, e.\\&g.\\& B<%[\"%file\"]> will even work if the " "B<%file> macro expands to a string that contains a double quote.\\&" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "Added: 4.\\&16.\\&0" msgstr "" #. type: SS #: archlinux debian-unstable fedora-44 fedora-rawhide #, no-wrap msgid "Lua expansion" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "" "The most powerful of the macro expansion methods is using RPM'\\&s embedded " "Lua interpreter:" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "" "Execute I using RPM'\\&s embedded Lua interpreter, expanding to " "the code'\\&s B'\\&ed output.\\&" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "See B(7) for the details.\\&" msgstr "" #. type: SH #: archlinux debian-unstable fedora-44 fedora-rawhide #, no-wrap msgid "PARAMETRIC MACROS" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "" "Parametric macros are a powerful mechanism that allows building function-" "like utility macros with option processing and accepting a variable number " "of arguments, much like common shell tools.\\&" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "The syntax for defining parametric macros is:" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "I([I]) I" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "" "If present, the I (i.\\&e.\\& the string between parentheses) are " "passed exactly as is to B(3) for argc/argv processing at the " "beginning of a macro invocation.\\& Only short options are supported.\\&" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "" "B<-> as the sole I field disables RPM'\\&s option processing.\\& " "This allows macros to fully decide how to handle their input, e.\\&g.\\& if " "the arguments of the macro only/mostly consist of items starting with B<->, " "the default processing only gets in the way.\\&" msgstr "" #. type: SS #: archlinux debian-unstable fedora-44 fedora-rawhide #, no-wrap msgid "Automatic macros" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "" "While a parameterized macro is being expanded, the following shell-like " "automatic macros are available:" msgstr "" #. type: tbl table #: archlinux debian-unstable fedora-44 fedora-rawhide #, no-wrap msgid "B" msgstr "" #. type: tbl table #: archlinux debian-unstable fedora-44 fedora-rawhide #, no-wrap msgid "B" msgstr "" #. type: tbl table #: archlinux debian-unstable fedora-44 fedora-rawhide #, no-wrap msgid "B<%0>" msgstr "" #. type: tbl table #: archlinux debian-unstable fedora-44 fedora-rawhide #, no-wrap msgid "the name of the macro being invoked" msgstr "" #. type: tbl table #: archlinux debian-unstable fedora-44 fedora-rawhide #, no-wrap msgid "B<%*>" msgstr "" #. type: tbl table #: archlinux debian-unstable fedora-44 fedora-rawhide #, no-wrap msgid "all arguments (unlike shell, not including any processed flags)" msgstr "" #. type: tbl table #: archlinux debian-unstable fedora-44 fedora-rawhide #, no-wrap msgid "B<%**>" msgstr "" #. type: tbl table #: archlinux debian-unstable fedora-44 fedora-rawhide #, no-wrap msgid "all arguments (including any processed flags)" msgstr "" #. type: tbl table #: archlinux debian-unstable fedora-44 fedora-rawhide #, no-wrap msgid "B<%#>" msgstr "" #. type: tbl table #: archlinux debian-unstable fedora-44 fedora-rawhide #, no-wrap msgid "the number of arguments" msgstr "" #. type: tbl table #: archlinux debian-unstable fedora-44 fedora-rawhide #, no-wrap msgid "B<%{-f}>" msgstr "" #. type: tbl table #: archlinux debian-unstable fedora-44 fedora-rawhide #, no-wrap msgid "if present at invocation, the last occurrence of flag B (flag and argument)" msgstr "" #. type: tbl table #: archlinux debian-unstable fedora-44 fedora-rawhide #, no-wrap msgid "B<%{-f*}>" msgstr "" #. type: tbl table #: archlinux debian-unstable fedora-44 fedora-rawhide #, no-wrap msgid "if present at invocation, the argument to the last occurrence of flag B" msgstr "" #. type: tbl table #: archlinux debian-unstable fedora-44 fedora-rawhide #, no-wrap msgid "B<%1>, B<%2>, .\\&.\\&.\\&" msgstr "" #. type: tbl table #: archlinux debian-unstable fedora-44 fedora-rawhide #, no-wrap msgid "the arguments themselves (after B(3) processing)" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "" "If the built-in option processing was disabled with B<-> as the I " "field, only the following automatic macros are available:" msgstr "" #. type: tbl table #: archlinux debian-unstable fedora-44 fedora-rawhide #, no-wrap msgid "B<%*>, B<%**>" msgstr "" #. type: tbl table #: archlinux debian-unstable fedora-44 fedora-rawhide #, no-wrap msgid "all arguments" msgstr "" #. type: tbl table #: archlinux debian-unstable fedora-44 fedora-rawhide #, no-wrap msgid " the number of arguments" msgstr "" #. type: tbl table #: archlinux debian-unstable fedora-44 fedora-rawhide #, no-wrap msgid "the arguments themselves" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "" "Automatic macros are automatically defined and undefined on parametric macro " "entry and exit.\\&" msgstr "" #. type: SS #: archlinux debian-unstable fedora-44 fedora-rawhide #, no-wrap msgid "Accessing options" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "" "Within the body of a parametric macro, there are several constructs that " "permit testing for the presence of optional parameters.\\& The simplest " "construct is B<%{-f}> which expands (literally) to B<-f> if B<-f> was " "mentioned when the macro was invoked.\\& There are also provisions for " "including text if a flag was present using B<%{-f:X}>.\\& This macro expands " "to (the expansion of) B if the flag was present.\\& The negative form, B<%" "{!\\&-f:Y}>, expanding to (the expansion of)B< Y> if B<-f> was B " "present, is also supported.\\&" msgstr "" #. type: SS #: archlinux debian-unstable fedora-44 fedora-rawhide #, no-wrap msgid "Scope and visibility" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "" "In general, macros have a global scope, regardless of where and how they " "were defined.\\& However, macros defined inside parametric macros have non-" "global scope as follows:" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "" "automatic macros have local scope, ie.\\& are only visible on the call-level " "of the macro itself" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "" "user-defined local macros have nested scope, ie.\\& are visible on the call-" "level of the macro itself and deeper" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "" "That is, a parametric macro cannot see the options or arguments of another " "one, but a user-defined local macro in a calling macro can be accessed in " "the callee(s).\\&" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "" "To define a global macro inside a parametric macro, you I use " "B<%global> instead of B<%define>.\\& Also note that because such a macro may " "be referring to other macros only visible in the current scope, B<%global> " "I.\\&" msgstr "" #. type: SS #: archlinux debian-unstable fedora-44 fedora-rawhide #, no-wrap msgid "Calling convention" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "" "When a parametric macro is expanded, the following calling convention is " "used:" msgstr "" #. type: IP #: archlinux debian-unstable fedora-44 fedora-rawhide #, no-wrap msgid "1." msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "any arguments to the macro are expanded on the call-level of the callee" msgstr "" #. type: IP #: archlinux debian-unstable fedora-44 fedora-rawhide #, no-wrap msgid "2." msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "any options to the macro are processed" msgstr "" #. type: IP #: archlinux debian-unstable fedora-44 fedora-rawhide #, no-wrap msgid "3." msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "automatic macros are set up for the options and the arguments" msgstr "" #. type: IP #: archlinux debian-unstable fedora-44 fedora-rawhide #, no-wrap msgid "4." msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "the macro body is recursively expanded" msgstr "" #. type: IP #: archlinux debian-unstable fedora-44 fedora-rawhide #, no-wrap msgid "5." msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "all macros defined on this call-level are discarded" msgstr "" #. type: SH #: archlinux debian-unstable fedora-44 fedora-rawhide #, no-wrap msgid "BUILT-IN MACROS" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "" "RPM supports the following built-in macros for various operations.\\& Built-" "in macros cannot be undefined or overridden.\\&" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "" "Note: The B<%{name:arg}> style is used here as it'\\&s the most backwards " "compatible and does not require quoting for whitespace, but it can generally " "be replaced with the other expansion forms too.\\& Built-ins taking multiple " "arguments must use other styles, as indicated below.\\&" msgstr "" #. type: SS #: archlinux debian-unstable fedora-44 fedora-rawhide #, no-wrap msgid "Macro manipulation" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "" "The macro primitives are used for macro manipulation in spec files and other " "macros.\\& Note that all these operate on the macro name I the " "preceding B<%>-character.\\&" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "B<%define> I[([I])] I" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "" "This is the primary way to define macros.\\& A B<%define> is always fully " "declarative: no macro expansion takes place, and it has no side-effects.\\& " "Macros defined with it are in global scope, unless the definition occurs " "inside a parametric macro.\\&" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide #, no-wrap msgid "%define mypath /usr/bin/mine\n" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "B<%global> I[([I])] I" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "" "The B<%global> primitive is identical in syntax to B<%define>, but has two " "critically important behavioral differences: as it'\\&s name suggests, a " "macro defined with B<%global> always has a global scope regardless of where " "it'\\&s used.\\&" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "" "The second difference is that the I is expanded once at the time of " "definition and the expansion becomes the actual macro body.\\& Thus, " "arbitrary code execution and side-effects may occur when B<%global> is used, " "depending on the contents and the other macros used in I.\\& The " "latter can be handy for avoiding redundant, possibly expensive macro " "expansions if the value does not change, but be aware of the side-effects.\\&" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "" "Note that while B<%global> technically accepts an I field, it is " "ill-suited for defining parametric macros because of the I expansion " "behavior.\\&" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide #, no-wrap msgid "%global snapver 0-0\\&.48\\&.20240616git\n" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "B<%undefine> I" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "" "Note that B<%undefine> only pops a macro definition from the stack, so using " "it does I guarantee that I is undefined after calling " "B<%undefine> on it.\\& Automatic macros and built-in macros cannot be " "undefined.\\&" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide #, no-wrap msgid "%undefine mypath\n" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "B<%{load:>IB<}>" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "Load an B(5) file.\\& (Added: 4.\\&12.\\&0)" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide #, no-wrap msgid "%{load:/some/dir/macros\\&.foo}\n" msgstr "" #. type: SS #: archlinux debian-unstable fedora-44 fedora-rawhide #, no-wrap msgid "Macro expansion" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "B<%{expand:>IB<}>" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "" "Expand I as if it were a macro body.\\& Useful for increased " "indirection, such as to expand a macro name constructed from two or more " "macros.\\&" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide #, no-wrap msgid "%{expand:%{foo_prefix}%{foo_suffix}}\n" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "B<%{expr:>I}" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "" "Expand I.\\& See B.\\& (Added: " "4.\\&15.\\&0)" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide #, no-wrap msgid "%{expr:5*1024}\n" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "" "Expand to output of I using the embedded Lua interpreter.\\& See " "B.\\&" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide #, no-wrap msgid "%{lua:for i=65,90 do print(string\\&.char(i)) end}\n" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "B<%{macrobody:>IB<}>" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "" "Expand to the literal body of the macro I.\\& (Added: 4.\\&16.\\&0)" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide #, no-wrap msgid "%{macrobody:_libdir}\n" msgstr "" #. type: SS #: archlinux debian-unstable fedora-44 fedora-rawhide #, no-wrap msgid "String operations" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "B<%dnl>" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "" "Discard to next line (without expanding anything).\\& B<%dnl> is the " "recommended way to comment out things in spec files because it works " "everywhere and disables macro processing for that line.\\& (Added: " "4.\\&15.\\&0)" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide #, no-wrap msgid "%dnl This is a comment on %{mymacro} behavior\n" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "B<%{gsub >I, I, I [,I]B<}>" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "" "Replace all (or I first if given) occurrences of I in I " "by I.\\&" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "Added: 4.\\&19.\\&0" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide #, no-wrap msgid "%{gsub aabbaacc aa dd 1}\n" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "B<%{len:>IB<}>" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "Expand to length of I.\\& (Added: 4.\\&19.\\&0)" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide #, no-wrap msgid "%{len:9bf7da058a7c582878310e75be3d56a5a8b67f95}\n" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "B<%{lower:>IB<}>" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "Expand to lowercase I.\\& (Added: 4.\\&19.\\&0)" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide #, no-wrap msgid "%{lower:CamelCase}\\&'\n" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "B<%{quote:>IB<}>" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "" "Quote arguments for passing empty strings and strings with embedded " "whitespace as parametric macro arguments.\\& (Added: 4.\\&14.\\&0)" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide #, no-wrap msgid "%myzip -x %{quote:empty spaces\\&.zip}\n" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "B<%{rep >I, I [,I]B<}>" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "" "Expand to a string that is the concatenation of I copies of I, " "separated by I (if specified).\\&" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide #, no-wrap msgid "%{rep a 5}\n" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "B<%{reverse:>IB<}>" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "Reverse a string.\\& (Added: 4.\\&19.\\&0)" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide #, no-wrap msgid "%{reverse:tac}\n" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "B<%{shescape:>IB<}>" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "" "Single quote I with escapes for use in shell.\\& (Added: " "4.\\&18.\\&0)" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide #, no-wrap msgid "%{shescape:foo\\&'s}\n" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "B<%{shrink:>IB<}>" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "" "Trim leading and trailing whitespace from I, reduce intermediate " "whitespace to a single space.\\& (Added: 4.\\&14.\\&0)" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide #, no-wrap msgid "%{shrink:aa bb ccc }\n" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "B<%{span:>IB<}>" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "" "As-is string, handy for wrapping multiline macros.\\& (Added: 6.\\&0.\\&0)" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide #, no-wrap msgid "" "%{span:\n" "\t%one thing\n" "\t%another thing\n" "}\n" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "B<%{sub >I, I, [,I]B<}>" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "" "Expand to substring of I that starts at B and continues until " "B.\\& B and B can be negative to index from the string'\\&s end.\\& " "If B is absent, then it is assumed to be equal to B<-1> (ie.\\& string " "end).\\&" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide #, no-wrap msgid "*%{sub myfile\\&.zip 3 6}*\n" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "B<%{upper:>IB<}>" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "Expand to uppercase I.\\& (Added: 4.\\&19.\\&0)" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide #, no-wrap msgid "%{upper:CamelCase}\\&'\n" msgstr "" #. type: SS #: archlinux debian-unstable fedora-44 fedora-rawhide #, no-wrap msgid "File and path operations" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "B<%{basename:>IB<}>" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "B(1) macro analogue.\\&" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide #, no-wrap msgid "%{basename:/some/dir/file\\&.suf}\n" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "B<%{dirname:>IB<}>" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "B(1) macro analogue.\\&" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide #, no-wrap msgid "%{dirname:/some/dir/file\\&.suf}\n" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "B<%{exists:>IB<}>" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "Test file existence, expands to 1/0.\\& (Added: 4.\\&18.\\&0)" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide #, no-wrap msgid "%{exists:%{builddir}/myflag\\&.txt}\n" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "B<%{suffix:>IB<}>" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "Expand to suffix part of a filename.\\&" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide #, no-wrap msgid "%{suffix:myfile\\&.zip}\n" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "B<%{url2path:>IB<}>" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "Convert url to a local path.\\&" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide #, no-wrap msgid "%{url2path:http://rpm\\&.org/not/there}\n" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "B<%{uncompress:>IB<}>" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "" "Expand to a command for outputting argument I to standard output, " "uncompressing as needed.\\&" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide #, no-wrap msgid "%{uncompress /my/source\\&.tar\\&.gz}\n" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "B<%{xdg:>IB<}>" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "" "Expand to XDG base directory paths.\\& Supported values for I are:" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "B: user-specific non-essential (cached) data" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "B: user-specific configuration files" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "B: user-specific data files" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "B: user-specific state data" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "Added: 6.\\&0.\\&0" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide #, no-wrap msgid "%{xdg config}\n" msgstr "" #. type: SS #: archlinux debian-unstable fedora-44 fedora-rawhide #, no-wrap msgid "Environment info" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "B<%getncpus>" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "Expand to the number of available CPUs.\\& (Added: 4.\\&15.\\&0)" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "B<%{getncpus:>IB<}>" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "" "Expand to the number of available CPUs, supported valued for I are" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "B: total number of available CPUs (same as B<%getncpus>)" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "B: number of available CPUs for processes" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "B: number of available CPUs for threads" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "" "B and B account for available memory, including address space " "limitations for threads.\\&" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "Added: 4.\\&19.\\&0.\\&" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide #, no-wrap msgid "%{getncpus proc}\n" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "B<%getconfdir>" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "Expand to RPM \"home\" directory (typically /usr/lib/rpm).\\&" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "B<%{getenv:>IB<}>" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "B(3) macro analogue.\\&" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide #, no-wrap msgid "%{getenv:HOME}\n" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "B<%rpmversion>" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "Expand to running RPM version.\\&" msgstr "" #. type: SS #: archlinux debian-unstable fedora-44 fedora-rawhide #, no-wrap msgid "Output" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "B<%{echo:>IB<}>" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "Print I to process standard output.\\&" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide #, no-wrap msgid "%{echo:Building with foo}\n" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "B<%{warn:>IB<}>" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "" "Print I prefixed with \"warning: \" to process standard error.\\&" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide #, no-wrap msgid "%{warning:Foo is deprecated}\n" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "B<%{error:>IB<}>" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "" "Print I prefixed with \"error: \" to process standard error and flag " "an error in the macro processor.\\&" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide #, no-wrap msgid "%{error:Invalid argument}\n" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "B<%verbose>" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "" "Expand to 1/0 whether RPM is in verbose mode or not.\\& (Added: 4.\\&17.\\&1)" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "B<%{verbose:>IB<}>" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "" "Expand to I if RPM is in verbose mode, the empty string if not.\\& " "(Added: 4.\\&17.\\&1)" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide #, no-wrap msgid "%{verbose:-x}\n" msgstr "" #. type: SS #: archlinux debian-unstable fedora-44 fedora-rawhide #, no-wrap msgid "Spec specific macros" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "B<%{S:>IB<}>" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "" "Expand to the filename of the specified Source I.\\& B<%{S:n}> is " "equivalent to B<%{SOURCEn}>.\\&" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "B<%{P:>IB<}>" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "" "Expand to the filename of the specified Patch I.\\& B<%{P:n}> is " "equivalent to B<%{PATCHn}>.\\&" msgstr "" #. type: SS #: archlinux debian-unstable fedora-44 fedora-rawhide #, no-wrap msgid "Diagnostics" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "B<%trace>" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "Toggle print of debugging information before/after expansion.\\&" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "B<%dump>" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "Print the active (i.\\&e.\\& non-covered) macro table.\\&" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "B<%__file_name>" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "Expand to current filename (if parsing a file).\\& (Added: 4.\\&15)" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "B<%__file_lineno>" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "" "Expand to current line number in current file (if parsing a file).\\& " "(Added: 4.\\&15)" msgstr "" #. type: SH #: archlinux debian-unstable fedora-44 fedora-rawhide #, no-wrap msgid "EXAMPLES" msgstr "" #. type: SS #: archlinux debian-unstable fedora-44 fedora-rawhide #, no-wrap msgid "Example 1. Define a simple macro" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "" "Define macro B to a path relative to B<%{_libdir}> macro in a spec:" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide #, no-wrap msgid "%define mylib %{_libdir}/mine\n" msgstr "" #. type: SS #: archlinux debian-unstable fedora-44 fedora-rawhide #, no-wrap msgid "Example 2. Define a parametric macro" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "" "Define parametric macro B which executes the program specified by " "B<%myprog> with it'\\&s first argument and always passing the option B<--" "some-opt> to it, and additionally the B<--xtra> option if it received the B<-" "x> option itself:" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide #, no-wrap msgid "%define myhelper(x) %{myprog} --some-opt %{?-x:--xtra} %{1}\n" msgstr "" #. type: SS #: archlinux debian-unstable fedora-44 fedora-rawhide #, no-wrap msgid "Example 3. Define a macro utilizing shell expansion" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "" "Define macro B<%today> that expands to the current date in I format " "by calling the B(1) shell utility.\\& Note the 2nd B<%> needed to " "escape the arguments to B(1):" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide #, no-wrap msgid "%define today %(date +%%y%%m%%d)\n" msgstr "" #. type: SS #: archlinux debian-unstable fedora-44 fedora-rawhide #, no-wrap msgid "Example 4. Define a macro conditionally" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "Define macro B if it wasn'\\&t previously defined:" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide #, no-wrap msgid "%{!?mypath: %define mypath /some/where}\n" msgstr "" #. type: SS #: archlinux debian-unstable fedora-44 fedora-rawhide #, no-wrap msgid "Example 5. Conditional expansion" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "Expands to B<1> if B is defined and B<0> otherwise:" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide #, no-wrap msgid "%{?use_foo:1}%{!?use_foo:0}\n" msgstr "" #. type: SS #: archlinux debian-unstable fedora-44 fedora-rawhide #, no-wrap msgid "Example 6. Expressions" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "Calculate 5 * 1024:" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide #, no-wrap msgid "%[5 * 1024]\n" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "Expand to literal B or B depending on a condition:" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide #, no-wrap msgid "%[1 E 2 ? \"true\" : \"false\"]\n" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "Compare versions, expanding to B<1> or B<0> on true/false:" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide #, no-wrap msgid "%[ v\"3\\&.1\\&.0-1\" E v\"1\\&.0~alpha-2\" ? 1 : 0]\n" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "Expands to B<1> if B<%aa> expands to B<5>, otherwise expands to B<2>:" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide #, no-wrap msgid "%[ \"%{aa}\" == \"5\" ? 1 : 2]\n" msgstr "" #. type: SH #: archlinux debian-unstable fedora-44 fedora-rawhide #, no-wrap msgid "DEBUGGING" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "Some useful tools for working with and troubleshooting macros:" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "BIB<\">" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "Expand I on the command line.\\&" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "B" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "Define and evaluate a macro on the command line.\\&" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "" "B" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "Define and examine macro body using B<%global> on the command line.\\&" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "" "B" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "Define and examine macro body using B<%define> on the command line.\\&" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "B" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "Run an interactive shell in the embedded Lua environment.\\&" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "B" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "" "Using the embedded Lua interpreter in standalone form, print print 1/0 " "whether macro B<_libdir> is defined or not.\\&" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "B" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "Run an interactive shell in the macro environment.\\&" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "B" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "" "Run an interactive shell in the macro environment after parsing B.\\&" msgstr "" #. type: SH #: archlinux debian-unstable fedora-44 fedora-rawhide #, no-wrap msgid "SEE ALSO" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide msgid "" "B(8) B(8) B(5) B(5) B(7) B(1) B(1)" msgstr "" #. type: TH #: debian-unstable #, no-wrap msgid "2026-04-10" msgstr "" #. type: TH #: fedora-44 #, no-wrap msgid "2026-01-17" msgstr "" #. type: TH #: fedora-rawhide #, no-wrap msgid "2026-02-16" msgstr ""