[Fedora-packaging] Macro question for rpm gurus

Gagadget gagadget at gmail.com
Mon May 4 09:12:58 UTC 2009


Dear listers,

BIND has a version numbering system like this :
Major.Medium.Minor-Ppatchlevel, with -Ppatchlevel only exists if patchlevel
> 0. For instance, the source are named like that :

bind-9.5.2-P2.tar.gz
bind-9.6.0-P1.tar.gz
bind-9.2.9.tar.gz

I try to define a generic spec file for BIND packaging, here is what I did :

%define VERSION 9.6.0
%define PATCHVER 1
[ ... ]
%if %{PATCHVER}
Source0:
ftp://ftp.isc.org/isc/bind9/%{VERSION}-P%{PATCHVER}/bind-%{VERSION}-P%{PATCHVER}.tar.gz
%else
Source0:
ftp://ftp.isc.org/isc/bind9/%{VERSION}/bind-%{VERSION}.tar.gz
%endif

It works, but I'd like to know if there is a more recursive way to avoid
if/else ? Using "?" macro or something like that ?

Regards,
Gael.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.fedoraproject.org/pipermail/packaging/attachments/20090504/fcc3d037/attachment.html 


More information about the packaging mailing list