[packagers] noob help needed with %{dist}
Dag Wieers
dag at wieers.com
Fri May 4 11:25:59 CEST 2007
On Fri, 4 May 2007, Martin Hamant wrote:
> I don't understand how does it works. My target is to make a RPM (for
> private use) that could be built on different distro, and so i have
> questions:
>
> - Is %{dist} internally defined by RPM engine (seems not! I tried some
> echo %{dist}... ) , or do I need a special macro to get it defined
> before the build ?
We update the SPEC file for each build. So the disttag is added to the
Release tag before building.
> - I know rpmforge packagers use %{dist} to dynamically name their
> package (in release) : Why can't i see any {%dist} references in
> specfiles ?
Our buildsystem provides the dist macro when building, like:
--define "dist el4"
If it would be hardcoded in the SPEC file, there would not be an advantage
to have a macro.
Beware though, we invented the %{dist} macro, but sadly Fedora took the
idea and used it in an incompatible manner. Fedora defines the dist macro
as being '.fc6' or '.el5'. While we defined it as being 'fc6' and 'el5.
The reason for this is that we use the dist macro to have conditionals in
the SPEC file that allows us to build from the same SPEC file. Fedora
however uses the dist macro only for tagging the Release.
Sadly, both uses are not compatible.
> Thank you very much !
You're welcome.
Kind regards,
-- dag wieers, dag at wieers.com, http://dag.wieers.com/ --
[all I want is a warm bed and a kind word and unlimited power]
More information about the packagers
mailing list