]> git.pld-linux.org Git - packages/gmock.git/commitdiff
- new auto/th/gmock-1.6.0-1
authorJan Rękorajski <baggins@pld-linux.org>
Thu, 29 Aug 2013 18:13:34 +0000 (20:13 +0200)
committerJan Rękorajski <baggins@pld-linux.org>
Thu, 29 Aug 2013 18:13:34 +0000 (20:13 +0200)
gmock.spec [new file with mode: 0644]
install.patch [new file with mode: 0644]

diff --git a/gmock.spec b/gmock.spec
new file mode 100644 (file)
index 0000000..0bd2953
--- /dev/null
@@ -0,0 +1,69 @@
+Summary:       Google C++ Mocking Framework
+Name:          gmock
+Version:       1.6.0
+Release:       1
+License:       BSD
+Group:         Development/Libraries
+Source0:       https://googlemock.googlecode.com/files/%{name}-%{version}.zip
+# Source0-md5: f547f47321ca88d3965ca2efdcc2a3c1
+Patch0:                install.patch
+URL:           http://code.google.com/p/googlemock/
+BuildRequires: autoconf
+BuildRequires: automake
+BuildRequires: gtest-devel >= 1.5.0
+BuildRequires: libtool
+BuildRequires: python
+BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%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.
+
+Google Mock:
+
+ o lets you create mock classes trivially using simple macros,
+ o supports a rich set of matchers and actions,
+ o handles unordered, partially ordered, or completely ordered
+   expectations,
+ o is extensible by users, and
+ o works on Linux, Mac OS X, Windows, Windows Mobile, minGW, and
+   Symbian.
+
+%prep
+%setup -q
+%patch0 -p1
+
+%build
+%{__aclocal}
+%{__autoconf}
+%{__automake}
+%{__autoheader}
+%configure
+
+%{__make}
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+%{__make} -j1 install \
+       INSTALL="%{__install} -p" \
+       DESTDIR=$RPM_BUILD_ROOT
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%post -p /sbin/ldconfig
+%postun -p /sbin/ldconfig
+
+%files
+%defattr(644,root,root,755)
+%doc CHANGES CONTRIBUTORS COPYING README
+%attr(755,root,root) %{_bindir}/gmock-config
+%{_includedir}/%{name}
+%{_npkgconfigdir}/*
+%dir %{_datadir}/%{name}/generator
+%attr(755,root,root) %{_datadir}/%{name}/generator/gmock_gen.py
+%dir %{_datadir}/%{name}/generator/cpp
+%attr(755,root,root) %{_datadir}/%{name}/generator/cpp/*.py
+%{_prefix}/src/%{name}
diff --git a/install.patch b/install.patch
new file mode 100644 (file)
index 0000000..8a16d16
--- /dev/null
@@ -0,0 +1,99 @@
+diff --git a/Makefile.am b/Makefile.am
+index adc21d7..2077654 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -7,6 +7,9 @@ EXTRA_DIST =
+ # included in the 'subdirs' variable.
+ SUBDIRS = $(subdirs)
++
++bin_SCRIPTS = scripts/gmock-config
++
+ # This is generated by the configure script, so clean it for distribution.
+ DISTCLEANFILES = scripts/gmock-config
+@@ -21,10 +24,13 @@ if HAVE_PTHREADS
+ endif
+ # Build rules for libraries.
+-lib_LTLIBRARIES = lib/libgmock.la lib/libgmock_main.la
++check_LTLIBRARIES = lib/libgmock.la lib/libgmock_main.la
+-lib_libgmock_la_SOURCES = src/gmock-all.cc
++nodist_lib_libgmock_la_SOURCES = src/gmock-all.cc
++pkgconfigdir = $(datadir)/pkgconfig
++pkgconfig_DATA = gmock.pc
++  
+ pkginclude_HEADERS = \
+   include/gmock/gmock-actions.h \
+   include/gmock/gmock-cardinalities.h \
+@@ -43,7 +49,7 @@ pkginclude_internal_HEADERS = \
+   include/gmock/internal/gmock-internal-utils.h \
+   include/gmock/internal/gmock-port.h
+-lib_libgmock_main_la_SOURCES = src/gmock_main.cc
++nodist_lib_libgmock_main_la_SOURCES = src/gmock_main.cc
+ lib_libgmock_main_la_LIBADD = lib/libgmock.la
+ # Build rules for tests. Automake's naming for some of these variables isn't
+@@ -178,8 +184,8 @@ $(test_gmock_fused_test_SOURCES): fused-gmock-internal
+ # TODO(vladl@google.com): Find a way to add Google Tests's sources here.
+ fused-gmock-internal: $(pkginclude_HEADERS) $(pkginclude_internal_HEADERS) \
+-                      $(lib_libgmock_la_SOURCES) $(GMOCK_SOURCE_INGLUDES) \
+-                      $(lib_libgmock_main_la_SOURCES) \
++                      $(nodist_lib_libgmock_la_SOURCES) $(GMOCK_SOURCE_INGLUDES) \
++                      $(nodist_lib_libgmock_main_la_SOURCES) \
+                       scripts/fuse_gmock_files.py
+       mkdir -p "$(srcdir)/fused-src"
+       chmod -R u+w "$(srcdir)/fused-src"
+@@ -200,10 +206,8 @@ CLEANFILES = core
+ # Mock can lead to undefined behavior due to violation of the
+ # One-Definition Rule.
+-install-exec-local:
+-      echo "'make install' is dangerous and not supported. Instead, see README for how to integrate Google Mock into your build system."
+-      false
+-
+-install-data-local:
+-      echo "'make install' is dangerous and not supported. Instead, see README for how to integrate Google Mock into your build system."
+-      false
++install-exec-hook:
++      mkdir -p $(DESTDIR)$(datadir)/@PACKAGE@ $(DESTDIR)$(prefix)/src/@PACKAGE@
++      cp -rf scripts/generator $(DESTDIR)$(datadir)/@PACKAGE@
++      cp -f src/* $(DESTDIR)$(prefix)/src/@PACKAGE@
++      sed -i s/src[/]//g $(DESTDIR)$(prefix)/src/@PACKAGE@/gmock-all.cc
+diff --git a/configure.ac b/configure.ac
+index e8b65bd..9ec7743 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -10,7 +10,7 @@ AC_PREREQ([2.59])
+ AC_CONFIG_SRCDIR([./COPYING])
+ AC_CONFIG_AUX_DIR([build-aux])
+ AC_CONFIG_HEADERS([build-aux/config.h])
+-AC_CONFIG_FILES([Makefile])
++AC_CONFIG_FILES([Makefile gmock.pc])
+ AC_CONFIG_FILES([scripts/gmock-config], [chmod +x scripts/gmock-config])
+ # Initialize Automake with various options. We require at least v1.9, prevent
+diff --git a/gmock.pc.in b/gmock.pc.in
+new file mode 100644
+index 0000000..da4b6c4
+--- /dev/null
++++ b/gmock.pc.in
+@@ -0,0 +1,14 @@
++#############################
++# Pkg-Config file for gmock #
++#############################
++
++Name: gmock
++Description: Google C++ mocking framework
++URL: https://code.google.com/p/googlemock/
++Version: @VERSION@
++
++prefix=@prefix@
++includedir=@includedir@
++srcdir=@prefix@/src/gmock
++
++Cflags: -I${includedir}/gmock
This page took 0.105923 seconds and 4 git commands to generate.