[PATCH 04 of 22] buildrpm: include release version in .tar.gz name
Mads Kiilerich
mads at kiilerich.com
Mon May 19 21:09:59 CDT 2014
# HG changeset patch
# User Mads Kiilerich <madski at unity3d.com>
# Date 1400551678 -7200
# Tue May 20 04:07:58 2014 +0200
# Node ID d92c61a619e5e350da6d7c192a91dc3ccd743efb
# Parent c5aad482861c9e9d1ac219eac180ccaac0d6124f
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.
diff --git a/contrib/buildrpm b/contrib/buildrpm
--- a/contrib/buildrpm
+++ b/contrib/buildrpm
@@ -43,8 +43,8 @@ else
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," \
diff --git a/contrib/mercurial.spec b/contrib/mercurial.spec
--- a/contrib/mercurial.spec
+++ b/contrib/mercurial.spec
@@ -8,7 +8,7 @@ Release: 0
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 @@ Mercurial is a fast, lightweight source
for efficient handling of very large distributed projects.
%prep
-%setup -q
+%setup -q -n mercurial-%{version}-%{release}
%build
make all
More information about the Mercurial-devel
mailing list