edabf5d
Summary:	Validating XML Parser
fcb246a
Name:		xerces-c27
fcb246a
Version:	2.7.0
edc9a45
Release:	17%{?dist}
edabf5d
License:	ASL 2.0
edabf5d
Group:		System Environment/Libraries
fcb246a
URL:		http://xml.apache.org/xerces-c/
0806ab5
Source0:	http://archive.apache.org/dist/xml/xerces-c/Xerces-C_2_7_0/source/xerces-c-src_2_7_0.tar.gz
fcb246a
Patch0:		xerces-c--CVE-2009-1885.diff
edabf5d
edabf5d
%description
edabf5d
Xerces-C is a validating XML parser written in a portable subset of C++.
edabf5d
Xerces-C makes it easy to give your application the ability to read and write
edabf5d
XML data. A shared library is provided for parsing, generating, manipulating,
edabf5d
and validating XML documents. Xerces-C is faithful to the XML 1.0
edabf5d
recommendation and associated standards ( DOM 1.0, DOM 2.0. SAX 1.0, SAX 2.0,
edabf5d
Namespaces).
edabf5d
edabf5d
Note that this package contains Xerces-C++ 2.7.0 for compatibility with
edabf5d
applications that cannot use a newer version.
edabf5d
edabf5d
fcb246a
%package	devel
fcb246a
Summary:	Header files, libraries and development documentation for %{name}
fcb246a
Group:		Development/Libraries
fcb246a
Requires:	%{name} = %{version}-%{release}
edabf5d
edabf5d
%description devel
edabf5d
This package contains the header files, static libraries and development
edabf5d
documentation for xerces-c 2.7.0. If you like to develop programs using
edabf5d
xerces-c 2.7.0, you will need to install %{name}-devel.
edabf5d
edabf5d
%package doc
edabf5d
Group:		Documentation
edabf5d
Summary:	Documentation for Xerces-C++ validating XML parser
edabf5d
edabf5d
%description doc
edabf5d
Documentation for Xerces-C++ 2.7.0.
edabf5d
edabf5d
Xerces-C++ is a validating XML parser written in a portable subset of C++.
edabf5d
Xerces-C++ makes it easy to give your application the ability to read and
edabf5d
write XML data. A shared library is provided for parsing, generating,
edabf5d
manipulating, and validating XML documents.
edabf5d
edabf5d
edabf5d
%prep
edabf5d
%setup -q -n xerces-c-src_2_7_0
0806ab5
edabf5d
rm -rf doc/html/resources/.svn
edabf5d
find ./doc -type f -perm 755 -exec chmod 644 {} \;
edabf5d
find ./samples -type f -perm 755 -exec chmod 644 {} \;
0806ab5
perl -pi.orig -e 's|(PREFIX.)/lib\b|$1/%{_lib}|g' src/xercesc/configure */Makefile.in
edabf5d
edabf5d
iconv -f iso8859-1 -t utf-8 credits.txt > credits.txt.conv && mv -f credits.txt.conv credits.txt;
edabf5d
for i in feedback.xml migration.xml releases_archive.xml; do {
edabf5d
	iconv -f iso8859-1 -t utf-8 doc/$i > doc/$i.conv && mv -f doc/$i.conv doc/$i;
edabf5d
	};
edabf5d
done;
edabf5d
fcb246a
%patch0 -p0 -b .CVE-2009-1885
fcb246a
edabf5d
edabf5d
%build
edabf5d
export XERCESCROOT="$PWD"
edabf5d
0806ab5
# Update the various config.guess to upstream release for aarch64/ppc64le support (and other new arches)
0806ab5
find ./ -name config.guess -exec cp /usr/lib/rpm/config.guess {} ';'
0806ab5
edabf5d
# Let Makefiles be verbose
edabf5d
find -name 'Makefile.*' | while read f; do
edabf5d
	sed -i -e 's/$Q//g' \
edabf5d
	-e 's/{MAKE} -s/(MAKE)/g' \
edabf5d
	-e '/echo \"  (/d' \
edabf5d
	$f
edabf5d
done
edabf5d
edabf5d
# Remove conflicting flags from runConfigure
edabf5d
find -name runConfigure | while read f; do
edabf5d
	sed -i -e 's/-w -O -DNDEBUG/-DNDEBUG/g' $f
edabf5d
done
edabf5d
edabf5d
cd $XERCESCROOT/src/xercesc
0806ab5
%ifarch alpha %{power64} s390x sparc64 x86_64 aarch64
edabf5d
CXXFLAGS="${RPM_OPT_FLAGS}" CFLAGS="${RPM_OPT_FLAGS}" ./runConfigure -plinux -cgcc -xg++ -minmem -nsocket -tnative -rpthreads -b64 -P %{_prefix} -C --libdir="%{_libdir}"
edabf5d
%else
edabf5d
CXXFLAGS="${RPM_OPT_FLAGS}" CFLAGS="${RPM_OPT_FLAGS}" ./runConfigure -plinux -cgcc -xg++ -minmem -nsocket -tnative -rpthreads -b32 -P %{_prefix} -C --libdir="%{_libdir}"
edabf5d
%endif
edabf5d
# not smp safe
0806ab5
make V=1
edabf5d
edabf5d
edabf5d
%install
edabf5d
export XERCESCROOT="$PWD"
0806ab5
make install -C src/xercesc DESTDIR="$RPM_BUILD_ROOT"
edabf5d
/sbin/ldconfig -n $RPM_BUILD_ROOT%{_libdir}
edabf5d
mkdir -p $RPM_BUILD_ROOT%{_libdir}/xerces-c-2.7.0
edabf5d
cd $RPM_BUILD_ROOT%{_libdir}/xerces-c-2.7.0/
edabf5d
ln -s ../libxerces-c.so.27 libxerces-c.so
edabf5d
ln -s ../libxerces-depdom.so.27 libxerces-depdom.so
edabf5d
cd -
edabf5d
rm $RPM_BUILD_ROOT%{_libdir}/libxerces*.so
edabf5d
mkdir -p $RPM_BUILD_ROOT%{_includedir}/xercesc-2.7.0
edabf5d
mv $RPM_BUILD_ROOT%{_includedir}/xercesc $RPM_BUILD_ROOT%{_includedir}/xercesc-2.7.0
edabf5d
edabf5d
edabf5d
%post -p /sbin/ldconfig
edabf5d
%postun -p /sbin/ldconfig
edabf5d
edabf5d
edabf5d
%files
edabf5d
%doc LICENSE.txt
edabf5d
%{_libdir}/libxerces*.so.*
edabf5d
edabf5d
edabf5d
%files devel
edabf5d
%dir %{_libdir}/xerces-c-2.7.0
edabf5d
%{_libdir}/xerces-c-2.7.0/libxerces*.so
edabf5d
%{_includedir}/xercesc-2.7.0/
edabf5d
edabf5d
edabf5d
%files doc
edabf5d
%doc Readme.html LICENSE NOTICE STATUS credits.txt doc samples
edabf5d
edabf5d
edabf5d
%changelog
edc9a45
* Mon Aug 18 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.7.0-17
edc9a45
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
edc9a45
92f9d29
* Sun Jun 08 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.7.0-16
92f9d29
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
92f9d29
0806ab5
* Mon May 26 2014 Peter Robinson <pbrobinson@fedoraproject.org> 2.7.0-15
0806ab5
- Update all config.guess/sub for aarch64 (and ppc64le)
0806ab5
- Cleanup SPEC
0806ab5
Brent Baude 59dd3fe
* Thu May 22 2014 Brent Baude <baude@us.ibm.com> - 2.7.0-14
Brent Baude 59dd3fe
- Changed ppc64 arch to power64 macro
Brent Baude 59dd3fe
- Added xerces-c-add-ppc64le.patch
Brent Baude 59dd3fe
057e651
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.7.0-13
057e651
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
057e651
913ed1a
* Fri Feb 15 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.7.0-12
913ed1a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
913ed1a
75b92de
* Sun Jul 22 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.7.0-11
75b92de
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
75b92de
c6f9137
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.7.0-10
c6f9137
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
c6f9137
9f0e6d6
* Mon Feb 07 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.7.0-9
9f0e6d6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
9f0e6d6
fcb246a
* Thu Aug  6 2009 Peter Lemenkov <lemenkov@gmail.com> 2.7.0-8
fcb246a
- Fix CVE-2009-1885
fcb246a
ae82dab
* Mon Jul 27 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.7.0-7
ae82dab
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
ae82dab
2e47751
* Thu Feb 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.7.0-6
2e47751
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
2e47751
e40c337
* Wed Jun 04 2008 Xavier Bachelot <xavier@bachelot.org> - 2.7.0-5
e40c337
- Fix Source: url.
e40c337
edabf5d
* Wed Feb 27 2008 Xavier Bachelot <xavier@bachelot.org> - 2.7.0-4
edabf5d
- Better descriptions.
edabf5d
edabf5d
* Tue Feb 26 2008 Xavier Bachelot <xavier@bachelot.org> - 2.7.0-3
edabf5d
- Fix some non-utf8 files.
edabf5d
- Fix files and dirs permissions.
edabf5d
- Properly own dir.
edabf5d
edabf5d
* Tue Feb 26 2008 Xavier Bachelot <xavier@bachelot.org> - 2.7.0-2
edabf5d
- Better files relocation.
edabf5d
edabf5d
* Mon Feb 18 2008 Xavier Bachelot <xavier@bachelot.org> - 2.7.0-1
edabf5d
- Initial build.
edabf5d
- Spec file forked from original xerces-c package.