From 94c511596a4cf4df923c3df656c04d4c8ea1befb Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Tue, 21 May 2013 07:36:49 -0500 Subject: [PATCH] use %cmake macro, fix %check, use RPM_BULID_ROOT consistently --- gtest.spec | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/gtest.spec b/gtest.spec index 7cd3f2a..b3ac4fb 100644 --- a/gtest.spec +++ b/gtest.spec @@ -1,7 +1,7 @@ Summary: Google C++ testing framework Name: gtest Version: 1.6.0 -Release: 2%{?dist} +Release: 3%{?dist} License: BSD Group: Development/Tools URL: http://code.google.com/p/googletest/ @@ -38,13 +38,16 @@ cp -pr ./samples ./samples.orig # this is odd but needed only to generate gtest-config. %configure mkdir build -cd build -cmake -DBUILD_SHARED_LIBS=ON -DCMAKE_SKIP_BUILD_RPATH=TRUE -DPYTHON_EXECUTABLE=%{__python} -Dgtest_build_tests=ON .. +pushd build +%cmake -DBUILD_SHARED_LIBS=ON -DCMAKE_SKIP_BUILD_RPATH=TRUE -DPYTHON_EXECUTABLE=%{__python} -Dgtest_build_tests=ON .. +popd -make %{?_smp_mflags} +make %{?_smp_mflags} -C build %check -LD_LIBRARY_PATH=$RPM_BUILD_DIR/%{name}-%{version}/build make test +# LD_LIBRARY_PATH needed due to cmake_skip_rpath in %%build +LD_LIBRARY_PATH=$RPM_BUILD_DIR/%{name}-%{version}/build \ +make test -C build # Restore the clean copy of samples. # To be later listed against doc. @@ -52,7 +55,7 @@ rm -rf ./samples mv ./samples.orig ./samples %install -rm -rf %{buildroot} +rm -rf $RPM_BUILD_ROOT # make install doesn't work anymore. # need to install them manually. install -d $RPM_BUILD_ROOT{%{_bindir},%{_datadir}/aclocal,%{_includedir}/gtest{,/internal},%{_libdir}} @@ -69,7 +72,7 @@ install -p -m 0644 include/gtest/internal/*.h $RPM_BUILD_ROOT%{_includedir}/gtes install -p -m 0644 m4/gtest.m4 $RPM_BUILD_ROOT%{_datadir}/aclocal/ %clean -rm -rf %{buildroot} +rm -rf $RPM_BUILD_ROOT %post -p /sbin/ldconfig @@ -91,6 +94,9 @@ rm -rf %{buildroot} %{_includedir}/gtest %changelog +* Tue May 21 2013 Rex Dieter 1.6.0-3 +- use %%cmake macro, fix %%check, use RPM_BULID_ROOT consistently + * Thu Feb 14 2013 Fedora Release Engineering - 1.6.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild