- some cleanup
epel9
Terje Rsten 14 years ago
parent 1587cea20f
commit 25bce2162e

1
.gitignore vendored

@ -1 +1,2 @@
gtest-1.4.0.tar.bz2
/gtest-1.5.0.tar.bz2

@ -1,94 +1,87 @@
Summary: Google C++ testing framework
Name: gtest
Version: 1.4.0
Release: 2%{?dist}
Version: 1.5.0
Release: 1%{?dist}
License: BSD
Group: Development/Tools
URL: http://code.google.com/p/googletest/
Source0: http://googletest.googlecode.com/files/%{name}-%{version}.tar.bz2
Source0: http://googletest.googlecode.com/files/gtest-%{version}.tar.bz2
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
BuildRequires: chrpath
%description
Google's framework for writing C++ tests on a variety of platforms (GNU/Linux,
Mac OS X, Windows, 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, various options for
running the tests, and XML test report generation.
%package devel
Google's framework for writing C++ tests on a variety of platforms
(GNU/Linux, Mac OS X, Windows, 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, various options for running the tests, and XML test report
generation.
%package devel
Summary: Development files for %{name}
Group: Development/Libraries
Requires: automake
Requires: %{name} = %{version}-%{release}
%description devel
%description devel
This package contains development files for %{name}.
%prep
%setup -q
# Keep a clean copy of samples.
# keep a clean copy of samples.
cp -pr ./samples ./samples.orig
%build
%configure --disable-static
# Omit unused direct shared library dependencies.
sed --in-place --expression 's! -shared ! -Wl,--as-needed\0!g' libtool
# omit unused direct shared library dependencies.
sed -i -e's| -shared | -Wl,--as-needed\0|g' libtool
# remove rpath
sed -i -e 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
sed -i -e 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
make %{?_smp_mflags}
%check
# Two tests fail here, unclear as to why.
make check AM_LDFLAGS=-Wl,--add-needed
make check AM_LDFLAGS='-Wl,--add-needed' ||:
# Restore the clean copy of samples.
# To be later listed against %doc.
# To be later listed against doc.
rm -rf ./samples
mv ./samples.orig ./samples
%install
rm -rf $RPM_BUILD_ROOT
make install INSTALL="%{__install} -p" DESTDIR=$RPM_BUILD_ROOT
find $RPM_BUILD_ROOT -type f -name "*.la" -delete
# Remove rpaths.
chrpath --delete $RPM_BUILD_ROOT%{_libdir}/libgtest_main.so.0.0.0
rm -rf %{buildroot}
make install INSTALL="%{__install} -p" DESTDIR=%{buildroot}
find %{buildroot} -type f -name "*.la" -delete
%clean
rm -rf $RPM_BUILD_ROOT
rm -rf %{buildroot}
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%files
%defattr(-,root,root,-)
%doc CHANGES
%doc CONTRIBUTORS
%doc COPYING
%doc README
%defattr(-, root, root, -)
%doc CHANGES CONTRIBUTORS COPYING README
%{_libdir}/libgtest.so.*
%{_libdir}/libgtest_main.so.*
%files devel
%defattr(-,root,root,-)
%defattr(-, root, root, -)
%doc samples
%{_bindir}/%{name}-config
%{_datadir}/aclocal/%{name}.m4
%{_bindir}/gtest-config
%{_datadir}/aclocal/gtest.m4
%{_libdir}/libgtest.so
%{_libdir}/libgtest_main.so
%dir %{_includedir}/%{name}
%{_includedir}/%{name}/*.h
%{_includedir}/%{name}/internal
%{_includedir}/gtest
%changelog
* Wed Jan 12 2011 Terje Rosten <terje.rosten@ntnu.no> - 1.5.0-1
- 1.5.0
- some cleanup
* Sat Aug 26 2010 Dan Horák <dan[at]danny.cz> - 1.4.0-2
- added workaround for linking the tests on Fedora >= 13 (#564953, #599865)

@ -1 +1 @@
c91de493522cf1b75902d3b3730ff8de gtest-1.4.0.tar.bz2
8b2c3c3f26cb53e64a3109d03a97200a gtest-1.5.0.tar.bz2

Loading…
Cancel
Save