%define _prefix /opt/freeware %define _defaultdocdir %{_prefix}/doc Summary: Library providing XML and HTML support Name: libxml2 Version: 2.6.21 Release: 3 License: MIT Group: Development/Libraries Source: ftp://xmlsoft.org/libxml2-%{version}.tar.bz2 Patch0: libxml2-2.6.21-aix.patch Patch1: libxml2-2.6.21-autotools.patch BuildRoot: %{_tmppath}/%{name}-%{version}-root BuildRequires: python python-devel URL: http://xmlsoft.org/ Prefix: %{_prefix} Docdir: %{_docdir} %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 if test x$PATCH = x ; then PATCH=patch ; fi $PATCH -p2 -s < %{_sourcedir}/libxml2-2.6.21-aix.patch $PATCH -p2 -s < %{_sourcedir}/libxml2-2.6.21-autotools.patch %build export CC=xlc CXX=xlC ./configure --prefix=%{_prefix} make %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 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