buildrpm: include release version in .tar.gz name
authorMads Kiilerich <madski@unity3d.com>
Tue, 20 May 2014 04:07:58 +0200
changeset 21641 977e5bd6eb76
parent 21640 4bfb721de6dd
child 21642 76a347bcdb33
buildrpm: include release version in .tar.gz name Official releases are fully indentified by the version number, these builds are not. Specs are however traditionally not versioned.
contrib/buildrpm
contrib/mercurial.spec
--- a/contrib/buildrpm	Thu May 15 01:48:37 2014 +0200
+++ b/contrib/buildrpm	Tue May 20 04:07:58 2014 +0200
@@ -43,8 +43,8 @@
     release='0'
 fi
 
-$HG archive -t tgz $rpmdir/SOURCES/mercurial-$version.tar.gz
-rpmspec=$rpmdir/SPECS/mercurial-$version.spec
+$HG archive -t tgz $rpmdir/SOURCES/mercurial-$version-$release.tar.gz
+rpmspec=$rpmdir/SPECS/mercurial.spec
 
 sed -e "s,^Version:.*,Version: $version," \
     -e "s,^Release:.*,Release: $release," \
--- a/contrib/mercurial.spec	Thu May 15 01:48:37 2014 +0200
+++ b/contrib/mercurial.spec	Tue May 20 04:07:58 2014 +0200
@@ -8,7 +8,7 @@
 License: GPLv2+
 Group: Development/Tools
 URL: http://mercurial.selenic.com/
-Source0: http://mercurial.selenic.com/release/%{name}-%{version}.tar.gz
+Source0: %{name}-%{version}-%{release}.tar.gz
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
 
 BuildRequires: python >= 2.4, python-devel, make, gcc, python-docutils >= 0.5, gettext
@@ -22,7 +22,7 @@
 for efficient handling of very large distributed projects.
 
 %prep
-%setup -q
+%setup -q -n mercurial-%{version}-%{release}
 
 %build
 make all