Score:0

rpm: define my own variable in spec file

ro flag

Is there a way to declare my own variable inside of a spec file and refer to it as %{my_var} ?

I see there is %define and %global macros, but seems none of it works for my case.

Score:1
de flag

%define is a scoped variable and visible only in the section where it's defined, %global is visible in the whole SPEC file. See: https://rpm-software-management.github.io/rpm/manual/macros.html

example:

%define var1 foo
%global var2 bar

and use as %{var1} and %{var2}

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.