File tinyxml.spec of Package tinyxml
#
# spec file for package tinyxml
#
# Copyright (c) 2020 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%define so_version 0
%define file_version 2_6_2
%define lib_package lib%{name}%{so_version}
Name: tinyxml
Version: 2.6.2
Release: 0
Summary: A simple, small, C++ XML parser
License: Zlib
Group: System/Libraries
URL: http://sourceforge.net/projects/tinyxml
Source: http://downloads.sourceforge.net/tinyxml/%{name}_%{file_version}.tar.gz
Source1: configure.ac
Source2: Makefile.am
Source3: tinyxml.h.in
Source4: use_stl_def
Source5: Makefile.am.docs
Patch0: tinyxml-c_headers.patch
Patch1: tinyxml-entity.patch
BuildRequires: gcc-c++
BuildRequires: libtool
BuildRequires: pkgconfig
%description
TinyXML is a simple, small, C++ XML parser that can be easily integrating
into other programs. Have you ever found yourself writing a text file parser
every time you needed to save human readable data or serialize objects?
TinyXML solves the text I/O file once and for all.
(Or, as a friend said, ends the Just Another Text File Parser problem.)
%package -n %{lib_package}
Summary: A simple, small, C++ XML parser
License: Zlib
Group: System/Libraries
%description -n %{lib_package}
TinyXML is a simple, small, C++ XML parser that can be easily integrating
into other programs. Have you ever found yourself writing a text file parser
every time you needed to save human readable data or serialize objects?
TinyXML solves the text I/O file once and for all.
(Or, as a friend said, ends the Just Another Text File Parser problem.)
%package devel
Summary: Development files for libtinyxml
License: GPL-2.0-or-later
Group: Development/Libraries/C and C++
Requires: %{lib_package} = %{version}
Provides: libtinyxml-devel = %{version}
Obsoletes: libtinyxml-devel < %{version}
Suggests: %{name}-docs
%description devel
The libtinyxml-devel package contains libraries and header files for
developing applications that use libtinyxml.
%package docs
Summary: Documentaqtion for libtinyxml
License: GPL-2.0-or-later
Group: Development/Libraries/C and C++
Requires: %{lib_package} = %{version}
%description docs
This packages contains the HTML documentation and a tutorial for
libtinyxml
%prep
%setup -q -n tinyxml
%patch0
%patch1
mkdir -pv m4
cp %{SOURCE1} %{SOURCE2} %{SOURCE3} %{SOURCE4} .
cp %{SOURCE5} docs/Makefile.am
rm -f tinyxml.h
%build
autoreconf -fiv
%configure
make %{?_smp_mflags}
%install
%make_install
find %{buildroot} -type f -name "*.la" -delete -print
# creates support file for pkg-config
mkdir -p %{buildroot}/%{_libdir}/pkgconfig
tee %{buildroot}/%{_libdir}/pkgconfig/tinyxml.pc << "EOF"
prefix=%{_prefix}
exec_prefix=${prefix}
libdir=${exec_prefix}/%{_lib}
includedir=${prefix}/include
Name: TinyXML
Description: A simple, small, C++ XML parser
Version: %{version}
Libs: -L${libdir} -ltinyxml
Cflags: -I${includedir} -DTIXML_USE_STL=YES
EOF
%post -n %{lib_package} -p /sbin/ldconfig
%postun -n %{lib_package} -p /sbin/ldconfig
%files -n %{lib_package}
%doc changes.txt readme.txt
%{_libdir}/libtinyxml.so.%{so_version}*
%files devel
%{_includedir}/tinystr.h
%{_includedir}/tinyxml.h
%{_libdir}/libtinyxml.so
%{_libdir}/pkgconfig/%{name}.pc
%files docs
%doc docs/*.html docs/*.gif docs/*.png docs/*.css
%changelog