1 %define __strip %{_mingw32_strip}
2 %define __objdump %{_mingw32_objdump}
3 %define _use_internal_dependency_generator 0
4 %define __find_requires %{_mingw32_findrequires}
5 %define __find_provides %{_mingw32_findprovides}
10 Summary: Validating XML parser
13 Group: Development/Libraries
15 URL: http://xml.apache.org/xerces-c/
16 Source0: http://www.apache.org/dist/xerces/c/2/sources/xerces-c-src_2_8_0.tar.gz
18 # Patch allows dllwrap to be overridden.
19 Patch1000: xerces-c-dllwrap.patch
21 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
24 BuildRequires: mingw32-filesystem >= 35
25 BuildRequires: mingw32-gcc
26 BuildRequires: mingw32-gcc-c++
27 BuildRequires: mingw32-binutils
31 Xerces-C is a validating XML parser written in a portable subset of
32 C++. Xerces-C makes it easy to give your application the ability to
33 read and write XML data. A shared library is provided for parsing,
34 generating, manipulating, and validating XML documents. Xerces-C is
35 faithful to the XML 1.0 recommendation and associated standards (DOM
36 1.0, DOM 2.0. SAX 1.0, SAX 2.0, Namespaces).
40 %setup -q -n xerces-c-src_2_8_0
44 rm -rf doc/html/resources/.svn
45 find ./doc -type f -perm 755 -exec chmod 644 {} \;
46 find ./samples -type f -perm 755 -exec chmod 644 {} \;
47 rm doc/html/apiDocs/XMLRegisterCleanup_8hpp__incl.map
48 rm doc/html/apiDocs/XSConstants_8hpp__incl.map
51 sed -i 's/\r//' doc/charter.xml
52 iconv -f iso8859-1 -t utf-8 credits.txt > credits.utf8 && mv -f credits.{utf8,txt}
53 iconv -f iso8859-1 -t utf-8 doc/feedback.xml > doc/feedback.utf8 && mv -f doc/feedback.{utf8,xml}
54 iconv -f iso8859-1 -t utf-8 doc/migration.xml > doc/migration.utf8 && mv -f doc/migration.{utf8,xml}
55 iconv -f iso8859-1 -t utf-8 doc/releases_archive.xml > doc/releases_archive.utf8 && mv -f doc/releases_archive.{utf8,xml}
59 export XERCESCROOT="$PWD"
61 # Let Makefiles be verbose
62 find -name 'Makefile.*' | while read f; do
64 -e 's/{MAKE} -s/(MAKE)/g' \
69 # Remove conflicting flags from runConfigure
70 find -name runConfigure | while read f; do
71 sed -i -e 's/-w -O -DNDEBUG/-DNDEBUG/g' $f
74 # NB: This is duplicated in 'mingw32-xqilla.spec'.
75 cd $XERCESCROOT/src/xercesc
76 CXXFLAGS="%{_mingw32_cflags}" \
77 CFLAGS="%{_mingw32_cflags}" \
86 -P %{_mingw32_prefix} \
87 -C --libdir="%{_mingw32_libdir}" -C --host=%{_mingw32_host}
90 %{__make} DLLWRAP=%{_mingw32_dllwrap}
94 rm -rf $RPM_BUILD_ROOT
96 export XERCESCROOT="$PWD"
97 %{__make} install -C src/xercesc DESTDIR="$RPM_BUILD_ROOT"
99 # Move the DLLs into the bindir.
100 mkdir -p $RPM_BUILD_ROOT%{_mingw32_bindir}
101 mv $RPM_BUILD_ROOT%{_mingw32_libdir}/*.dll $RPM_BUILD_ROOT%{_mingw32_bindir}/
105 rm -rf $RPM_BUILD_ROOT
109 %defattr(-,root,root)
111 %{_mingw32_includedir}/xercesc/
112 %{_mingw32_bindir}/libxerces-c.dll
113 %{_mingw32_bindir}/libxerces-c28.dll
114 %{_mingw32_bindir}/libxerces-c2_8_0.dll
115 %{_mingw32_bindir}/libxerces-depdom.dll
116 %{_mingw32_bindir}/libxerces-depdom28.dll
117 %{_mingw32_bindir}/libxerces-depdom2_8_0.dll
121 * Fri Feb 20 2009 Richard W.M. Jones <rjones@redhat.com> - 2.8.0-4
122 - Rebuild for mingw32-gcc 4.4
124 * Wed Feb 18 2009 Richard W.M. Jones <rjones@redhat.com> - 2.8.0-3
125 - Initial RPM release.