%define major 0 %define libname %mklibname %{name} %{major} %define develname %mklibname %{name} -d Name: gtest Summary: Google's framework for writing C++ tests Version: 1.6.0 Release: %mkrel 2 License: BSD Group: Development/C++ URL: http://code.google.com/p/googletest/ Source0: http://googletest.googlecode.com/files/%{name}-%{version}.zip Patch0: gtest-1.6.0-soname.patch BuildRequires: python BuildRequires: cmake %description Google's framework for writing C++ tests on a variety of platforms (Linux, Mac OS X, Windows, Cygwin, Windows CE, and Symbian). Based on the xUnit architecture. Supports automatic test discovery, a rich set of assertions, user-defined assertions, death tests, fatal and non-fatal failures, value- and type-parameterized tests, various options for running the tests, and XML test report generation. %package -n %{libname} Summary: Shared libraries for %{name} Group: System/Libraries %description -n %{libname} Google's framework for writing C++ tests on a variety of platforms (Linux, Mac OS X, Windows, Cygwin, Windows CE, and Symbian). Based on the xUnit architecture. Supports automatic test discovery, a rich set of assertions, user-defined assertions, death tests, fatal and non-fatal failures, value- and type-parameterized tests, various options for running the tests, and XML test report generation. This package contains the shared %{name} libraries. %package -n %{develname} Summary: Development files for %{name} Group: Development/C++ Requires: %{libname} = %{version}-%{release} Provides: %{name}-devel = %{version}-%{release} Obsoletes: %{_lib}gtest-static-devel < 1.6.0 %description -n %{develname} This package contains development files for %{name}. %prep %setup -q %apply_patches %build %configure2_5x %cmake \ -Dgtest_build_samples=ON \ -DGTEST_CREATE_SHARED_LIBRARY=1 \ -DGTEST_LINKED_AS_SHARED_LIBRARY=1 %make %install #no %%makeinstall_std anymore :\ #dirs install -d %{buildroot}%{_bindir} install -d %{buildroot}%{_datadir}/aclocal install -d %{buildroot}%{_datadir}/aclocal install -d %{buildroot}%{_includedir}/%{name}/internal install -d %{buildroot}%{_libdir} #libs install -Dpm0755 build/*.so.* %{buildroot}%{_libdir}/ pushd %{buildroot}%{_libdir} ln -sf libgtest.so.*.* %{buildroot}%{_libdir}/libgtest.so ln -sf libgtest.so.*.* %{buildroot}%{_libdir}/libgtest.so.%{major} ln -sf libgtest_main.so.*.* %{buildroot}%{_libdir}/libgtest_main.so ln -sf libgtest_main.so.*.* %{buildroot}%{_libdir}/libgtest_main.so.%{major} popd #headers etc install -p -m 0755 scripts/gtest-config %{buildroot}%{_bindir} install -p -m 0644 include/gtest/*.h %{buildroot}%{_includedir}/gtest/ install -p -m 0644 include/gtest/internal/*.h %{buildroot}%{_includedir}/gtest/internal/ install -p -m 0644 m4/gtest.m4 %{buildroot}%{_datadir}/aclocal/ %check %make test %files -n %{libname} %doc README CHANGES CONTRIBUTORS %{_libdir}/lib%{name}*.so.%{major} %{_libdir}/lib%{name}*.so.%{major}.* %files -n %{develname} %doc samples %{_bindir}/%{name}-config %{_libdir}/lib%{name}*.so %{_includedir}/%{name} %{_datadir}/aclocal/%{name}.m4 %changelog * Sat Jan 12 2013 umeabot <umeabot> 1.6.0-2.mga3 + Revision: 352784 - Mass Rebuild - https://wiki.mageia.org/en/Feature:Mageia3MassRebuild * Mon Dec 31 2012 wally <wally> 1.6.0-1.mga3 + Revision: 336611 - new version 1.6.0 - change to cmake - sync with Fedora * Mon Mar 28 2011 ennael <ennael> 1.5.0-1.mga1 + Revision: 78333 - clean spec file - imported package gtest