96 lines
3.1 KiB
RPMSpec
96 lines
3.1 KiB
RPMSpec
|
#
|
||
|
# spec file for package [spectemplate]
|
||
|
#
|
||
|
# Copyright (c) 2010 SUSE LINUX Products 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/
|
||
|
#
|
||
|
|
||
|
# norootforbuild
|
||
|
|
||
|
Name: gtest
|
||
|
Version: 1.6.0
|
||
|
Release: 1
|
||
|
Summary: Google C++ Testing Framework
|
||
|
Group: Development/Libraries/C and C++
|
||
|
License: New BSD
|
||
|
URL: http://code.google.com/p/googletest/
|
||
|
Source0: gtest-%{version}.zip
|
||
|
|
||
|
BuildRequires: unzip, gcc-c++, python, cmake
|
||
|
#Requires:
|
||
|
|
||
|
%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 devel
|
||
|
Summary: Development files for googletest
|
||
|
Requires: %{name} = %{version}-%{release}
|
||
|
|
||
|
%description devel
|
||
|
The %{name}-devel package contains libraries and header files for
|
||
|
developing applications that use googletest.
|
||
|
|
||
|
|
||
|
%prep
|
||
|
%setup -q -n gtest-%{version}
|
||
|
|
||
|
|
||
|
%build
|
||
|
mkdir mybuild
|
||
|
pushd .
|
||
|
cd mybuild
|
||
|
cmake -DGTEST_HAS_PTHREAD=1 ../
|
||
|
# if create shared library (DLL):
|
||
|
# cmake -Dgtest_build_tests=ON -DGTEST_CREATE_SHARED_LIBRARY=1 -DGTEST_HAS_PTHREAD=1 ../
|
||
|
make %{?_smp_mflags}
|
||
|
popd
|
||
|
|
||
|
%install
|
||
|
#make install DESTDIR=%{buildroot}
|
||
|
#find %{buildroot} -name '*.la' -exec rm -f {} ';'
|
||
|
%{__install} -m 755 -d %{buildroot}%{_libdir}/
|
||
|
%{__install} -m 644 mybuild/libgtest.a %{buildroot}%{_libdir}/
|
||
|
%{__install} -m 644 mybuild/libgtest_main.a %{buildroot}%{_libdir}/
|
||
|
#{__install} -m 644 mybuild/libgtest.so* %{buildroot}%{_libdir}/
|
||
|
#{__install} -m 644 mybuild/libgtest_main.so* %{buildroot}%{_libdir}/
|
||
|
%{__install} -m 755 -d %{buildroot}%{_includedir}/gtest/internal
|
||
|
%{__install} -m 644 include/gtest/*.h %{buildroot}%{_includedir}/gtest/
|
||
|
%{__install} -m 644 include/gtest/internal/*.h %{buildroot}%{_includedir}/gtest/internal/
|
||
|
|
||
|
%clean
|
||
|
rm -rf %{buildroot}
|
||
|
|
||
|
|
||
|
#post -p /sbin/ldconfig
|
||
|
|
||
|
#postun -p /sbin/ldconfig
|
||
|
|
||
|
%files
|
||
|
%defattr(-, root, root)
|
||
|
%doc README COPYING CONTRIBUTORS CHANGES
|
||
|
#{_libdir}/libgtest.so.*
|
||
|
#{_libdir}/libgtest_main.so.*
|
||
|
|
||
|
%files devel
|
||
|
%defattr(-, root, root)
|
||
|
%dir %{_includedir}/gtest/
|
||
|
%{_includedir}/gtest/*.h
|
||
|
%dir %{_includedir}/gtest/internal/
|
||
|
%dir %{_includedir}/gtest/internal/*.h
|
||
|
%{_libdir}/libgtest.a
|
||
|
%{_libdir}/libgtest_main.a
|
||
|
#{_libdir}/libgtest.so
|
||
|
#{_libdir}/libgtest_main.so
|
||
|
|
||
|
%changelog
|