tinyxml2/tinyxml2.spec

92 lines
2.7 KiB
RPMSpec
Raw Normal View History

2017-12-25 11:58:17 +10:00
%define major 5
2015-08-20 12:51:21 +02:00
%define libname %mklibname %{name} _%{major}
%define devname %mklibname %{name} -d
2017-12-25 11:58:17 +10:00
Summary: Simple, small and efficient C++ XML parser
Name: tinyxml2
Version: 5.0.1
2019-04-14 02:47:08 +00:00
Release: 3
2017-12-25 11:58:17 +10:00
License: zlib
Group: System/Libraries
Url: http://www.grinninglizard.com/tinyxml2/
Source0: https://github.com/leethomason/tinyxml2/archive/%{version}/%{name}-%{version}.tar.gz
Source1: FindTinyXML2.cmake
# https://github.com/leethomason/tinyxml2/pull/587
Patch0: 0001-CMake-Respect-libdir-for-config-files.patch
BuildRequires: cmake
BuildRequires: doxygen
2015-08-20 12:51:21 +02:00
%description
TinyXML-2 is a simple, small, efficient, C++ XML parser that can be
easily integrated into other programs. It uses a Document Object Model
(DOM), meaning the XML data is parsed into a C++ objects that can be
browsed and manipulated, and then written to disk or another output stream.
2017-12-25 11:58:17 +10:00
#----------------------------------------------------------------------------
2015-08-20 12:51:21 +02:00
2017-12-25 11:58:17 +10:00
%package -n %{libname}
Summary: Simple, small and efficient C++ XML parser
Group: System/Libraries
2015-08-20 12:51:21 +02:00
%description -n %{libname}
TinyXML-2 is a simple, small, efficient, C++ XML parser that can be
easily integrated into other programs. It uses a Document Object Model
(DOM), meaning the XML data is parsed into a C++ objects that can be
browsed and manipulated, and then written to disk or another output stream.
TinyXML-2 doesn't parse or use DTDs (Document Type Definitions) nor XSLs
(eXtensible Stylesheet Language).
TinyXML-2 uses a similar API to TinyXML-1, But the implementation of the
parser was completely re-written to make it more appropriate for use in a
game. It uses less memory, is faster, and uses far fewer memory allocations.
2017-12-25 11:58:17 +10:00
%files -n %{libname}
2015-08-20 12:51:21 +02:00
%{_libdir}/lib%{name}.so.%{major}
%{_libdir}/lib%{name}.so.%{version}
2017-12-25 11:58:17 +10:00
#----------------------------------------------------------------------------
2015-08-20 12:51:21 +02:00
2017-12-25 11:58:17 +10:00
%package -n %{devname}
Summary: Development files for %{name}
Group: Development/C++
Requires: %{libname} = %{EVRD}
2015-08-20 12:51:21 +02:00
%description -n %{devname}
This package contains the libraries and header files that are needed
for writing applications with the %{name} library.
%files -n %{devname}
%doc readme.md docs/*
%{_datadir}/cmake/Modules/FindTinyXML2.cmake
%{_includedir}/%{name}.h
2017-12-25 11:58:17 +10:00
%{_libdir}/cmake/%{name}/
2015-08-20 12:51:21 +02:00
%{_libdir}/lib%{name}.so
%{_libdir}/pkgconfig/%{name}.pc
2017-12-25 11:58:17 +10:00
#----------------------------------------------------------------------------
2015-08-20 12:51:21 +02:00
%prep
%setup -q
2017-12-25 11:58:17 +10:00
%patch0 -p1
2015-08-20 12:51:21 +02:00
%build
%cmake
2020-01-05 02:57:22 +03:00
%make_build
2015-08-20 12:51:21 +02:00
# Build the documentation from the "dox" template
cd ..
doxygen dox
2017-12-25 11:58:17 +10:00
%install
2020-01-04 09:14:08 +03:00
%make_install -C build
2017-12-25 11:58:17 +10:00
# Install CMake find module
install -D -m644 %{SOURCE1} %{buildroot}%{_datadir}/cmake/Modules/FindTinyXML2.cmake
2015-08-20 12:51:21 +02:00
%check
pushd build
export LD_LIBRARY_PATH=`pwd`
./xmltest
popd