On Mon, Feb 26, 2018 at 6:42 AM, Till Hofmann <thofm...@fedoraproject.org>
wrote:

>
>
> On 02/26/2018 12:53 PM, Artur Iwicki wrote:
> > Is there a way I can automatically do something like "BuildRequires: fpc
> (whatever version); Requires: fpc = version-used-during-build", or would I
> have to control this manually?
>
> You can define an RPM macro for the version in fpc, e.g., by adding a
> file /usr/lib/rpm/macros.d/macros.fpc with the line
>
>         %_fpc_version X.Y.Z
>
> and then use
>
>         Requires: fpc = %_fpc_version
>
> in the Lazarus spec.
>
> You will still need to update the macro definition on every FPC update.


You could automate it in the fpc spec file, something like this in %install:

mkdir -p  %{buildroot}%{rpmmacrodir}
cat > %{buildroot}%{rpmmacrodir}/macros.fpc << EOF
# Some explanation here...
%global _fpc_version %{version}
EOF

Thanks,
Richard
_______________________________________________
devel mailing list -- devel@lists.fedoraproject.org
To unsubscribe send an email to devel-le...@lists.fedoraproject.org

Reply via email to