# HG changeset patch # User Mads Kiilerich # Date 2008-11-23 17:17:02 # Node ID 05a3f2802b1354b4786dc7d6725338b9b01fb53b # Parent 7073fcbfbc28a2a3e25b9b0117406cd0bdd2a233 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. diff --git a/contrib/mercurial.spec b/contrib/mercurial.spec --- a/contrib/mercurial.spec +++ b/contrib/mercurial.spec @@ -6,7 +6,7 @@ License: GPL 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 @@ Mercurial is a fast, lightweight source 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}