LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File gmock.spec of Package gmock (Project GNOME:Ayatana)

%define soname	0

Name:		gmock
Version:	1.6.0
Release:	1
License:	BSD-3-Clause
Summary:	Google C++ Mocking Framework
Url:		http://code.google.com/p/googletest
Group:		Development/Libraries/C and C++
Source:		http://googlemock.googlecode.com/files/gmock-1.6.0.zip

Patch0:		0001_Allow_make_install.patch

BuildRequires:	autoconf
BuildRequires:	automake
BuildRequires:  gcc-c++
BuildRequires:	libtool
BuildRequires:	unzip

BuildRequires:	libgtest-devel
#BuildRequires:  pkgconfig(pthread-stubs)
BuildRequires:	pkgconfig(python2)

%description
Inspired by jMock, EasyMock, and Hamcrest, and designed with C++'s specifics in
mind, Google C++ Mocking Framework (or Google Mock for short) is a library for
writing and using C++ mock classes.


%package -n libgmock%{soname}
Summary:	Google C++ Mocking Framework - Shared Libraries
Group:		System/Libraries

%description -n libgmock%{soname}
Inspired by jMock, EasyMock, and Hamcrest, and designed with C++'s specifics in
mind, Google C++ Mocking Framework (or Google Mock for short) is a library for
writing and using C++ mock classes.


%package -n libgmock-devel
Summary:	Google C++ Mocking Framework - Development Files
Group:		Development/Libraries/C and C++
Requires:	libgmock%{soname} = %{version}-%{release}

%description -n libgmock-devel
Inspired by jMock, EasyMock, and Hamcrest, and designed with C++'s specifics in
mind, Google C++ Mocking Framework (or Google Mock for short) is a library for
writing and using C++ mock classes.


%prep
%setup -q

%patch0 -p1

autoreconf -vfi


%build
%configure --disable-static --enable-external-gtest
make %{?_smp_mflags}


%install
%make_install

# Remove libtool files
find $RPM_BUILD_ROOT%{_libdir} -name "*.la" -print -type f -delete

# Remove bundled gtest
rm -v $RPM_BUILD_ROOT%{_libdir}/libgtest*
rm -rv $RPM_BUILD_ROOT%{_includedir}/gtest/
rm -v $RPM_BUILD_ROOT%{_datadir}/aclocal/gtest.m4


%post -n libgmock%{soname} -p /sbin/ldconfig

%postun -n libgmock%{soname} -p /sbin/ldconfig


%files -n libgmock%{soname}
%defattr(-,root,root)
%doc CHANGES CONTRIBUTORS COPYING README
%{_libdir}/libgmock.so.%{soname}*
%{_libdir}/libgmock_main.so.%{soname}*


%files -n libgmock-devel
%defattr(-,root,root)
%{_includedir}/gmock/
%{_libdir}/libgmock.so
%{_libdir}/libgmock_main.so


%changelog
* Tue Aug 21 2012 Xiao-Long Chen <chenxiaolong@cxl.epac.to> - 1.6.0-1
- Fix license tag
- Fix package names
- Remove bundled gtest