cppunit/cppunit.spec
2022-11-21 21:03:21 +01:00

88 lines
2.2 KiB
RPMSpec

%global apiversion 1.15
Name: cppunit
Version: 1.15.1
Release: %autorelease
Summary: C++ unit testing framework
# no license in files
License: LGPL-2.1-or-later
Url: https://www.freedesktop.org/wiki/Software/cppunit/
Source: http://dev-www.libreoffice.org/src/%{name}-%{version}.tar.gz
BuildRequires: doxygen
BuildRequires: gcc-c++
BuildRequires: graphviz
BuildRequires: make
%description
CppUnit is the C++ port of the famous JUnit framework for unit testing.
Test output is in XML for automatic testing and GUI based for supervised
tests.
%package devel
Summary: Libraries and headers for cppunit development
Requires: %{name}%{?_isa} = %{version}-%{release}
%description devel
This package contains the libraries and headers necessary for developing
programs that use cppunit.
%package doc
Summary: HTML formatted API documention for cppunit
%description doc
The cppunit-doc package contains HTML formatted API documention generated by
the popular doxygen documentation generation tool.
%prep
%autosetup -p1
%build
%configure --enable-doxygen --disable-static --disable-silent-rules --disable-werror
sed -i \
-e 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' \
-e 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' \
libtool
%make_build
%install
%make_install
rm %{buildroot}%{_libdir}/*.la
# remove double of doc
rm -rf %{buildroot}%{_datadir}/doc/cppunit %{buildroot}%{_datadir}/%{name}/html
# clean up examples
rm -rf __dist-examples __dist-examples-dir
cp -a examples __dist-examples
make -C __dist-examples distclean
# Makefile.am files are left as documentation
find __dist-examples \( -name Makefile.in -o -name .gitignore -o -name '*.opt' -o -name '*.sln' -o -name '*.vcproj' \) -exec rm {} \;
mkdir __dist-examples-dir
mv __dist-examples __dist-examples-dir/examples
%ldconfig_scriptlets
%files
%doc AUTHORS NEWS README THANKS TODO BUGS doc/FAQ
%license COPYING
%{_bindir}/DllPlugInTester
%{_libdir}/libcppunit-%{apiversion}.so.1
%{_libdir}/libcppunit-%{apiversion}.so.1.*
%files devel
%{_includedir}/cppunit
%{_libdir}/libcppunit.so
%{_libdir}/pkgconfig/cppunit.pc
%files doc
%license COPYING
%doc __dist-examples-dir/examples/
%doc doc/html
%changelog
%autochangelog