V Thu, Apr 07, 2022 at 12:13:42PM -0400, Ben Cotton napsal(a):
> https://fedoraproject.org/wiki/Changes/RPM-4.18
> 
> == Summary ==
> Update RPM to the [https://rpm.org/wiki/Releases/4.18.0 4.18] release.
[...]
> * 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

Attachment: signature.asc
Description: PGP signature

_______________________________________________
devel mailing list -- devel@lists.fedoraproject.org
To unsubscribe send an email to devel-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org
Do not reply to spam on the list, report it: 
https://pagure.io/fedora-infrastructure

Reply via email to