On Tue, Mar 07, 2023 at 11:14:34PM +0000, Kenneth Goldman wrote:
Let's see if I have this right ...
%build
%configure
%make_build
are not three separate steps. %build is the overall step, and the next two lines
are the build steps. The blank line terminates the %build. Correct?
An unfortunate happenstance of RPM is that spec file script sections and
macros both start with the % character. The main script sections are:
%prep %build %install %check %pre %post %preun %postun
(there are some others)
Some other sections that aren't scripts are:
%files %changelog %package
Other words that start with % are macros. That's what these are:
%setup
%autosetup
%configure
%make_build
%make_install
Where are the macros defined? I.e., %configure probably expands
to ./configure and %make_build to make.
/usr/lib/rpm/macros
/usr/lib/rpm/macros.d/*
If I want to add some arguments to configure,
%configure --argument1 --argument2 etc.
and add an autoreconf step before configure, how would I do that?
I don't think there are any autoconf/autoreconf macros. You just run
it directly, e.g:
%build
autoreconf -iv
%configure
%make_build
Sometimes the upstream source includes a script to do all the right
things with autoconf/autoreconf:
%build
./autogen.sh
%configure
%make_build