tinyxml2/tinyxml2.spec

116 lines
3.7 KiB
RPMSpec
Raw Normal View History

2013-08-13 20:43:28 +00:00
# tinyml2 parses files potentially coming from untrusted sources.
%global _hardened_build 1
%global githubparent leethomason
2014-05-22 19:05:44 +00:00
%global commit 6ee53e7d49a4dbfd5c1d7e67fb0228703bbe7309
2013-08-13 20:43:28 +00:00
%global shortcommit %(c=%{commit}; echo ${c:0:7})
2014-05-22 19:05:44 +00:00
%global commitdate 20140406
2013-08-13 20:43:28 +00:00
%global gitversion .%{commitdate}git%{shortcommit}
Name: tinyxml2
2014-05-22 19:05:44 +00:00
Version: 2.1.0
Release: 4%{gitversion}%{?dist}
2013-08-13 20:43:28 +00:00
Summary: Simple, small and efficient C++ XML parser
Group: Development/Libraries
License: zlib
URL: https://github.com/%{githubparent}/%{name}
Source0: https://github.com/%{githubparent}/%{name}/archive/%{commit}/%{name}-%{version}-%{shortcommit}.tar.gz
2013-10-14 08:30:08 +00:00
# EPEL has a too old CMake which is missing GNUInstallDirs (copied from Fedora 19 CMake)
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
Source1: GNUInstallDirs.cmake
Patch0: tinyxml2-epelbuild.patch
2013-08-13 20:43:28 +00:00
BuildRequires: cmake
%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.
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.
%package devel
Summary: Development files for %{name}
Group: Development/Libraries
Requires: %{name}%{?_isa} = %{version}-%{release}
%description devel
This package contains the libraries and header files that are needed
for writing applications with the %{name} library.
%prep
%setup -q -n %{name}-%{commit}
chmod -c -x *.cpp *.h
2013-10-14 08:30:08 +00:00
%if 0%{?rhel} == 5 || 0%{?rhel} == 6
%patch0 -p1 -b .epel
cp -p %{SOURCE1} .
%endif
2013-08-13 20:43:28 +00:00
%build
mkdir objdir
cd objdir
%cmake .. -DBUILD_STATIC_LIBS=OFF
make %{?_smp_mflags}
%check
cd objdir
make test
2013-10-14 08:30:08 +00:00
export LD_LIBRARY_PATH=`pwd`
2013-08-13 20:43:28 +00:00
./test
%install
2013-10-14 08:30:08 +00:00
rm -rf %{buildroot}
2013-08-13 20:43:28 +00:00
cd objdir
2013-10-14 08:30:08 +00:00
make install DESTDIR=%{buildroot}
%clean
rm -rf %{buildroot}
2013-08-13 20:43:28 +00:00
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%files
%doc readme.md
2014-05-22 19:05:44 +00:00
%{_libdir}/lib%{name}.so.%{version}
%{_libdir}/lib%{name}.so.2
2013-08-13 20:43:28 +00:00
%files devel
%{_includedir}/%{name}.h
%{_libdir}/lib%{name}.so
%{_libdir}/pkgconfig/%{name}.pc
%changelog
* Mon Aug 18 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.1.0-4.20140406git6ee53e7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
* Sun Jun 08 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.1.0-3.20140406git6ee53e7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
2014-05-22 20:13:01 +00:00
* Thu May 22 2014 François Cami <fcami@fedoraproject.org> - 2.1.0-2.20140406git6ee53e7
- Bump release and make it build (switch GNUInstallDirs.cmake from sources to git).
2014-05-22 19:05:44 +00:00
* Sat May 17 2014 François Cami <fcami@fedoraproject.org> - 2.1.0-1.20140406git6ee53e7
- Update to 2.1.0.
2013-10-14 08:30:08 +00:00
* Mon Oct 14 2013 Susi Lehtola <jussilehtola@fedoraproject.org> - 1.0.11-4.20130805git0323851
- Patch to build in EPEL branches.
2013-08-13 20:43:28 +00:00
* Mon Aug 12 2013 François Cami <fcami@fedoraproject.org> - 1.0.11-3.20130805git0323851
- Fixes by Susi Lehtola: build in a separate directory and don't build anything static.
* Mon Aug 12 2013 François Cami <fcami@fedoraproject.org> - 1.0.11-2.20130805git0323851
- Fixes suggested by Ville Skyttä: drop -static, add check, etc.
* Sat Aug 10 2013 François Cami <fcami@fedoraproject.org> - 1.0.11-1.20130805git0323851
- Initial package.