| 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 |
|
|---|
| 10 | Name: tinyxml2
|
|---|
| 11 | Version: 6.2.0
|
|---|
| 12 | Release: 1%{?dist}
|
|---|
| 13 | Summary: Simple, small and efficient C++ XML parser
|
|---|
| 14 |
|
|---|
| 15 | Group: Development/Libraries
|
|---|
| 16 | License: zlib
|
|---|
| 17 | URL: 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 |
|
|---|
| 24 | BuildRequires: cmake
|
|---|
| 25 |
|
|---|
| 26 | %description
|
|---|
| 27 | TinyXML-2 is a simple, small, efficient, C++ XML parser that can be
|
|---|
| 28 | easily 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
|
|---|
| 30 | browsed and manipulated, and then written to disk or another output stream.
|
|---|
| 31 |
|
|---|
| 32 | TinyXML-2 doesn't parse or use DTDs (Document Type Definitions) nor XSLs
|
|---|
| 33 | (eXtensible Stylesheet Language).
|
|---|
| 34 |
|
|---|
| 35 | TinyXML-2 uses a similar API to TinyXML-1, But the implementation of the
|
|---|
| 36 | parser was completely re-written to make it more appropriate for use in a
|
|---|
| 37 | game. It uses less memory, is faster, and uses far fewer memory allocations.
|
|---|
| 38 |
|
|---|
| 39 | %package devel
|
|---|
| 40 | Summary: Development files for %{name}
|
|---|
| 41 | Group: Development/Libraries
|
|---|
| 42 | Requires: %{name}%{?_isa} = %{version}-%{release}
|
|---|
| 43 |
|
|---|
| 44 | %description devel
|
|---|
| 45 | This package contains the libraries and header files that are needed
|
|---|
| 46 | for writing applications with the %{name} library.
|
|---|
| 47 |
|
|---|
| 48 | %prep
|
|---|
| 49 | #%setup -q -n %{name}-%{commit}
|
|---|
| 50 | %scm_setup
|
|---|
| 51 | chmod -c -x *.cpp *.h
|
|---|
| 52 |
|
|---|
| 53 | # temporary fix for https://github.com/leethomason/tinyxml2/pull/653
|
|---|
| 54 | sed -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
|
|---|
| 62 | mkdir objdir
|
|---|
| 63 | cd objdir
|
|---|
| 64 | %cmake .. -DBUILD_STATIC_LIBS=OFF
|
|---|
| 65 | make %{?_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
|
|---|
| 76 | cd objdir
|
|---|
| 77 | make test
|
|---|
| 78 |
|
|---|
| 79 | %install
|
|---|
| 80 | rm -rf %{buildroot}
|
|---|
| 81 | cd objdir
|
|---|
| 82 | make 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
|
|---|