mirror of
https://abf.rosa.ru/djam/tinyxml2.git
synced 2025-02-23 17:02:56 +00:00
93 lines
2.7 KiB
RPMSpec
93 lines
2.7 KiB
RPMSpec
%define major 10
|
|
%define libname %mklibname %{name} _%{major}
|
|
%define devname %mklibname %{name} -d
|
|
|
|
Summary: Simple, small and efficient C++ XML parser
|
|
Name: tinyxml2
|
|
Version: 10.0.0
|
|
Release: 1
|
|
License: zlib
|
|
Group: System/Libraries
|
|
URL: https://github.com/leethomason/tinyxml2
|
|
Source0: %{url}/archive/%{version}/%{name}-%{version}.tar.gz
|
|
Source1: FindTinyXML2.cmake
|
|
Source1000: %{name}.rpmlintrc
|
|
BuildRequires: cmake
|
|
BuildRequires: doxygen
|
|
|
|
%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.
|
|
|
|
#----------------------------------------------------------------------------
|
|
|
|
%package -n %{libname}
|
|
Summary: Simple, small and efficient C++ XML parser
|
|
Group: System/Libraries
|
|
|
|
%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.
|
|
|
|
%files -n %{libname}
|
|
%{_libdir}/lib%{name}.so.%{major}
|
|
%{_libdir}/lib%{name}.so.%{version}
|
|
|
|
#----------------------------------------------------------------------------
|
|
|
|
%package -n %{devname}
|
|
Summary: Development files for %{name}
|
|
Group: Development/C++
|
|
Requires: %{libname} = %{EVRD}
|
|
|
|
%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
|
|
%{_libdir}/cmake/%{name}/
|
|
%{_libdir}/lib%{name}.so
|
|
%{_libdir}/pkgconfig/%{name}.pc
|
|
|
|
#----------------------------------------------------------------------------
|
|
|
|
%prep
|
|
%setup -q
|
|
|
|
%build
|
|
%cmake \
|
|
-DCMAKE_BUILD_TYPE=Release
|
|
%make
|
|
|
|
# Build the documentation from the "dox" template
|
|
cd ..
|
|
doxygen dox
|
|
|
|
%install
|
|
%makeinstall_std -C build
|
|
|
|
# Install CMake find module
|
|
install -Dm0644 %{SOURCE1} %{buildroot}%{_datadir}/cmake/Modules/FindTinyXML2.cmake
|
|
|
|
%check
|
|
pushd build
|
|
export LD_LIBRARY_PATH=`pwd`
|
|
./xmltest .././resources/
|
|
popd
|
|
|
|
# fix double slash in pc
|
|
sed -i 's|//|/|g' %{buildroot}%{_libdir}/pkgconfig/%{name}.pc
|