source: spec/trunk/SPECS/tinyxml2.spec@ 1566

Last change on this file since 1566 was 1402, checked in by tellie, 7 years ago

spec: tinyxml2: Release version 6.2.0-1.

File size: 3.1 KB
Line 
1# tinyml2 parses files potentially coming from untrusted sources.
2%global _hardened_build 1
3
4%global githubparent leethomason
5%global commit 8c8293ba8969a46947606a93ff0cb5a083aab47a
6%global shortcommit %(c=%{commit}; echo ${c:0:7})
7%global commitdate 20171211
8%global gitversion .%{commitdate}git%{shortcommit}
9
10Name: tinyxml2
11Version: 6.2.0
12Release: 1%{?dist}
13Summary: Simple, small and efficient C++ XML parser
14
15Group: Development/Libraries
16License: zlib
17URL: https://github.com/%{githubparent}/%{name}
18#Source0: https://github.com/%{githubparent}/%{name}/archive/%{commit}/%{name}-%{version}-%{shortcommit}.tar.gz
19%scm_source github https://github.com/TeLLie/tinyxml2 master
20# EPEL has a too old CMake which is missing GNUInstallDirs (copied from Fedora 19 CMake)
21#Source1: GNUInstallDirs.cmake
22#Patch0: tinyxml2-epelbuild.patch
23
24BuildRequires: cmake
25
26%description
27TinyXML-2 is a simple, small, efficient, C++ XML parser that can be
28easily integrated into other programs. It uses a Document Object Model
29(DOM), meaning the XML data is parsed into a C++ objects that can be
30browsed and manipulated, and then written to disk or another output stream.
31
32TinyXML-2 doesn't parse or use DTDs (Document Type Definitions) nor XSLs
33(eXtensible Stylesheet Language).
34
35TinyXML-2 uses a similar API to TinyXML-1, But the implementation of the
36parser was completely re-written to make it more appropriate for use in a
37game. It uses less memory, is faster, and uses far fewer memory allocations.
38
39%package devel
40Summary: Development files for %{name}
41Group: Development/Libraries
42Requires: %{name}%{?_isa} = %{version}-%{release}
43
44%description devel
45This package contains the libraries and header files that are needed
46for writing applications with the %{name} library.
47
48%prep
49#%setup -q -n %{name}-%{commit}
50%scm_setup
51chmod -c -x *.cpp *.h
52
53# temporary fix for https://github.com/leethomason/tinyxml2/pull/653
54sed -i -e 's,lib/,${CMAKE_INSTALL_LIBDIR}/,g' CMakeLists.txt
55
56#%if 0%{?rhel} == 5 || 0%{?rhel} == 6
57#%patch0 -p1 -b .epel
58#cp -p %{SOURCE1} .
59#%endif
60
61%build
62mkdir objdir
63cd objdir
64%cmake .. -DBUILD_STATIC_LIBS=OFF
65make %{?_smp_mflags}
66
67# Library tests were disabled in 3.0.0
68#%check
69#cd objdir
70#make test
71#export LD_LIBRARY_PATH=`pwd`
72#./test
73
74# and partially re-enabled in 6.0.0
75%check
76cd objdir
77make test
78
79%install
80rm -rf %{buildroot}
81cd objdir
82make install DESTDIR=%{buildroot}
83
84#%ldconfig_scriptlets
85
86%files
87%doc readme.md
88#%{_libdir}/lib%{name}.so.%{version}
89#%{_libdir}/lib%{name}.so.6
90%{_libdir}/%{name}*.a
91#%{_libdir}/tinyxml6.dll
92
93%files devel
94%{_includedir}/%{name}.h
95#%{_libdir}/lib%{name}.dll
96%{_bindir}/tinyxml6.dll
97%{_libdir}/pkgconfig/%{name}.pc
98%{_libdir}/cmake/%{name}/tinyxml2Config.cmake
99%{_libdir}/cmake/%{name}/tinyxml2Targets-noconfig.cmake
100%{_libdir}/cmake/%{name}/tinyxml2Targets.cmake
101
102
103%changelog
104* Fri May 11 2018 Elbert Pol <elbert.pol@gmail.com> - 6.2.0-1
105- initial rpm for OS2
106- Add buildlevel os2
Note: See TracBrowser for help on using the repository browser.