Sophie

Sophie

distrib > Mageia > cauldron > i586 > media > core-release-src > by-pkgid > 2475c4e672c3ec4ee73b7fee7fcb16d4 > files > 6

tinyxml-2.6.2-15.mga10.src.rpm

%global sum	A small and simple XML parser

%define realver 2_6_2
# (tpg) please don't change major, it should be set to 0
%define major 0
%define libname %mklibname %{name} %{major}
%define develname %mklibname %{name} -d

Summary:	%{sum}
Name:		tinyxml
Version:	%(echo %realver| tr '_' '.')
Release:	%mkrel 15
License:	zlib
Group:		System/Libraries
Url:		http://www.grinninglizard.com/tinyxml/
Source0:	https://downloads.sourceforge.net/tinyxml/%{name}_%{realver}.tar.gz
Source1:	FindTinyXML.cmake
Patch0:		tinyxml-2.5.3-stl.patch
Patch1:		tinyxml-2.62-fix-infinite-loop.patch
Patch2:		tinyxml-issue51.patch
Patch3:		CVE-2023-34194.patch

%description
TinyXML is a simple, small, C++ XML parser

%package -n %{libname}
Summary:	A small and simple XML parsing library
Group:		System/Libraries

%description -n %{libname}
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.

%package -n %{develname}
Summary:	Development files for %{name}
Group:		Development/C++
Provides:	%{name}-devel = %{version}-%{release}
Provides:	lib%{name}-devel = %{version}-%{release}
Requires:	%{libname} = %{version}-%{release}

%description -n %{develname}
Development files and headers for %{name}.

%prep
%setup -qn %{name}
%autopatch -p1

%build
for i in tinyxml.cpp tinystr.cpp tinyxmlerror.cpp tinyxmlparser.cpp; do
 	g++ %{optflags} -fPIC -o $i.o -c $i
done
g++ %{optflags} -shared -o lib%{name}.so.0.%{version} \
    %{ldflags} -Wl,-soname,lib%{name}.so.0 *.cpp.o


%install
mkdir -p %{buildroot}%{_libdir}
mkdir -p %{buildroot}%{_includedir}
install -m 755 lib%{name}.so.0.%{version} %{buildroot}%{_libdir}
ln -s lib%{name}.so.%{major}.%{version} %{buildroot}%{_libdir}/lib%{name}.so.%{major}
ln -s lib%{name}.so.%{major}.%{version} %{buildroot}%{_libdir}/lib%{name}.so
install -p -m 644 *.h %{buildroot}%{_includedir}

# pkg-config file
mkdir -p %{buildroot}%{_libdir}/pkgconfig
cat << EOF > %{buildroot}%{_libdir}/pkgconfig/%{name}.pc
prefix=%{_prefix}
exec_prefix=%{_exec_prefix}
libdir=%{_libdir}
includedir=%{_includedir}

Name: TinyXML
Description: %{sum}
Version: %{version}
Libs: -L\${libdir} -ltinyxml
Cflags: -I\${includedir} -DTIXML_USE_STL=YES
EOF

# Install CMake find module
install -D -m644 %{_sourcedir}/FindTinyXML.cmake \
                 %{buildroot}%{_datadir}/cmake/Modules/FindTinyXML.cmake

%files -n %{libname}
%{_libdir}/libtinyxml.so.%{major}{,.*}

%files -n %{develname}
%doc changes.txt readme.txt
%{_datadir}/cmake/Modules/FindTinyXML.cmake
%{_includedir}/*.h
%{_libdir}/lib%{name}.so
%{_libdir}/pkgconfig/%{name}.pc


%changelog
* Fri Jan 12 2024 ns80 <ns80> 2.6.2-15.mga10
+ Revision: 2030335
- add patches from Fedora for CVE-2023-34194 (mga#32703)

* Tue Mar 15 2022 umeabot <umeabot> 2.6.2-14.mga9
+ Revision: 1793689
- Mageia 9 Mass Rebuild

* Fri Nov 12 2021 ns80 <ns80> 2.6.2-13.mga9
+ Revision: 1755909
- add patch from openSUSE for CVE-2021-42260 (mga#29642)

* Wed Apr 15 2020 danf <danf> 2.6.2-12.mga8
+ Revision: 1567630
- Fix Description: in .pc file to stop referring to debug sources

* Fri Feb 14 2020 umeabot <umeabot> 2.6.2-11.mga8
+ Revision: 1517427
- Mageia 8 Mass Rebuild
+ wally <wally>
- replace deprecated %%apply_patches

* Sun Sep 23 2018 umeabot <umeabot> 2.6.2-10.mga7
+ Revision: 1301420
- Mageia 7 Mass Rebuild

* Fri Feb 12 2016 umeabot <umeabot> 2.6.2-9.mga6
+ Revision: 958993
- Mageia 6 Mass Rebuild

* Sat Aug 22 2015 akien <akien> 2.6.2-8.mga6
+ Revision: 868023
- Rebuild for gcc 5.2.1

* Wed Oct 15 2014 umeabot <umeabot> 2.6.2-7.mga5
+ Revision: 749388
- Second Mageia 5 Mass Rebuild

* Tue Sep 16 2014 umeabot <umeabot> 2.6.2-6.mga5
+ Revision: 689898
- Mageia 5 Mass Rebuild

* Sun Aug 10 2014 akien <akien> 2.6.2-5.mga5
+ Revision: 661359
- Add cmake find module for TinyXML

* Sun Aug 10 2014 akien <akien> 2.6.2-4.mga5
+ Revision: 661321
- Add pkgconfig file

* Fri Oct 18 2013 umeabot <umeabot> 2.6.2-3.mga4
+ Revision: 519654
- Mageia 4 Mass Rebuild

* Mon Jan 14 2013 umeabot <umeabot> 2.6.2-2.mga3
+ Revision: 384591
- Mass Rebuild - https://wiki.mageia.org/en/Feature:Mageia3MassRebuild

* Sun Jan 08 2012 fwang <fwang> 2.6.2-1.mga2
+ Revision: 193134
- new version 2.6.2

* Tue Feb 22 2011 dmorgan <dmorgan> 2.6.1-1.mga1
+ Revision: 56447
- Remove mdv macros
- imported package tinyxml


* Sat Jul 31 2010 Tomasz Pawel Gajc <tpg@mandriva.org> 2.6.1-1mdv2011.0
+ Revision: 563984
- update to new version 2.6.1
- pass %%ldflags

* Sun Jan 31 2010 Tomasz Pawel Gajc <tpg@mandriva.org> 2.5.3-3mdv2010.1
+ Revision: 498904
- install all headers

* Wed Sep 09 2009 Thierry Vignaud <tv@mandriva.org> 2.5.3-2mdv2010.0
+ Revision: 434399
- rebuild

* Mon Aug 25 2008 Tomasz Pawel Gajc <tpg@mandriva.org> 2.5.3-1mdv2009.0
+ Revision: 275847
- add spec file and sources
- make it work
- Created package structure for tinyxml.