[packagers] noob help needed with %{dist}

Martin Hamant mh at accelance.fr
Fri May 4 15:36:33 CEST 2007


Le Fri, 4 May 2007 13:58:11 +0200 (CEST)
Dag Wieers <dag at wieers.com> écrivait:
 
> 
> > > > - 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"

I not sure to understand the meaning of these lines in spec file:

%{?dist: %{expand: %%define %dist 1}}

I understand "if %{dist} exists, we define a var and its name will be
the string that %{dist} contains (expand), and this new var will
contains "1". Is that right ?

And so we use it, if defined :
%{?rh8:%define _without_elfutils 1}

now if i call --define "dist rh8" ; and I disable the first line I
mentionned in the spec file (the one with dist expansion), then i notice
that %{rh8} still exists and contains "1" : is it normal ?

-- 
Martin


More information about the packagers mailing list