<div dir="ltr"><div><div><div><div><div><div>Hi,<br><br></div>Many thanks for the quick answer.<br><br></div>I managed to do what I wanted with both your idea and a comment on a bug <a href="https://bugzilla.redhat.com/show_bug.cgi?id=540807">https://bugzilla.redhat.com/show_bug.cgi?id=540807</a>.<br><br></div>--- build.sh ---<br>...<br>RPM_RELEASE=$(rpm -q --qf '%{RELEASE}\n' --specfile SPECS/repo.spec | head -n 1)<br>if [[ "$RPM_RELEASE" == *SNAPSHOT ]]; then<br>  RPM_RELEASE="${RPM_RELEASE}-$(date +%Y%m%d-%H%M%S)"<br>fi<br>...<br></div>rpmbuild ... --define="release_flags ${RPM_RELEASE//-/_}"<br><br></div>--- test.spec ---<br>...<br>Release:        SNAPSHOT%{?release_flags}<br>...<br><br></div>--- $ rpm -qip RPMS/noarch/test-1.5.0-SNAPSHOTSNAPSHOT_20150309_112521.noarch.rpm ---<br>...<br>Release     : SNAPSHOTSNAPSHOT_20150309_112521<br><br><div><div><div><div>Many thanks for your help !<br><br></div><div>Regards,<br><br></div><div>Pierre-Gildas MILLON<br></div><div><br></div></div></div></div></div><br><div class="gmail_quote">Le lun. 9 mars 2015 à 11:18, ?ukasz Stelmach <<a href="mailto:l.stelmach@samsung.com">l.stelmach@samsung.com</a>> a écrit :<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">It was <2015-03-05 czw 15:13>, when Pierre-Gildas MILLON wrote:<br>
> Hi people,<br>
><br>
> I'm trying to reproduce maven's philosophy with snapshots when building my<br>
> RPM :<br>
><br>
> if release endswith SNAPSHOT then<br>
>     release = concat(release, "-", timestamp)<br>
><br>
> I tried something like this without any result :<br>
><br>
> test.spec :<br>
> Release:        SNAPSHOT<br>
> %{?force_release: %define release %{force_release}}<br>
> ...<br>
><br>
> rpmbuild -ba --define="force_release SNAPSHOT-$TIMESTAMP"<br>
<br>
Take a look here<br>
<br>
<a href="https://git.tizen.org/cgit/platform/upstream/systemd.git/tree/packaging/systemd.spec" target="_blank">https://git.tizen.org/cgit/<u></u>platform/upstream/systemd.git/<u></u>tree/packaging/systemd.spec</a><br>
<br>
at release_flags and with_kdbus.<br>
<br>
--<br>
?ukasz Stelmach<br>
Samsung R&D Institute Poland<br>
Samsung Electronics<br>
-------------- next part --------------<br>
A non-text attachment was scrubbed...<br>
Name: not available<br>
Type: application/pgp-signature<br>
Size: 489 bytes<br>
Desc: not available<br>
URL: <<a href="http://lists.rpm.org/pipermail/rpm-list/attachments/20150305/afe0d7f9/attachment-0001.asc" target="_blank">http://lists.rpm.org/<u></u>pipermail/rpm-list/<u></u>attachments/20150305/afe0d7f9/<u></u>attachment-0001.asc</a>><br>
<br>
</blockquote></div>