epel9
Terje Røsten 11 years ago
parent 04c60fc603
commit 5e4510af56

1
.gitignore vendored

@ -1,3 +1,4 @@
gtest-1.4.0.tar.bz2 gtest-1.4.0.tar.bz2
/gtest-1.5.0.tar.bz2 /gtest-1.5.0.tar.bz2
/gtest-1.6.0.zip /gtest-1.6.0.zip
/gtest-1.7.0.zip

@ -1,14 +1,15 @@
Summary: Google C++ testing framework Summary: Google C++ testing framework
Name: gtest Name: gtest
Version: 1.6.0 Version: 1.7.0
Release: 5%{?dist} Release: 1%{?dist}
License: BSD License: BSD
Group: Development/Tools Group: Development/Tools
URL: http://code.google.com/p/googletest/ URL: http://code.google.com/p/googletest/
Source0: http://googletest.googlecode.com/files/gtest-%{version}.zip Source0: http://googletest.googlecode.com/files/gtest-%{version}.zip
Patch0: gtest-soname.patch Patch0: gtest-soname.patch
BuildRequires: python cmake libtool BuildRequires: cmake
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) BuildRequires: libtool
BuildRequires: python
%description %description
Google's framework for writing C++ tests on a variety of platforms Google's framework for writing C++ tests on a variety of platforms
@ -32,22 +33,24 @@ This package contains development files for %{name}.
%patch0 -p1 -b .0-soname %patch0 -p1 -b .0-soname
# keep a clean copy of samples. # keep a clean copy of samples.
cp -pr ./samples ./samples.orig cp -a ./samples ./samples.orig
%build %build
# this is odd but needed only to generate gtest-config. # this is odd but needed only to generate gtest-config.
%configure %configure
mkdir build mkdir build
pushd build pushd build
%cmake -DBUILD_SHARED_LIBS=ON -DCMAKE_SKIP_BUILD_RPATH=TRUE -DPYTHON_EXECUTABLE=%{__python} -Dgtest_build_tests=ON .. %cmake -DBUILD_SHARED_LIBS=ON \
-DCMAKE_SKIP_BUILD_RPATH=TRUE \
-DPYTHON_EXECUTABLE=%{__python2} \
-Dgtest_build_tests=ON \
..
popd popd
make %{?_smp_mflags} -C build make %{?_smp_mflags} -C build
%check %check
# LD_LIBRARY_PATH needed due to cmake_skip_rpath in %%build # LD_LIBRARY_PATH needed due to cmake_skip_rpath in %%build
LD_LIBRARY_PATH=$RPM_BUILD_DIR/%{name}-%{version}/build \ LD_LIBRARY_PATH=$RPM_BUILD_DIR/%{name}-%{version}/build make test -C build
make test -C build
# Restore the clean copy of samples. # Restore the clean copy of samples.
# To be later listed against doc. # To be later listed against doc.
@ -55,37 +58,31 @@ rm -rf ./samples
mv ./samples.orig ./samples mv ./samples.orig ./samples
%install %install
rm -rf $RPM_BUILD_ROOT
# make install doesn't work anymore. # make install doesn't work anymore.
# need to install them manually. # need to install them manually.
install -d $RPM_BUILD_ROOT{%{_bindir},%{_datadir}/aclocal,%{_includedir}/gtest{,/internal},%{_libdir}} install -d %{buildroot}{%{_includedir}/gtest{,/internal},%{_libdir}}
# just for backward compatibility # just for backward compatibility
install -p -m 0755 build/libgtest.so.*.* build/libgtest_main.so.*.* $RPM_BUILD_ROOT%{_libdir}/ install -p -m 0755 build/libgtest.so.*.* build/libgtest_main.so.*.* %{buildroot}%{_libdir}/
(cd $RPM_BUILD_ROOT%{_libdir}; (cd %{buildroot}%{_libdir};
ln -sf libgtest.so.*.* $RPM_BUILD_ROOT%{_libdir}/libgtest.so ln -sf libgtest.so.*.* %{buildroot}%{_libdir}/libgtest.so
ln -sf libgtest_main.so.*.* $RPM_BUILD_ROOT%{_libdir}/libgtest_main.so ln -sf libgtest_main.so.*.* %{buildroot}%{_libdir}/libgtest_main.so
) )
/sbin/ldconfig -n $RPM_BUILD_ROOT%{_libdir} /sbin/ldconfig -n %{buildroot}%{_libdir}
install -p -m 0755 scripts/gtest-config $RPM_BUILD_ROOT%{_bindir} install -D -p -m 0755 scripts/gtest-config %{buildroot}%{_bindir}/gtest-config
install -p -m 0644 include/gtest/*.h $RPM_BUILD_ROOT%{_includedir}/gtest/ install -p -m 0644 include/gtest/*.h %{buildroot}%{_includedir}/gtest/
install -p -m 0644 include/gtest/internal/*.h $RPM_BUILD_ROOT%{_includedir}/gtest/internal/ install -p -m 0644 include/gtest/internal/*.h %{buildroot}%{_includedir}/gtest/internal/
install -p -m 0644 m4/gtest.m4 $RPM_BUILD_ROOT%{_datadir}/aclocal/ install -D -p -m 0644 m4/gtest.m4 %{buildroot}%{_datadir}/aclocal/gtest.m4
%clean
rm -rf $RPM_BUILD_ROOT
%post -p /sbin/ldconfig %post -p /sbin/ldconfig
%postun -p /sbin/ldconfig %postun -p /sbin/ldconfig
%files %files
%defattr(-, root, root, -) %doc CHANGES CONTRIBUTORS LICENSE README
%doc CHANGES CONTRIBUTORS COPYING README
%{_libdir}/libgtest.so.* %{_libdir}/libgtest.so.*
%{_libdir}/libgtest_main.so.* %{_libdir}/libgtest_main.so.*
%files devel %files devel
%defattr(-, root, root, -)
%doc samples %doc samples
%{_bindir}/gtest-config %{_bindir}/gtest-config
%{_datadir}/aclocal/gtest.m4 %{_datadir}/aclocal/gtest.m4
@ -94,6 +91,9 @@ rm -rf $RPM_BUILD_ROOT
%{_includedir}/gtest %{_includedir}/gtest
%changelog %changelog
* Tue Jul 22 2014 Terje Rosten <terje.rosten@ntnu.no> - 1.7.0-1
- 1.7.0
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.6.0-5 * Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.6.0-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
@ -133,7 +133,7 @@ rm -rf $RPM_BUILD_ROOT
- 1.5.0 - 1.5.0
- some cleanup - some cleanup
* Sat Aug 26 2010 Dan Horák <dan[at]danny.cz> - 1.4.0-2 * Thu Aug 26 2010 Dan Horák <dan[at]danny.cz> - 1.4.0-2
- added workaround for linking the tests on Fedora >= 13 (#564953, #599865) - added workaround for linking the tests on Fedora >= 13 (#564953, #599865)
* Sat Nov 14 2009 Debarshi Ray <rishi@fedoraproject.org> - 1.4.0-1 * Sat Nov 14 2009 Debarshi Ray <rishi@fedoraproject.org> - 1.4.0-1

@ -1 +1 @@
4577b49f2973c90bf9ba69aa8166b786 gtest-1.6.0.zip 2d6ec8ccdf5c46b05ba54a9fd1d130d7 gtest-1.7.0.zip

Loading…
Cancel
Save