Skip to content

Commit

Permalink
Clean the build root for older systems only
Browse files Browse the repository at this point in the history
As per:
* http://fedoraproject.org/wiki/Packaging:Guidelines#.25clean
* http://fedoraproject.org/wiki/EPEL:Packaging#Prepping_BuildRoot_For_.25install
* http://fedoraproject.org/wiki/EPEL:Packaging#Cleaning_BuildRoot_in_.25clean

The removal of the `%{buildroot}` directory should be done in the
`%clean` and `%install` sections, but only for RHEL5 and earlier.
  • Loading branch information
pcolby committed Mar 12, 2015
1 parent a196fe5 commit 86414cc
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion package/rpm/pcp-pmda-cpp.spec
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ Metrics Domain Agents (PMDAs) for Performance Co-Pilot (PCP) in C++.
%setup -c -q

%build
%{__rm} -rf %{buildroot}
%{__mkdir_p} build/devel
pushd build/devel
%cmake ../../pcp-pmda-cpp-%{version}/include
Expand All @@ -38,11 +37,16 @@ pushd build/examples
popd

%install
%if 0%{?rhel} < 6
%{__rm} -rf %{buildroot}
%endif
%{__make} install DESTDIR=%{buildroot} -C build/devel
%{__make} install DESTDIR=%{buildroot} -C build/examples

%clean
%if 0%{?rhel} < 6
%{__rm} -rf %{buildroot}
%endif

%package devel
Summary: Development headers for the PMDA++ library
Expand Down

0 comments on commit 86414cc

Please sign in to comment.