<br><br><div class="gmail_quote">2009/5/4 Toshio Kuratomi <span dir="ltr"><<a href="mailto:a.badger@gmail.com">a.badger@gmail.com</a>></span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="im">Gagadget wrote:<br>
> Thank you, here is what I did :<br>
><br>
> %define VERSION 9.6.0<br>
> %define PATCHVER 1<br>
> %define DISTVER mylocaldist<br>
> %define PKGVER 1<br>
> [...]<br>
> Version:        %{VERSION}<br>
<br>
</div>Since you are not using the "-" in the version, you can remove the<br>
<div class="im">  %define VERSION 9.6.0<br>
<br>
</div>and just use:<br>
  Version: 9.6.0<br>
<br>
Then future references to version will be %{version}<br>
<div class="im"><br>
> Release:        %{?PATCHVER:P%PATCHVER.}%{DISTVER}.%{PKGVER}<br>
> [...]<br>
> Source0:<br>
> <a href="ftp://ftp.isc.org/isc/bind9/%%7BVERSION%7D%%7B?PATCHVER:-P%PATCHVER%7D/bind-%%7BVERSION%7D%%7B?PATCHVER:-P%PATCHVER%7D.tar.gz" target="_blank">ftp://ftp.isc.org/isc/bind9/%{VERSION}%{?PATCHVER:-P%PATCHVER}/bind-%{VERSION}%{?PATCHVER:-P%PATCHVER}.tar.gz</a><br>

> [...]<br>
> %prep<br>
> %setup -q -n %{name}-%{VERSION}%{?PATCHVER:-P%PATCHVER}<br>
><br>
> I can't define a BINDVER or XVER because I want to have the Patchlevel<br>
> in the Release tag, and it refuse the "-". With the above, my rpm is<br>
> named bind-9.6.0-P1.mylocaldist.1<br>
><br>
> One question :<br>
><br>
> If i do<br>
> # %define PATCHVER 1<br>
><br>
> The PATCHVER is still define, I have to delete it to get it work ??? Is<br>
> it normal ?<br>
><br>
</div>Yes.  macros are expanded even in comments.  You can do this instead:<br>
<br>
# %%define PATCHVER 1<br>
<font color="#888888"></font></blockquote><div><br>Thank you for all those precious information.<br> </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<font color="#888888"><br>
-Toshio<br>
</font><div><div></div><div class="h5"><br>
--<br>
Fedora-packaging mailing list<br>
<a href="mailto:Fedora-packaging@redhat.com">Fedora-packaging@redhat.com</a><br>
<a href="https://www.redhat.com/mailman/listinfo/fedora-packaging" target="_blank">https://www.redhat.com/mailman/listinfo/fedora-packaging</a><br>
</div></div></blockquote></div><br>