V Thu, Apr 07, 2022 at 12:13:42PM -0400, Ben Cotton napsal(a):
[...]
* New `%conf` spec section for build configuration
RPM documenation reads:
In %conf, the unpacked sources are configured for building.
Different build- and language ecosystems come with their own helper macros,
but rpm has helpers for autotools based builds such as itself which
typically look like this:
%conf
%configure
In context of autotools, sources usually bundle a configure script. To follow
the open source way (and ensure portability to new platform and include
autotools fixes), building from the real sources is desired. Hence I do my
best to call "autoreconf -fi" before %configure.
Where should autoreconf be placed? %pre or %conf?
%prep %prep
%autosetup %autosetup
autoreconf -fi
%conf %conf
autoreconf -fi %configure
%configure
%build %build
%make_build %make_build
Please bear in mind that %prep usually contains other non-declarative twists
like pruning bundled code, correcting file permissions etc.
-- Petr