diff options
author | Nick Mathewson <nickm@torproject.org> | 2004-12-18 22:19:32 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2004-12-18 22:19:32 +0000 |
commit | c1ccb63a37596ecafc604f5062f80cd881e899ff (patch) | |
tree | c97bbb27af5ff8ae6225c02a02848c123f0962f6 /tor.spec.in | |
parent | 50012e1c4ddc8330262e7916dc4320cc2301bac3 (diff) | |
download | tor-c1ccb63a37596ecafc604f5062f80cd881e899ff.tar.gz tor-c1ccb63a37596ecafc604f5062f80cd881e899ff.zip |
In mainline (post 0.0.9), we no longer need elaborate version-massaging tricks to appease RPM. Simple ones will do.
svn:r3176
Diffstat (limited to 'tor.spec.in')
-rw-r--r-- | tor.spec.in | 36 |
1 files changed, 1 insertions, 35 deletions
diff --git a/tor.spec.in b/tor.spec.in index 9f46707d68..9c4dcc8243 100644 --- a/tor.spec.in +++ b/tor.spec.in @@ -22,41 +22,7 @@ # numbering scheme. %define native_version @VERSION@ -# Massage the version so that pre-releases will be treated as earlier -# than release candidates which will be treated as earlier than released -# versions. -# -# We do this as follows: -# - If the version number has no "pre", "cvs", or "rc", we let it pass. -# - Otherwise, we mangle it heavily: -# * To make 0.0.Xpre come after 0.0.{X-1}* but before 0.0.X, we prepend -# 0.0.{X-1}.99 to the version. -# * We replace pre with .pre. and rc with .rc. -# * We replace -cvs with .cvs, and lack of -cvs with .release. -# -# Note that this scheme will break if we ever use 0 as a last digit for a -# Tor version: so don't do that. - -%define is_dev_version %(echo %{native_version} | grep 'cvs\\|pre\\|rc' > /dev/null && echo 1 || echo 0) - -%if %{is_dev_version} - -# The 0.0.X.pre.1.cvs part. -%define safe_native_version %(echo %{native_version} | sed -e 's/-cvs/.cvs/' -e 's/pre/.pre./' -e 's/rc/.rc./' -e 's/\\([0-9]\\)$/\\1.release/') -# The 0.0.X part -- the version we are leading up to. -%define stub_version %(echo %{native_version} | sed -e 's/-cvs//' -e 's/pre.*//' -e 's/rc.*//') -# The 0.0 part -%define stub_start %(echo %{stub_version} | sed -e 's/\\.[0-9]*$//') -# The X part. -%define stub_last %(echo %{stub_version} | sed -e 's/.*\\.\\([0-9]*\\)$/\\1/') -# The {X-1} part. -%define stub_newlast %(expr %{stub_last} - 1) -# The actual version: 0.0.{X-1}.99.0.0.X.pre.1.cvs -%define version %{stub_start}.%{stub_newlast}.99.%{safe_native_version} - -%else -%define version %{native_version} -%endif +%define version %(echo %{native_version} | sed -e 's/-/./g') ## Release and OS identification song and dance # |