- Add %check section and conditionally build with tests.

This commit is contained in:
Michael Schwendt 2009-08-22 10:42:57 +00:00
parent a95e584649
commit ab38c0c224
2 changed files with 31 additions and 1 deletions

11
taglib-1.5-tests.patch Normal file
View File

@ -0,0 +1,11 @@
diff -Nur taglib-1.5-orig/tests/test_string.cpp taglib-1.5/tests/test_string.cpp
--- taglib-1.5-orig/tests/test_string.cpp 2008-01-26 11:57:06.000000000 +0100
+++ taglib-1.5/tests/test_string.cpp 2009-08-22 11:17:55.000000000 +0200
@@ -24,6 +24,7 @@
#include <cppunit/extensions/HelperMacros.h>
#include <tstring.h>
+#include <cstring>
using namespace std;
using namespace TagLib;

View File

@ -1,6 +1,12 @@
# Fedora cvs admin requests for taglib: http://bugzilla.redhat.com/418271
%bcond_without tests
%if %{with tests}
%global buildtests -DBUILD_TESTS=ON
%endif
Name: taglib
Version: 1.5
Release: 6%{?dist}
@ -21,6 +27,8 @@ Patch1: taglib-1.5b1-multilib.patch
# try 2, kiss omit -L%_libdir
Patch2: taglib-1.5rc1-multilib.patch
Patch3: taglib-1.5-tests.patch
## upstream patches
Patch100: taglib-1.5-kde#161721.patch
@ -47,16 +55,18 @@ Files needed when building software with %{name}.
%prep
%setup -q -n taglib-%{version}%{?beta}
# patch1 not applied
## omit for now
%patch2 -p1 -b .multilib
%patch3 -p1 -b .tests
%patch100 -p1 -b .kde#161721.patch
%build
mkdir -p %{_target_platform}
pushd %{_target_platform}
%{cmake} ..
%{cmake} %{?buildtests} ..
popd
make %{?_smp_mflags} -C %{_target_platform}
@ -72,6 +82,14 @@ rm -fr examples/Makefile*
rm -f %{buildroot}%{_libdir}/lib*.la
%if %{with tests}
%check
cp -a tests/data %{_target_platform}/tests
cd %{_target_platform}
make check
%endif
%clean
rm -rf %{buildroot}
@ -97,6 +115,7 @@ rm -rf %{buildroot}
%changelog
* Sat Aug 22 2009 Michael Schwendt <mschwendt@fedoraproject.org> - 1.5-6
- Add %%check section and conditionally build with tests.
- Update descriptions (and mention the additional file formats).
* Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.5-5