use %cmake macro, fix %check, use RPM_BULID_ROOT consistently

epel9
Rex Dieter 12 years ago
parent e9054bdd75
commit 94c511596a

@ -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 <rdieter@fedoraproject.org> 1.6.0-3
- use %%cmake macro, fix %%check, use RPM_BULID_ROOT consistently
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.6.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild

Loading…
Cancel
Save