--- /dev/null
+libxml2
+libxml2-devel
+ requires "libxml2-<targettype> = <version>"
--- /dev/null
+* Mon Mar 18 2013 Anas Nashif <anas.nashif@intel.com> upstream/2.8.0@a14fbb2
+- Fixed package groups
+
--- /dev/null
+<manifest>
+ <request>
+ <domain name="_"/>
+ </request>
+</manifest>
--- /dev/null
+
+%if "%{run_tests}" == "1"
+ %define check %%check
+%endif
+
+
+Name: libxml2
+Version: 2.9.4
+Release: 0
+Summary: A Library to Manipulate XML Files
+License: MIT
+Group: System/Libraries
+Url: http://xmlsoft.org
+# Source ftp://xmlsoft.org/libxml2/libxml2-git-snapshot.tar.gz changes every day
+Source: ftp://xmlsoft.org/libxml2/%{name}-%{version}.tar.gz
+Source2: baselibs.conf
+Source1001: libxml2.manifest
+BuildRequires: pkg-config
+BuildRequires: readline-devel
+BuildRequires: xz-devel
+BuildRequires: zlib-devel
+
+%description
+The XML C library was initially developed for the GNOME project. It is
+now used by many programs to load and save extensible data structures
+or manipulate any kind of XML files.
+
+This library implements a number of existing standards related to
+markup languages, including the XML standard, name spaces in XML, XML
+Base, RFC 2396, XPath, XPointer, HTML4, XInclude, SGML catalogs, and
+XML catalogs. In most cases, libxml tries to implement the
+specification in a rather strict way. To some extent, it provides
+support for the following specifications, but does not claim to
+implement them: DOM, FTP client, HTTP client, and SAX.
+
+The library also supports RelaxNG. Support for W3C XML Schemas is in
+progress.
+
+
+%package tools
+Summary: Tools using libxml
+Group: System/Libraries
+
+%description tools
+This package contains xmllint, a very useful tool proving libxml's power.
+
+%package devel
+Summary: Include Files and Libraries mandatory for Development
+Group: Development/Libraries
+Requires: %{name} = %{version}
+Requires: %{name}-tools = %{version}
+Requires: glibc-devel
+Requires: readline-devel
+Requires: xz-devel
+Requires: zlib-devel
+
+%description devel
+This package contains all necessary include files and libraries needed
+to develop applications that require these.
+
+%prep
+%setup -q
+cp %{SOURCE1001} .
+
+%build
+%configure --disable-static \
+ --docdir=%_docdir/%name \
+ --with-html-dir=%_docdir/%name/html \
+ --with-fexceptions \
+ --with-history \
+ --without-python \
+ --enable-ipv6 \
+ --with-sax1 \
+ --with-regexps \
+ --with-threads \
+ --with-reader \
+ --with-http
+
+make %{?_smp_mflags} BASE_DIR="%_docdir" DOC_MODULE="%name"
+
+%check
+rm -f /tmp/%{name}_test
+%__make runtests | tee -i /tmp/%{name}_log
+cat /tmp/%{name}_log | grep "^TEST: " > /tmp/%{name}_test
+chmod +x ./run_test.sh
+./run_test.sh %{name} %{version}
+rm -f /tmp/%{name}_log
+
+
+%install
+make install DESTDIR="%buildroot" BASE_DIR="%_docdir" DOC_MODULE="%name"
+ln -s libxml2/libxml %{buildroot}%{_includedir}/libxml
+
+%remove_docs
+
+%post -p /sbin/ldconfig
+
+%postun -p /sbin/ldconfig
+
+%files
+%manifest %{name}.manifest
+%defattr(-, root, root)
+%license Copyright
+%{_libdir}/lib*.so.*
+
+%files tools
+%manifest %{name}.manifest
+%defattr(-, root, root)
+%license Copyright
+%{_bindir}/xmllint
+%{_bindir}/xmlcatalog
+
+%files devel
+%manifest %{name}.manifest
+%defattr(-, root, root)
+%license Copyright
+%{_bindir}/xml2-config
+%dir %{_datadir}/aclocal
+%{_datadir}/aclocal/libxml.m4
+%{_includedir}/libxml
+%{_includedir}/libxml2
+%{_libdir}/lib*.so
+# libxml2.la is needed for the python-libxml2 build. Deleting it breaks build of python-libxml2.
+%{_libdir}/libxml2.la
+%{_libdir}/*.sh
+%{_libdir}/pkgconfig/*.pc
+%{_libdir}/cmake/libxml2/libxml2-config.cmake
+
+%changelog
--- /dev/null
+Name: python-libxml2
+Version: 2.9.4
+Release: 0
+Summary: Python Bindings for libxml2
+License: MIT
+Group: Development/Python
+Url: http://xmlsoft.org
+Source: ftp://xmlsoft.org/libxml2/libxml2-%{version}.tar.gz
+BuildRoot: %{_tmppath}/%{name}-%{version}-build
+BuildRequires: libxml2-devel
+BuildRequires: python-devel
+BuildRequires: python-xml
+Requires: libxml2 = %{version}
+Obsoletes: libxml2-python < %{version}
+Provides: libxml2-python = %{version}
+
+%description
+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 manipulation of XML files. It includes support for
+reading, modifying, and writing XML and HTML files. There is DTD
+support that includes parsing and validation even with complex DTDs,
+either at parse time or later once the document has been modified.
+
+%prep
+%setup -q -n libxml2-%{version}
+
+%build
+export CFLAGS="%{optflags} -fno-strict-aliasing"
+%configure \
+ --with-fexceptions \
+ --with-history \
+ --enable-ipv6 \
+ --with-sax1 \
+ --with-regexps \
+ --with-threads \
+ --with-reader \
+ --with-http
+
+# use libxml2 as built by libxml2 source package
+mkdir .libs
+cp -v %{_libdir}/libxml2.la .
+make -C python %{?_smp_mflags}
+
+%install
+make -C python install \
+ DESTDIR=%{buildroot} \
+ pythondir=%{py_sitedir} \
+ PYTHON_SITE_PACKAGES=%{py_sitedir}
+chmod a-x python/tests/*.py
+# Unwanted doc stuff
+rm -fr %{buildroot}%{_datadir}/doc
+rm -f python/tests/Makefile*
+# #223696
+rm -f %{buildroot}%{py_sitedir}/*.{la,a}
+
+%files
+%defattr(-, root, root)
+%license Copyright
+%doc python/libxml2class.txt
+%doc python/tests
+%{py_sitedir}/*
+
+%changelog
--- /dev/null
+#!/bin/bash
+
+PACKAGE_NAME=$1
+PACKAGE_VERSION=$2
+
+TEST_LOG="/tmp/${PACKAGE_NAME}_test"
+export TEST_LOG
+
+# Color
+Color_Off='\e[0m' # Text Reset
+
+# Regular Colors
+Red='\e[0;31m' # Red
+Green='\e[0;32m' # Green
+Cyan='\e[0;36m' # Cyank
+
+# Bold
+BWhite='\e[1;37m' # White
+
+result_check() {
+ test_case=$1
+ if [ $? -eq 0 ]
+ then
+ echo -e "${Green}PASS${Color_Off}: $test_case"
+ echo "TEST: PASS: $test_case" >> ${TEST_LOG}
+ else
+ echo -e "${Red}FAIL${Color_Off}: $test_case"
+ echo -e "TEST: FAIL: $test_case" >> ${TEST_LOG}
+ fi
+}
+
+skip_test() {
+ test_case=$1
+ echo -e "${Cyan}SKIP${Color_Off}: $test_case"
+ echo "TEST: SKIP: $test_case" >> ${TEST_LOG}
+}
+
+TOTAL_CNT=`grep "TEST:" ${TEST_LOG} | wc -l`
+PASS_CNT=`grep "PASS:" ${TEST_LOG} | wc -l`
+FAIL_CNT=`grep "FAIL:" ${TEST_LOG} | wc -l`
+SKIP_CNT=`grep "SKIP:" ${TEST_LOG} | wc -l`
+
+
+br='==================='; br=$br$br$br$br;
+
+echo -e "${Green}$br ${Color_Off}"
+echo -e "${Green}Testsuite summary for ${PACKAGE_NAME} ${PACKAGE_VERSION}${Color_Off}"
+echo -e "${Green}$br ${Color_Off}"
+echo -e "#${BWhite} TOTAL: $TOTAL_CNT ${Color_Off}"
+echo -e "#${Green} PASS${Color_Off} : $PASS_CNT"
+echo -e "#${Red} FAIL${Color_Off} : $FAIL_CNT"
+echo -e "#${Cyan} SKIP${Color_Off} : $SKIP_CNT"
+echo -e "${Green}$br ${Color_Off}"
+
+rm -f ${TEST_LOG}
+exit 0
+