libxerces-c/libxerces-c.spec

162 lines
4.6 KiB
RPMSpec

#%define pckver %(echo %version | tr '.' '_')
%define majver %(echo %version | cut -d. -f 1-2)
Name: libxerces-c
Version: 3.1.1
Release: 2mamba
Summary: A validating XML parser written in a portable subset of C++
Group: System/Libraries
Vendor: openmamba
Distribution: openmamba
Packager: Stefano Cotta Ramusino <stefano.cotta@openmamba.org>
URL: http://xml.apache.org/xerces-c
Source: http://mirror.soluzionisis.com/apache/xerces/c/3/sources/xerces-c-%{version}.tar.gz
#http://apache.fagioli.biz/xerces/c/sources/xerces-c-src_%{pckver}.tar.gz
License: Apache License Version 2.0
## AUTOBUILDREQ-BEGIN
BuildRequires: glibc-devel
BuildRequires: libcurl-devel
BuildRequires: libgcc
BuildRequires: libicu-devel
BuildRequires: libstdc++6-devel
## AUTOBUILDREQ-END
BuildRoot: %{_tmppath}/%{name}-%{version}-root
%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.
Source 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 devel
Group: Development/Libraries
Summary: Static libraries and headers for %{name}
Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release}
%description devel
Xerces-C++ is a validating XML parser written in a portable subset of C++.
This package contains static libraries and header files need for development.
%package tools
Group: System/Tools
Summary: Tools provided with %{name}
Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release}
%description tools
Xerces-C++ is a validating XML parser written in a portable subset of C++.
This package contains tools provided by %{name}.
%package doc
Group: Documentation
Summary: Documentation for %{name}
Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release}
%description doc
Xerces-C++ is a validating XML parser written in a portable subset of C++.
This package contains documentation for %{name}.
%prep
%setup -q -n xerces-c-%{version}
rm -rf doc/html/resources/.svn
find ./doc -type f -perm 755 -exec chmod 644 {} \;
find ./samples -type f -perm 755 -exec chmod 644 {} \;
iconv -f iso8859-1 -t utf-8 doc/migration.xml > doc/migration.utf8 && mv -f doc/migration.{utf8,xml}
# let make be more verbose
for makefile in $(find -name 'Makefile.*'); do
sed -i -e 's/$Q//g' \
-e 's/{MAKE} -s/(MAKE)/g' \
-e '/echo \" (/d' \
$makefile
done
%build
export XERCESCROOT=$(pwd)
export ICUROOT=%{_prefix}
CXXFLAGS="%{optflags}" CFLAGS="%{optflags}" %configure
make -j1
%install
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
export XERCESCROOT=$(pwd)
%makeinstall
%clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%files
%defattr(-,root,root)
%{_libdir}/libxerces-c-%{majver}.so
%doc CREDITS KEYS LICENSE NOTICE README
%files devel
%defattr(-,root,root)
%dir %{_includedir}/xercesc
%{_includedir}/xercesc/dom
%{_includedir}/xercesc/framework
%{_includedir}/xercesc/internal
%{_includedir}/xercesc/parsers/
%{_includedir}/xercesc/sax2
%{_includedir}/xercesc/sax
%{_includedir}/xercesc/util
%{_includedir}/xercesc/validators
%{_includedir}/xercesc/xinclude
%{_libdir}/libxerces-c.a
%{_libdir}/libxerces-c.la
%{_libdir}/libxerces-c.so
%{_libdir}/pkgconfig/xerces-c.pc
%files tools
%defattr(-,root,root)
%{_bindir}/CreateDOMDocument
%{_bindir}/DOMCount
%{_bindir}/DOMPrint
%{_bindir}/EnumVal
%{_bindir}/MemParse
%{_bindir}/PParse
%{_bindir}/PSVIWriter
%{_bindir}/Redirect
%{_bindir}/SAX2Count
%{_bindir}/SAX2Print
%{_bindir}/SAXCount
%{_bindir}/SAXPrint
%{_bindir}/SCMPrint
%{_bindir}/SEnumVal
%{_bindir}/StdInParse
%{_bindir}/XInclude
%files doc
%defattr(-,root,root)
%doc doc samples
%changelog
* Fri Aug 10 2012 Silvan Calarco <silvan.calarco@mambasoft.it> 3.1.1-2mamba
- renamed from libxerces-c3 to libxerces-c
* Fri Aug 10 2012 Silvan Calarco <silvan.calarco@mambasoft.it> 3.1.1-1mamba
- update to 3.1.1
* Tue Mar 24 2009 gil <puntogil@libero.it> 3.0.1-1mamba
- update to 3.0.1
- edit spec file
- added package doc
* Thu Oct 18 2007 Silvan Calarco <silvan.calarco@mambasoft.it> 2.8.0-1mamba
- update to 2.8.0
* Fri Jun 08 2007 Stefano Cotta Ramusino <stefano.cotta@openmamba.org> 2.7.0-1mamba
- package created by autospec