Need redhat-rpm-config for SUSE build service.
[shibboleth/cpp-xmltooling.git] / dependencies / xerces / xerces-c.spec
index a6dff01..758544b 100644 (file)
@@ -1,21 +1,19 @@
-%define tarversion 2_7_1
-%define barename xerces-c
-
-# threads
-# values: pthreads, none
-%define threads pthreads
-
-Summary:       Xerces-C++ validating XML parser
-Name:          xerces271-c
-Version:       2.7.1
-Release:       1
-URL:           http://shibboleth.internet2.edu/downloads/
-Source0:       %{barename}-src_%{tarversion}.tar.gz
-License:       Apache
-Group:                 Libraries
-BuildRoot:     %{_tmppath}/%{name}-root
-Prefix:                /usr
-Obsoletes:     %{barename} <= %{version}
+Summary:    Xerces-C++ validating XML parser
+Name:       xerces-c
+Version:    3.0.1
+Release:    1
+URL:        http://xerces.apache.org/xerces-c/
+Source0:    %{name}-%{version}.tar.gz
+License:        Apache
+Group:      Libraries
+BuildRoot:  %{_tmppath}/%{name}-root
+Prefix:     /usr
+BuildRequires: gcc-c++
+%{?_with_curl:BuildRequires: curl-devel}
+%{?_with_icu:BuildRequires: libicu-devel}
+%if "%{_vendor}" == "redhat"
+BuildRequires: redhat-rpm-config
+%endif
 
 %description
 Xerces-C++ is a validating XML parser written in a portable subset of C++.
@@ -28,20 +26,10 @@ code, samples and API documentation are provided with the parser. For
 portability, care has been taken to make minimal use of templates, no RTTI,
 and minimal use of #ifdefs.
 
-%package        samples
-Summary:        Sample applications using Xerces-C++
-Group:          Applications/Text
-Requires:       %{name} = %{version}-%{release}
-Obsoletes:     %{barename}-samples <= %{version}
-
-%description    samples
-Sample applications using Xerces-C++.
-
 %package devel
-Requires:      %{name} = %{version}-%{release}
-Obsoletes:     %{barename}-devel <= %{version}
-Group:         Development/Libraries
-Summary:       Header files for Xerces-C++ validating XML parser
+Requires:   %{name} = %{version}
+Group:      Development/Libraries
+Summary:    Header files for Xerces-C++ validating XML parser
 
 %description devel
 Header files you can use to develop XML applications with Xerces-C++.
@@ -51,80 +39,46 @@ 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.
 
-%package doc
-Obsoletes:     %{barename}-doc <= %{version}
-Group:         Documentation
-Summary:       Documentation for Xerces-C++ validating XML parser
-
-%description doc
-Documentation for Xerces-C++.
-
-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.
-
 %prep
-%setup -q -n %{barename}-src_%{tarversion}
+%setup -q
 
 %build
-export CC=%{__cc}
-export CXX=%{__cxx}
-
-%ifarch alpha ppc64 s390x sparc64 x86_64 ia64
-  %define rcopts -b 64 -p %{_target_os}
-%else
-  %define rcopts -b 32 -p %{_target_os}
-%endif
-
-export XERCESCROOT=`pwd`
-cd $XERCESCROOT/src/xercesc
-./runConfigure %{rcopts} -C --libdir="%{_libdir}" -minmem -nsocket -tnative -r%{threads} -P%{prefix}
-make
-cd $XERCESCROOT/samples
-./runConfigure %{rcopts}
-make
+%configure %{?_with_curl:--enable-netaccessor-curl} %{!?_with_curl:--disable-netaccessor-curl} %{?_with_icu:--enable-transcoder-icu --enable-msgloader-icu} %{?xerces_options}
+%{__make}
 
 %install
-rm -rf $RPM_BUILD_ROOT
-make -C src/xercesc install XERCESCROOT=`pwd` DESTDIR=$RPM_BUILD_ROOT
-if [ ! -e $RPM_BUILD_ROOT%{_prefix}/%{_lib} ]; then
-       mv $RPM_BUILD_ROOT%{_prefix}/lib $RPM_BUILD_ROOT%{_prefix}/%{_lib} 
-fi
-# Samples
-mv bin/obj __obj
-install -dm 755 $RPM_BUILD_ROOT%{_bindir}
-install -pm 755 bin/* $RPM_BUILD_ROOT%{_bindir}
-mv __obj bin/obj
+%{__make} install DESTDIR=$RPM_BUILD_ROOT
 
 %clean
-rm -rf $RPM_BUILD_ROOT
+[ "$RPM_BUILD_ROOT" != "/" ] && %{__rm} -rf $RPM_BUILD_ROOT
 
+%ifnos solaris2.8 solaris2.9 solaris2.10
 %post -p /sbin/ldconfig
+%endif
 
+%ifnos solaris2.8 solaris2.9 solaris2.10
 %postun -p /sbin/ldconfig
+%endif
 
 %files
-%defattr(-,root,root,-)
-%doc LICENSE* NOTICE STATUS credits.txt
-%{_libdir}/libxerces-*.so.*
-
-%files samples
-%defattr(-,root,root,-)
+%defattr(755,root,root)
 %{_bindir}/*
+%{_libdir}/lib%{name}-*.so
 
 %files devel
-%defattr(-,root,root,-)
-%{_includedir}/xercesc
-%{_libdir}/libxerces-*.so
-
-%files doc
-%defattr(644,root,root,755)
-%doc doc/html/*
+%defattr(-,root,root)
+%{_includedir}
+%{_libdir}/lib%{name}.so
+%{_libdir}/lib%{name}.a
+%{_libdir}/pkgconfig/%{name}.pc
+%exclude %{_libdir}/lib%{name}.la
 
 %changelog
-* Wed Jun  6 2007 Scott Cantor <cantor.2@osu.edu>
-- reapply improvements from our spec file for 2.6.0
+* Wed Aug  5 2009 Scott Cantor <cantor.2@osu.edu> 3.0.1-1
+- Disabled curl thanks to Red Hat
+
+* Fri Mar  7 2008 Boris Kolpackov <boris@codesynthesis.com>
+- Integrated updates for 3.0.0 from Scott Cantor.
 
 * Fri Jun  6 2003 Tuan Hoang <tqhoang@bigfoot.com>
 - updated for new Xerces-C filename and directory format