3dad48f
Summary:        Google C++ testing framework
3dad48f
Name:           gtest
bebbcad
Version:        1.6.0
bebbcad
Release:        1%{?dist}
3dad48f
License:        BSD
3dad48f
Group:          Development/Tools
3dad48f
URL:            http://code.google.com/p/googletest/
bebbcad
Source0:        http://googletest.googlecode.com/files/gtest-%{version}.zip
bebbcad
Patch0:         gtest-soname.patch
bebbcad
BuildRequires:  python cmake libtool
3dad48f
BuildRoot:      %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
4dd007b
4dd007b
%description
25bce21
Google's framework for writing C++ tests on a variety of platforms
25bce21
(GNU/Linux, Mac OS X, Windows, Windows CE, and Symbian). Based on the
25bce21
xUnit architecture. Supports automatic test discovery, a rich set of
25bce21
assertions, user-defined assertions, death tests, fatal and non-fatal
25bce21
failures, various options for running the tests, and XML test report
25bce21
generation.
25bce21
25bce21
%package        devel
e30424b
Summary:        Development files for %{name}
e30424b
Group:          Development/Libraries
e30424b
Requires:       automake
e30424b
Requires:       %{name} = %{version}-%{release}
4dd007b
25bce21
%description    devel
4dd007b
This package contains development files for %{name}.
4dd007b
4dd007b
%prep
4dd007b
%setup -q
bebbcad
%patch0 -p1 -b .0-soname
4dd007b
25bce21
# keep a clean copy of samples.
4dd007b
cp -pr ./samples ./samples.orig
4dd007b
4dd007b
%build
bebbcad
# this is odd but needed only to generate gtest-config.
bebbcad
%configure
bebbcad
mkdir build
bebbcad
cd build
bebbcad
cmake -DBUILD_SHARED_LIBS=ON -DCMAKE_SKIP_BUILD_RPATH=TRUE -DPYTHON_EXECUTABLE=%{__python} -Dgtest_build_tests=ON ..
bebbcad
4dd007b
make %{?_smp_mflags}
4dd007b
4dd007b
%check
bebbcad
LD_LIBRARY_PATH=$RPM_BUILD_DIR/%{name}-%{version}/build make test
4dd007b
4dd007b
# Restore the clean copy of samples.
25bce21
# To be later listed against doc.
4dd007b
rm -rf ./samples
4dd007b
mv ./samples.orig ./samples
4dd007b
4dd007b
%install
25bce21
rm -rf %{buildroot}
bebbcad
# make install doesn't work anymore.
bebbcad
# need to install them manually.
bebbcad
install -d $RPM_BUILD_ROOT{%{_bindir},%{_datadir}/aclocal,%{_includedir}/gtest{,/internal},%{_libdir}}
bebbcad
# just for backward compatibility
bebbcad
install -p -m 0755 build/libgtest.so.*.* build/libgtest_main.so.*.* $RPM_BUILD_ROOT%{_libdir}/
bebbcad
(cd $RPM_BUILD_ROOT%{_libdir};
bebbcad
ln -sf libgtest.so.*.* $RPM_BUILD_ROOT%{_libdir}/libgtest.so
bebbcad
ln -sf libgtest_main.so.*.* $RPM_BUILD_ROOT%{_libdir}/libgtest_main.so
bebbcad
)
bebbcad
/sbin/ldconfig -n $RPM_BUILD_ROOT%{_libdir}
bebbcad
install -p -m 0755 scripts/gtest-config $RPM_BUILD_ROOT%{_bindir}
bebbcad
install -p -m 0644 include/gtest/*.h $RPM_BUILD_ROOT%{_includedir}/gtest/
bebbcad
install -p -m 0644 include/gtest/internal/*.h $RPM_BUILD_ROOT%{_includedir}/gtest/internal/
bebbcad
install -p -m 0644 m4/gtest.m4 $RPM_BUILD_ROOT%{_datadir}/aclocal/
4dd007b
4dd007b
%clean
25bce21
rm -rf %{buildroot}
4dd007b
4dd007b
%post -p /sbin/ldconfig
4dd007b
4dd007b
%postun -p /sbin/ldconfig
4dd007b
4dd007b
%files
25bce21
%defattr(-, root, root, -)
25bce21
%doc CHANGES CONTRIBUTORS COPYING README
4dd007b
%{_libdir}/libgtest.so.*
4dd007b
%{_libdir}/libgtest_main.so.*
4dd007b
4dd007b
%files devel
25bce21
%defattr(-, root, root, -)
4dd007b
%doc samples
25bce21
%{_bindir}/gtest-config
25bce21
%{_datadir}/aclocal/gtest.m4
4dd007b
%{_libdir}/libgtest.so
4dd007b
%{_libdir}/libgtest_main.so
25bce21
%{_includedir}/gtest
4dd007b
4dd007b
%changelog
bebbcad
* Fri Sep 28 2012 Akira TAGOH <tagoh@redhat.com> - 1.6.0-1
bebbcad
- New upstream release.
bebbcad
- Using autotools isn't supported in upstream anymore. switching to cmake.
bebbcad
- undefined reference issues seems gone now. (#813825)
bebbcad
4c2da6c
* Thu Jul 19 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.5.0-7
4c2da6c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
4c2da6c
4f7d8a8
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.5.0-6
4f7d8a8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
4f7d8a8
f5f928d
* Thu Sep 15 2011 Akira TAGOH <tagoh@redhat.com> j- 1.5.0-5
f5f928d
- Fix FTBFS issue; update libtool files instead of disabling rpath things.
f5f928d
e30424b
* Sun Mar 20 2011 Terje Rosten <terje.rosten@ntnu.no> - 1.5.0-4
e30424b
- add patch from Dan Horák to let 'make check' work 
e30424b
55f9f20
* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.5.0-3
55f9f20
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
55f9f20
3dad48f
* Sun Jan 16 2011 Terje Rosten <terje.rosten@ntnu.no> - 1.5.0-2
e30424b
- add python to buildreq 
3dad48f
25bce21
* Wed Jan 12 2011 Terje Rosten <terje.rosten@ntnu.no> - 1.5.0-1
25bce21
- 1.5.0
25bce21
- some cleanup
25bce21
1587cea
* Sat Aug 26 2010 Dan Horák <dan[at]danny.cz> - 1.4.0-2
1587cea
- added workaround for linking the tests on Fedora >= 13 (#564953, #599865)
1587cea
328b47a
* Sat Nov 14 2009 Debarshi Ray <rishi@fedoraproject.org> - 1.4.0-1
328b47a
- Version bump to 1.4.0.
328b47a
  * New feature: the event listener API.
328b47a
  * New feature: test shuffling.
328b47a
  * New feature: the XML report format is closer to junitreport and can
328b47a
    be parsed by Hudson now.
328b47a
  * New feature: elapsed time for the tests is printed by default.
328b47a
  * New feature: comes with a TR1 tuple implementation such that Boost
328b47a
    is no longer needed for Combine().
328b47a
  * New feature: EXPECT_DEATH_IF_SUPPORTED macro and friends.
328b47a
  * New feature: the Xcode project can now produce static gtest libraries in
328b47a
    addition to a framework.
328b47a
  * Compatibility fixes for gcc and minGW.
328b47a
  * Bug fixes and implementation clean-ups.
328b47a
328b47a
* Fri Jul 24 2009 Release Engineering <rel-eng@fedoraproject.org> - 1.3.0-2.20090601svn257
328b47a
- Autorebuild for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
328b47a
328b47a
* Mon Jun 01 2009 Tom "spot" Callaway <tcallawa@redhat.com> - 1.3.0-1
328b47a
- Version bump to 1.3.0.
328b47a
  * New feature: ability to use Google Test assertions in other testing
328b47a
    frameworks.
328b47a
  * New feature: ability to run disabled test via
328b47a
    --gtest_also_run_disabled_tests.
328b47a
  * New feature: the --help flag for printing the usage.
328b47a
  * New feature: access to Google Test flag values in user code.
328b47a
  * New feature: a script that packs Google Test into one .h and one .cc file
328b47a
    for easy deployment.
328b47a
  * New feature: support for distributing test functions to multiple machines
328b47a
    (requires support from the test runner).
328b47a
  * Bug fixes and implementation clean-ups.
7a82fd8
6bba973
* Tue Feb 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.0-2
6bba973
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
6bba973
4dd007b
* Sat Jul 05 2008 Debarshi Ray <rishi@fedoraproject.org> - 1.0.0-1
4dd007b
- Initial build.