%ifos aix6.1 || %ifos aix7.1 %global p7build 1 %else %global p7build 0 %endif %define _libdir64 %{_prefix}/lib64 Summary: Library providing XML and HTML support Name: libxml2 Version: 2.9.8 %if %{p7build} Release: 1.p7 %else Release: 1 %endif 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 Patch0: %{name}-%{version}-aix.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root BuildRequires: make, sed BuildRequires: libiconv >= 1.15-1 BuildRequires: python-devel >= 2.7.13-1 BuildRequires: xz-devel >= 5.2.3-1 BuildRequires: zlib-devel >= 1.2.3-7 Requires: libiconv >= 1.15-1 Requires: xz-libs >= 5.2.3-1 Requires: zlib >= 1.2.3-7 %if %{p7build} %ifos aix6.1 Requires: AIX-rpm >= 6.1.8.0 %endif %ifos aix7.1 Requires: AIX-rpm >= 7.1.3.0 %endif %endif %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.3-1 Requires: zlib-devel >= 1.2.3-7 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_r -q64" or "gcc -maix64". %package python Summary: Python bindings for the libxml2 library Group: Development/Libraries Requires: %{name} = %{version}-%{release} Requires: python >= 2.7.13-1 %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 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" export RM="/usr/bin/rm -f" 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 # hack to get the python binding compiled until I have fixed this in Python! find . -name Makefile -exec /opt/freeware/bin/sed -i "s|Modules/python.exp|%{_libdir64}/python2.7/config/python.exp|g" {} \; gmake %{?_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 # hack to get the python binding compiled until I have fixed this in Python! find . -name Makefile -exec /opt/freeware/bin/sed -i "s|Modules/python.exp|%{_libdir}/python2.7/config/python.exp|g" {} \; gmake %{?_smp_mflags} gzip --best ChangeLog %install [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} export RM="/usr/bin/rm -f" cd 64bit export OBJECT_MODE=64 gmake 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 gmake 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 Apr 30 2018 Michael Perzl - 2.9.8-1 - updated to version 2.9.8 * Wed Nov 15 2017 Michael Perzl - 2.9.7-1 - updated to version 2.9.7 * Wed Nov 15 2017 Michael Perzl - 2.9.6-1 - updated to version 2.9.6 * Mon Sep 18 2017 Michael Perzl - 2.9.5-1 - updated to version 2.9.5 * Mon May 30 2016 Michael Perzl - 2.9.4-1 - updated to version 2.9.4 * 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