%ifarch ia64 x86_64 ppc64 sparc64 %define rcopts -b 64 -p %{_target_os} %else %define rcopts -b 32 -p %{_target_os} %endif %define sver %(echo %{version} | tr . _) %bcond_with libwww Name: xerces-c Version: 2.7.0 Release: 1.n0i.1 Summary: Xerces-C++ XML parser Group: System Environment/Libraries License: Apache Software License URL: http://xml.apache.org/xerces-c/ Source0: http://www.apache.org/dist/xml/xerces-c/source/%{name}-src_%{sver}.tar.gz Patch0: %{name}-runconfigure.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: w3c-libwww-devel BuildRequires: zlib-devel BuildRequires: libicu-devel >= 2.6.1 BuildRequires: sed >= 3.95 %description Xerces-C++ is a validating XML parser written in a portable subset of C++. Xerces-C++ makes it easy to give your application the ability to read and write XML data. A shared library is provided for parsing, generating, manipulating, and validating XML documents. Xerces-C++ is faithful to the XML 1.0 recommendation and many associated standards. The parser provides high performance, modularity, and scalability. %package samples Summary: Sample applications using Xerces-C++ Group: Applications/Text Requires: %{name} = %{version}-%{release} %description samples Sample applications using Xerces-C++. %package devel Summary: Development headers and libraries for Xerces-C++ Group: Development/Libraries Requires: %{name} = %{version}-%{release} %description devel Documentation and development headers and libraries for-Xerces C++. %prep %setup -q -n %{name}-src_%{sver} %patch0 -p1 sed -i -e 's,$\({PREFIX}\|(PREFIX)\)/lib\b,%{_libdir},g' obj/Makefile.in find . -type d -a -name '.svn' |xargs -r %{__rm} -rf %build export XERCESCROOT=$(pwd) export ICUROOT=$(icu-config --prefix) # Note: not using the ICU message loader even when ICU is otherwise used, # it causes borkage for example with samples and the only messages included # in Xerces are en_US anyway. Always use the default (inmem) message loader # since the GNU one seems buggy as well (at least up to 2.5.0). pushd src/xercesc sh ./runConfigure %{rcopts} -t icu -n libwww . _xerces_rpm_env.sh %configure %{__make} # %{?_smp_mflags} # -j X for X > 1 fails as of 2.[3456].0. popd pushd $XERCESCROOT/samples sh ./runConfigure %{rcopts} . _xerces_rpm_env.sh %configure %{__make} %{?_smp_mflags} PLATFORM_LIB_LINK_OPTIONS= popd %if %{?_without_test:0}%{!?_without_test:1} export XERCESCROOT=$(pwd) pushd tests sh ./runConfigure %{rcopts} %{__make} %{?_smp_mflags} # Ahem, running these isn't too easy, there's no "make check". Skipping. popd %endif %install %{__rm} -rf $RPM_BUILD_ROOT %{__make} -C src/xercesc install XERCESCROOT=$(pwd) DESTDIR=$RPM_BUILD_ROOT # Samples %{__mv} bin/obj __obj %{__install} -dm 755 $RPM_BUILD_ROOT%{_bindir} %{__install} -pm 755 bin/* $RPM_BUILD_ROOT%{_bindir} %{__mv} __obj bin/obj %clean %{__rm} -rf $RPM_BUILD_ROOT %post -p /sbin/ldconfig %postun -p /sbin/ldconfig %files %defattr(-,root,root,-) %doc LICENSE* NOTICE STATUS credits.txt %{_libdir}/libxerces-*.so.* %files samples %defattr(-,root,root,-) %{_bindir}/* %files devel %defattr(-,root,root,-) %doc doc/html/* %{_includedir}/xercesc/ %{_libdir}/libxerces-*.so %changelog * Sat Apr 15 2006 Marius FERARU - 2.7.0-1.n0i.1 - reb00t-ed - dropped optional "libwww" - dropped doc package (included in devel) * Tue Feb 7 2006 Ville Skyttä - 2.7.0-0.2 - Make build with ICU unconditional. - Fix lib64 install paths. - Specfile cleanups. * Wed Sep 14 2005 Ville Skyttä - 2.7.0-0.1 - 2.7.0, ICU 3.4. * Wed Jun 15 2005 Ville Skyttä - 2.6.0-0.1 - Rebuild for FC4. * Sat Dec 4 2004 Ville Skyttä - 0:2.6.0-0.fdr.2 - Disable building the tests (failure), they're not run anyway. - Drop Debian patch, no longer needed. * Mon Oct 4 2004 Ville Skyttä - 0:2.6.0-0.fdr.1 - Update to 2.6.0. * Sun Jul 18 2004 Ville Skyttä - 0:2.5.0-0.fdr.3 - Use ICU transcoder by default. Rebuild using "--without icu" to disable. If built with ICU, provide xerces-c-icu for Xalan. - Use default (socket) netaccessor by default to get samples working with for example http:// URLs. Rebuild using "--with libwww" to use libwww. - Apply patch from Debian to fix gcc 3.4 build. - Trim non-system lib dirs from build. - Drop symlinks patch, apparently no longer needed. - Rename -docs subpackage to -doc. * Tue May 4 2004 Ville Skyttä - 0:2.5.0-0.fdr.2 - Resurrect -samples subpackage. * Sun Mar 14 2004 Ville Skyttä - 0:2.5.0-0.fdr.1 - Update to 2.5.0. - Use libwww net accessor by default (to disable rebuild --without libwww). * Wed Jan 28 2004 Ville Skyttä - 0:2.4.0-0.fdr.2 - Build cleanups, drop -samples subpackage. * Sat Dec 13 2003 Ville Skyttä - 0:2.4.0-0.fdr.1 - Update to 2.4.0. - ICU build fixes, not quite complete yet. * Sun Nov 23 2003 Ville Skyttä - 0:2.3.0-0.fdr.3 - Add --with icu/libwww rpmbuild options (unsuccessful so far though). * Wed Aug 27 2003 Ville Skyttä - 0:2.3.0-0.fdr.2 - Fix build wrt.%%{_smp_mflags}. * Sat May 3 2003 Ville Skyttä - 0:2.2.0-0.fdr.1 - First release.