# # spec file for package googletest # # Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via http://bugs.opensuse.org/ # %define libname lib%{name}0 Name: googletest Version: 1.7.0 Release: 0 Summary: Google C++ Testing Framework License: BSD-3-Clause Group: Development/Libraries/C and C++ Url: http://code.google.com/p/googletest/ Source0: https://googletest.googlecode.com/files/gtest-%{version}.zip #PATCH-FIX-UPSTREAM marguerite@opensuse.org Google thinks `make install` #is dangerous, but I don't think so. Patch0: googletest-enable-make-install.patch BuildRequires: gcc-c++ BuildRequires: libtool BuildRequires: python BuildRequires: unzip BuildRoot: %{_tmppath}/%{name}-%{version}-build %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: Google C++ Testing Framework Group: Development/Libraries/C and C++ Provides: %{name} = %{version} Obsoletes: %{name} < %{version} %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. %package devel Summary: Development files for googletest Group: Development/Libraries/C and C++ Requires: %{libname} = %{version} %description devel The %{name}-devel package contains libraries and header files for developing applications that use googletest. %prep %setup -q -n gtest-%{version} %patch0 -p1 autoreconf -fi %build %configure \ --enable-static=no make %{?_smp_mflags} %if 0%{?suse_version} > 1310 %check make check %{?_smp_mflags} %endif %install make DESTDIR=%{buildroot} install %{?_smp_mflags} mkdir -p %{buildroot}%{_bindir} install -m 755 scripts/gtest-config %{buildroot}%{_bindir} find %{buildroot} -type f -name "*.la" -delete -print %post -n %{libname} -p /sbin/ldconfig %postun -n %{libname} -p /sbin/ldconfig %files -n %{libname} %defattr(-, root, root) %doc README LICENSE CONTRIBUTORS CHANGES %{_libdir}/libgtest.so.0 %{_libdir}/libgtest.so.0.0.0 %{_libdir}/libgtest_main.so.0 %{_libdir}/libgtest_main.so.0.0.0 %files devel %defattr(-, root, root) %{_bindir}/gtest-config %{_includedir}/gtest %{_libdir}/libgtest.so %{_libdir}/libgtest_main.so %{_datadir}/aclocal/gtest.m4 %changelog