Patchwork [09,of,22] buildrpm: prepare for building rpms with other names than mercurial

login
register
mail settings
Submitter Mads Kiilerich
Date May 20, 2014, 2:10 a.m.
Message ID <c49b91c305bd59a5bb37.1400551804@mk-desktop>
Download mbox | patch
Permalink /patch/4831/
State Changes Requested
Headers show

Comments

Mads Kiilerich - May 20, 2014, 2:10 a.m.
# HG changeset patch
# User Mads Kiilerich <madski@unity3d.com>
# Date 1400551681 -7200
#      Tue May 20 04:08:01 2014 +0200
# Node ID c49b91c305bd59a5bb37d0ad9be4a2468625474d
# Parent  0315b1a374c026070f0dd40beabbd78441aea6f1
buildrpm: prepare for building rpms with other names than mercurial

Patch

diff --git a/contrib/buildrpm b/contrib/buildrpm
--- a/contrib/buildrpm
+++ b/contrib/buildrpm
@@ -85,6 +85,7 @@  rpmspec=$RPMBUILDDIR/SPECS/mercurial.spe
 
 (
 sed \
+    -e "s,^Name:.*,Name: mercurial," \
     -e "s,^Version:.*,Version: $version," \
     -e "s,^Release:.*,Release: $release," \
     $specfile
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: %{name}-%{version}-%{release}.tar.gz
+Source0: mercurial-%{version}-%{release}.tar.gz
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
 
 BuildRequires: python >= 2.4, python-devel, make, gcc, python-docutils >= 0.5, gettext
@@ -72,9 +72,9 @@  rm -rf $RPM_BUILD_ROOT
 %dir %{_sysconfdir}/mercurial/hgrc.d
 %config(noreplace) %{_sysconfdir}/mercurial/hgrc.d/mergetools.rc
 %if "%{?pythonver}" != "2.4"
-%{_libdir}/python%{pythonver}/site-packages/%{name}-*-py%{pythonver}.egg-info
+%{_libdir}/python%{pythonver}/site-packages/mercurial-*-py%{pythonver}.egg-info
 %endif
-%{_libdir}/python%{pythonver}/site-packages/%{name}
+%{_libdir}/python%{pythonver}/site-packages/mercurial
 %{_libdir}/python%{pythonver}/site-packages/hgext
 
 %changelog