%define _prefix /opt/freeware %define _defaultdocdir %{_prefix}/doc Summary: Library providing XML and HTML support Name: libxml2 Version: 2.7.8 Release: 1 License: MIT Group: Development/Libraries Source: ftp://xmlsoft.org/libxml2-%{version}.tar.gz Patch0: libxml2-2.7.8-hash_cve.patch Patch1: libxml2-2.7.8-heap_cve.patch BuildRoot: %{_tmppath}/%{name}-%{version}-root BuildRequires: python python-devel URL: http://xmlsoft.org/ Prefix: %{_prefix} Docdir: %{_docdir} %define prefix64 %{prefix}/64 %description This library allows to manipulate XML files. It includes support to read, modify and write XML and HTML files. There is DTDs support this includes parsing and validation even with complex DtDs, either at parse time or later once the document has been modified. The output can be a simple SAX stream or and in-memory DOM like representations. In this case one can use the built-in XPath and XPointer implementation to select subnodes or ranges. A flexible Input/Output mechanism is available, with existing HTTP and FTP modules and combined to an URI library. %package devel Summary: Libraries, includes, etc. to develop XML and HTML applications Group: Development/Libraries Requires: libxml2 = %{version} Requires: zlib-devel %description devel Libraries, include files, etc you can use to develop XML applications. This library allows to manipulate XML files. It includes support to read, modify and write XML and HTML files. There is DTDs support this includes parsing and validation even with complex DtDs, either at parse time or later once the document has been modified. The output can be a simple SAX stream or and in-memory DOM like representations. In this case one can use the built-in XPath and XPointer implementation to select subnodes or ranges. A flexible Input/Output mechanism is available, with existing HTTP and FTP modules and combined to an URI library. #%package python #Summary: Python bindings for the libxml2 library #Group: Development/Libraries #Requires: libxml2 = %{version} #Requires: python #%description python #The libxml2-python package contains a module that permits applications #written in the Python programming language to use the interface #supplied by the libxml2 library to manipulate XML files. #This library allows to manipulate XML files. It includes support #to read, modify and write XML and HTML files. There is DTDs support #this includes parsing and validation even with complex DTDs, either #at parse time or later once the document has been modified. %prep %setup -q %patch0 -p0 -b .hash_cve %patch1 -p0 -b .heap_cve %build export CC=/usr/vac/bin/xlc_r export CXX=/usr/vacpp/bin/xlC_r export NM='/usr/bin/nm -B ' export AR=/usr/bin/ar ######################## # build 64-bit ######################## mkdir 64 cd 64 # Note: we currenlty don't have a 64-bit version of python to bind to. OBJECT_MODE=64 ../configure --prefix=%{prefix64} --disable-static --without-python OBJECT_MODE=64 make ######################## # build 32-bit ######################## cd .. ./configure --prefix=%{_prefix} --disable-static make ############################################# # Combine 64-bit library into 32-bit version. ############################################# $AR -X64 cru .libs/libxml2.a 64/.libs/libxml2.so.2 %install if test "%{buildroot}" != "/"; then rm -rf %{buildroot} fi mkdir -p %{buildroot} make DESTDIR=%{buildroot} install # Prototype support gtk 64 bit mkdir -p %{buildroot}/opt/freeware/64/lib cd %{buildroot}/opt/freeware/64/lib ln -sf ../../lib/libxml2.a . #symlinks (cd %{buildroot} for dir in bin lib share include do mkdir -p usr/$dir cd usr/$dir ln -sf ../..%{_prefix}/$dir/* . cd - done ) %post # # AIX itself may provide libxml2.a. # if [ -e /usr/ccs/lib/libxml2.a ]; then ln -sf /usr/ccs/lib/libxml2.a /usr/lib/libxml2.a mkdir -p /usr/linux/lib ln -sf /opt/freeware/lib/libxml2.a /usr/linux/lib/libxml2.a else ln -sf /opt/freeware/lib/libxml2.a /usr/lib/libxml2.a fi %postun # # If AIX provides libxml2.a, don't lose the link in /usr/lib. # if [ "$1" = 0 ]; then if [ -e /usr/ccs/lib/libxml2.a ]; then ln -sf /usr/ccs/lib/libxml2.a /usr/lib/libxml2.a else rm -f /usr/lib/libxml2.a fi rm -f /usr/linux/lib/libxml2.a fi %files %defattr(-, root, system) %doc AUTHORS ChangeLog NEWS README Copyright TODO #%doc %{_mandir}/man1/xmllint.1* #%doc %{_mandir}/man1/xmlcatalog.1* #%doc %{_mandir}/man3/libxml.3* %{_libdir}/lib*.a %{_prefix}/64/lib/lib*.a %{_bindir}/xmllint %{_bindir}/xmlcatalog /usr/lib/lib*.a /usr/bin/xmllint /usr/bin/xmlcatalog %files devel %defattr(-, root, system) #%doc %{_mandir}/man1/xml2-config.1* #%doc AUTHORS ChangeLog NEWS README Copyright TODO #%doc doc/*.html doc/html doc/*.gif doc/*.png %{_includedir}/* %{_bindir}/xml2-config %{_datadir}/aclocal/libxml.m4 %{_libdir}/lib*a %{_prefix}/64/lib/lib*a %{_libdir}/*.sh %{_libdir}/pkgconfig/libxml-2.0.pc /usr/include/* /usr/bin/xml2-config /usr/lib/* #/usr/share/* #%files python #%defattr(-, root, system) #%doc AUTHORS ChangeLog NEWS README Copyright # # ??? @faur1d # Many pbs with this package: to do soon # # %{_libdir}/python*/site-packages/libxml2.py # %{_libdir}/python*/site-packages/libxml2mod.so #%doc python/TODO #%doc python/libxml2class.txt #%doc python/tests/*.py %changelog * Thu May 22 2009 Dan McNichol 2.6.21-4 - Add 64-bit support to libxml2.a * Thu Nov 29 2007 Reza Arbab 2.6.21-3 - libxml2 is provided by AIX 6.1. Do not clobber it. * Fri Dec 23 2005 BULL - Release 2 - Prototype gtk 64 bit * Tue Nov 15 2005 BULL - Release 1 - New version version: 2.6.21 * Wed Aug 10 2005 BULL - Release 3 - Create symlinks between /usr/share/ and /opt/freeware/share * Mon May 30 2005 BULL - Release 2 - .o removed from lib - correct libxml2.a member to libxml2.so.2 * Wed May 11 2005 BULL - Release 1 - New version version: 2.6.17