Fix rpmlint warnings
contrib/mercurial.spec:9: W: hardcoded-path-in-buildroot-tag /tmp/build.%{name}-%{version}-%{release}
A path is hardcoded in your Buildroot tag. It should be replaced by something
like %{_tmppath}/%name-root.
contrib/mercurial.spec:31: W: rpm-buildroot-usage %prep rm -rf $RPM_BUILD_ROOT
$RPM_BUILD_ROOT should not be touched during %build or %prep stage, as it will
break short circuiting.
--- a/contrib/mercurial.spec Sun Nov 23 18:16:02 2008 +0100
+++ b/contrib/mercurial.spec Sun Nov 23 18:17:02 2008 +0100
@@ -6,7 +6,7 @@
Group: Development/Tools
Source: http://www.selenic.com/mercurial/release/%{name}-%{version}.tar.gz
URL: http://www.selenic.com/mercurial
-BuildRoot: /tmp/build.%{name}-%{version}-%{release}
+BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
# From the README:
#
@@ -28,13 +28,13 @@
for efficient handling of very large distributed projects.
%prep
-rm -rf $RPM_BUILD_ROOT
%setup -q
%build
make all
%install
+rm -rf $RPM_BUILD_ROOT
python setup.py install --root $RPM_BUILD_ROOT --prefix %{_prefix}
make install-doc DESTDIR=$RPM_BUILD_ROOT MANDIR=%{_mandir}