Blob Blame History Raw
Name:           cxxtest
Version:        4.3
Release:        3%{?dist}
Summary:        A JUnit-like testing framework for C++

Group:          Development/Tools
License:        LGPLv3
URL:            http://cxxtest.com
Source0:        http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz

BuildArch:      noarch

BuildRequires:  asciidoc >= 8.5.0
BuildRequires:  dblatex
BuildRequires:  python2-devel
BuildRequires:  texlive-multirow

%description
CxxTest is a unit testing framework for C++ that is similar in spirit to
JUnit, CppUnit, and xUnit. CxxTest is easy to use because it does not require
precompiling a CxxTest testing library, it employs no advanced features of
C++ (e.g. RTTI) and it supports a very flexible form of test discovery.


%package doc
Summary:        Documentation on how to use CxxTest
Group:          Documentation
Requires:       %{name} = %{version}-%{release}

%description doc
This package contains the documentation on how to use CxxTest.
It also provides code examples.


%prep
%setup -q

rm -f doc/images/icons/README
#remove Windows-related stuff
rm -rf sample/msvc/
rm -f sample/Makefile.bcc32

find . -name ".cvsignore" -delete


%build
cd python
CFLAGS="%{optflags}" %{__python} setup.py build

# create pkgconfig file
cd ..
cat <<EOF >%{name}.pc
prefix=%{_prefix}
exec_prefix=%{_prefix}
includedir=%{_includedir}/%{name}

Name: %{name}
Description: A JUnit-like testing framework for C++
Version: %{version}
Cflags: -I\${includedir}
EOF

cd doc

# script to create asciidoc file for manpage of cxxtestgen
cat <<EOF >create_manpage.py
import sys
if sys.version_info < (3,0):
	sys.path.insert(0, '../python')
else:
	sys.path.insert(0, '../python/python3') 
import cxxtest
cxxtest.create_manpage()
EOF

# create manpage
%{__python} create_manpage.py
a2x -f manpage cxxtestgen.1.txt

# build documentation in PDF and HTML (requires asciidoc >= 8.5.0)
make pdf html


%install
mkdir -p %{buildroot}%{_includedir}/cxxtest
install -D -p -m 644 cxxtest/* %{buildroot}%{_includedir}/cxxtest
install -D -p -m 644 %{name}.pc %{buildroot}%{_datadir}/pkgconfig/%{name}.pc
cd python
%{__python} setup.py install --skip-build --root %{buildroot}

%if 0%{?fedora} < 19 || 0%{?rhel} == 6
# add symlink present in previous release of cxxtest
ln -s %{_bindir}/cxxtestgen %{buildroot}%{_bindir}/cxxtestgen.py
%endif

cd ..
install -D -p -m 644 doc/cxxtestgen.1 %{buildroot}%{_mandir}/man1/cxxtestgen.1


%files
%doc COPYING README Versions
%{_bindir}/cxxtestgen*
%{_includedir}/%{name}/
%{_datadir}/pkgconfig/%{name}.pc
%{_mandir}/man1/cxxtestgen.1*
%{python_sitelib}/%{name}/
%{python_sitelib}/%{name}-*.egg-info


%files doc
%doc doc/guide.pdf doc/guide.html doc/images/
%doc sample/


%changelog
* Sat Aug 03 2013 Petr Pisar <ppisar@redhat.com> - 4.3-3
- Perl 5.18 rebuild

* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.3-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild

* Mon Jul 22 2013 Martin Gieseking <martin.gieseking@uos.de> 4.3-1
- updated to release 4.3

* Wed Jul 17 2013 Petr Pisar <ppisar@redhat.com> - 4.2.1-2
- Perl 5.18 rebuild

* Fri Apr 12 2013 Martin Gieseking <martin.gieseking@uos.de> 4.2.1-1
- updated to release 4.2.1 which fixes the license information in the source headers

* Wed Mar 20 2013 Martin Gieseking <martin.gieseking@uos.de> 4.2-1
- updated to release 4.2
- changed license to LGPLv3 as intended by upstream

* Fri Mar 15 2013 Martin Gieseking <martin.gieseking@uos.de> 4.1-4
- dropped generation of EPUB manual since it can't be build on koji

* Fri Mar 15 2013 Martin Gieseking <martin.gieseking@uos.de> 4.1-3
- added local pkgconfig file
- added documentation in HTML and EPUB format

* Tue Feb 05 2013 Martin Gieseking <martin.gieseking@uos.de> 4.1-2
- removed broken HTML documentation as it requires a more recent asciidoc (>= 8.5.0)
- build and add the PDF manual to the doc package
- addded symlink cxxtestgen.py to stay compatible with previous package (< f19 only)

* Wed Jan 23 2013 Martin Gieseking <martin.gieseking@uos.de> 4.1-1
- updated to release 4.1
- removed old EPEL stuff

* Wed Jul 18 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.10.1-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild

* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.10.1-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild

* Mon Dec 19 2011 Martin Gieseking <martin.gieseking@uos.de> - 3.10.1-5
- Fixed https://bugzilla.redhat.com/show_bug.cgi?id=768869

* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.10.1-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild

* Wed Aug 05 2009 Martin Gieseking <martin.gieseking@uos.de> - 3.10.1-3
- added exclude tags in files section

* Tue Aug 04 2009 Martin Gieseking <martin.gieseking@uos.de> - 3.10.1-2
- moved headers from devel to main package
- added BuildRequires to avoid build problems
- dropped Requires tag
- cxxtest include directory now explicitely listed in files section

* Tue Aug 04 2009 Martin Gieseking <martin.gieseking@uos.de> - 3.10.1-1
- initial release