%define _libdir64 %{_prefix}/lib64 Summary: Library providing XML and HTML support Name: libxml2 Version: 2.9.3 Release: 1 License: MIT Group: Development/Libraries URL: http://xmlsoft.org/ Source0: ftp://xmlsoft.org/%{name}-%{version}.tar.gz Source1: ftp://xmlsoft.org/%{name}-%{version}.tar.gz.asc BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root BuildRequires: libiconv >= 1.14-2 BuildRequires: python-devel >= 2.6.2 BuildRequires: xz-devel >= 5.2.2-1 BuildRequires: zlib-devel >= 1.2.3-7 Requires: libiconv >= 1.14-2 Requires: xz-libs >= 5.2.2-1 Requires: zlib >= 1.2.3-7 %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. The library is available as 32-bit and 64-bit. %package devel Summary: Libraries, includes, etc. to develop XML and HTML applications Group: Development/Libraries Requires: %{name} = %{version}-%{release} Requires: xz-devel >= 5.2.2-1 Requires: zlib-devel Requires: pkg-config %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. If you are compiling a 32-bit program, no special compiler options are needed. If you are compiling a 64-bit program, you have to compile and link your application with "xlc -q64" or "gcc -maix64". %package python Summary: Python bindings for the libxml2 library Group: Development/Libraries Requires: %{name} = %{version}-%{release} Requires: python >= 2.6.2 %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 mkdir ../32bit mv * ../32bit mv ../32bit . mkdir 64bit cd 32bit tar cf - . | (cd ../64bit ; tar xpf -) %build export CONFIG_SHELL=/usr/bin/ksh export CONFIG_ENV_ARGS=/usr/bin/ksh export CC="xlc_r -D_LARGE_FILES=1" cd 64bit # first build the 64-bit version export LDFLAGS="-L/opt/freeware/lib64 -L/opt/freeware/lib -Wl,-blibpath:/opt/freeware/lib64:/opt/freeware/lib:/usr/lib:/lib -Wl,-bmaxdata:0x80000000" export OBJECT_MODE=64 ./configure \ --prefix=%{_prefix} \ --libdir=%{_libdir64} \ --mandir=%{_mandir} \ --enable-shared --disable-static \ --with-python=%{_bindir}/python_64 make %{?_smp_mflags} cd ../32bit # now build the 32-bit version export LDFLAGS="-L/opt/freeware/lib -Wl,-blibpath:/opt/freeware/lib:/usr/lib:/lib -Wl,-bmaxdata:0x80000000" export OBJECT_MODE=32 ./configure \ --prefix=%{_prefix} \ --mandir=%{_mandir} \ --enable-shared --disable-static \ --with-python=%{_bindir}/python make %{?_smp_mflags} gzip --best ChangeLog %install [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} cd 64bit export OBJECT_MODE=64 make install DESTDIR=${RPM_BUILD_ROOT} ( cd ${RPM_BUILD_ROOT}%{_bindir} for f in * ; do mv -f ${f} ${f}_64 done ) cd ../32bit export OBJECT_MODE=32 make install DESTDIR=${RPM_BUILD_ROOT} /usr/bin/strip -X32_64 ${RPM_BUILD_ROOT}%{_bindir}/* || : ( cd ${RPM_BUILD_ROOT}%{_libdir64} for f in *.a ; do /usr/bin/ar -X64 -x ${f} done cd ${RPM_BUILD_ROOT}%{_libdir} for f in *.a ; do /usr/bin/ar -X32 -x ${f} done ) ( cd ${RPM_BUILD_ROOT}%{_libdir}/python*/site-packages /usr/bin/ar -X32 -x libxml2mod.a cd ${RPM_BUILD_ROOT}%{_libdir64}/python*/site-packages /usr/bin/ar -X64 -x libxml2mod.a ) (cd doc/examples ; make clean ; rm -rf .deps) rm -f doc/examples/index.py gzip --best doc/%{name}-api.xml # add the 64-bit shared objects to the shared libraries containing already the # 32-bit shared objects /usr/bin/ar -X64 -q ${RPM_BUILD_ROOT}%{_libdir}/%{name}.a ${RPM_BUILD_ROOT}%{_libdir64}/%{name}.so* ( cd ${RPM_BUILD_ROOT} for dir in bin include lib lib64 do mkdir -p usr/${dir} cd usr/${dir} ln -sf ../..%{_prefix}/${dir}/* . cd - done ) %clean [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} %files %defattr(-,root,system) %doc 32bit/AUTHORS 32bit/ChangeLog.gz 32bit/NEWS %doc 32bit/README 32bit/Copyright 32bit/TODO %{_bindir}/xmlcatalog* %{_bindir}/xmllint* %{_libdir}/lib*.a %{_libdir}/lib*.so* %{_libdir64}/lib*.so* %{_mandir}/man1/xmllint.1 %{_mandir}/man1/xmlcatalog.1 /usr/bin/xmlcatalog* /usr/bin/xmllint* %files devel %defattr(-,root,system) %doc 32bit/AUTHORS 32bit/ChangeLog.gz 32bit/NEWS %doc 32bit/README 32bit/Copyright 32bit/TODO %doc 32bit/doc/*.html 32bit/doc/html 32bit/doc/*.gif 32bit/doc/*.png %doc 32bit/doc/tutorial 32bit/doc/%{name}-api.xml.gz %doc 32bit/doc/examples %doc %{_datadir}/gtk-doc/html/%{name}/*.devhelp %doc %{_datadir}/gtk-doc/html/%{name}/*.html %doc %{_datadir}/gtk-doc/html/%{name}/*.png %doc %{_datadir}/gtk-doc/html/%{name}/*.css %{_bindir}/xml2-config* %{_includedir}/* %{_libdir}/lib*.la %{_libdir64}/lib*.la %{_libdir}/*.sh %{_libdir64}/*.sh %{_libdir}/pkgconfig/* %{_libdir64}/pkgconfig/* %{_mandir}/man1/xml2-config.1 %{_mandir}/man3/libxml.3 %{_datadir}/aclocal/libxml.m4 /usr/bin/xml2-config* /usr/include/* /usr/lib/lib*.la /usr/lib64/lib*.la /usr/lib/*.sh /usr/lib64/*.sh %files python %defattr(-,root,system) %doc 32bit/python/TODO %doc 32bit/python/libxml2class.txt %doc 32bit/python/tests/*.py %doc 32bit/doc/*.py %doc 32bit/doc/python.html %{_libdir}/python*/site-packages/libxml2.py* %{_libdir64}/python*/site-packages/libxml2.py* %{_libdir}/python*/site-packages/drv_libxml2.py* %{_libdir64}/python*/site-packages/drv_libxml2.py* %{_libdir}/python*/site-packages/libxml2mod.* %{_libdir64}/python*/site-packages/libxml2mod.* %changelog * Mon Dec 28 2015 Michael Perzl - 2.9.3-1 - updated to version 2.9.3 * Tue Nov 18 2014 Michael Perzl - 2.9.2-1 - updated to version 2.9.2 * Fri May 03 2013 Michael Perzl - 2.9.1-1 - updated to version 2.9.1 * Tue Oct 16 2012 Michael Perzl - 2.9.0-1 - updated to version 2.9.0 * Tue Oct 16 2012 Michael Perzl - 2.8.0-3 - fixed the collision with libxml2.a provided by bos.rte.control for AIX 6.1 and higher, thus removed the symlinks in /usr/lib * Tue Jul 31 2012 Michael Perzl - 2.8.0-2 - added missing dependency on xz since version 2.8.0 * Tue May 29 2012 Michael Perzl - 2.8.0-1 - updated to version 2.8.0 * Fri Nov 11 2011 Michael Perzl - 2.7.8-2 - added RTL-style shared libraries and python package * Mon Dec 06 2010 Michael Perzl - 2.7.8-1 - updated to version 2.7.8 * Thu Apr 08 2010 Michael Perzl - 2.7.7-1 - updated to version 2.7.7 * Thu Nov 19 2009 Michael Perzl - 2.7.6-1 - updated to version 2.7.6 * Wed Jul 08 2009 Michael Perzl - 2.7.3-1 - updated to version 2.7.3 and removed the dependency on python * Wed Apr 23 2008 Michael Perzl - 2.6.32-1 - updated to version 2.6.32 * Wed Apr 23 2008 Michael Perzl - 2.6.31-2 - some minor spec file fixes * Tue Jan 15 2008 Michael Perzl - 2.6.31-1 - first version for AIX V5.1 and higher