%define upstream_name XML_DTD %define xmldir %{_var}/lib/pear %define peardir %(pear config-get php_dir 2> /dev/null) Name: php-pear-%{upstream_name} Version: 0.5.2 Release: %mkrel 2 Summary: Parsing of DTD files and DTD validation of XML files License: BSD License Group: Development/PHP Source0: http://pear.php.net/get/XML_DTD-%{version}.tgz URL: http://pear.php.net/package/XML_DTD BuildRequires: php-pear >= 1.4.7 Requires: php-pear-XML_Parser >= 1.3.1 BuildArch: noarch %description Parsing of DTD files and DTD validation of XML files. The XML validation is done with the php sax parser, the xml extension, it does not use the domxml extension. Currently supports most of the current XML spec, including entities, elements and attributes. Some uncommon parts of the spec may still be unsupported. %prep %setup -c -T pear -v -c pearrc \ -d php_dir=%{peardir} \ -d doc_dir=/docs \ -d bin_dir=%{_bindir} \ -d data_dir=%{peardir}/data \ -d test_dir=%{peardir}/tests \ -d ext_dir=%{_libdir} \ -s %build %install rm -rf %{buildroot} pear -c pearrc install --nodeps --packagingroot %{buildroot} %{SOURCE0} # Clean up unnecessary files rm pearrc rm %{buildroot}/%{peardir}/.filemap rm %{buildroot}/%{peardir}/.lock rm -rf %{buildroot}/%{peardir}/.registry rm -rf %{buildroot}%{peardir}/.channels rm %{buildroot}%{peardir}/.depdb rm %{buildroot}%{peardir}/.depdblock # Install XML package description mkdir -p %{buildroot}%{xmldir} tar -xzf %{SOURCE0} package2.xml cp -p package2.xml %{buildroot}%{xmldir}/XML_DTD.xml %clean rm -rf %{buildroot} %post pear install --nodeps --soft --force --register-only %{xmldir}/XML_DTD.xml %postun if [ "$1" -eq "0" ]; then pear uninstall --nodeps --ignore-errors --register-only pear.php.net/XML_DTD fi %files %defattr(-,root,root) %{peardir}/* %{xmldir}/XML_DTD.xml %changelog * Sun Jan 13 2013 umeabot <umeabot> 0.5.2-2.mga3 + Revision: 377390 - Mass Rebuild - https://wiki.mageia.org/en/Feature:Mageia3MassRebuild * Fri Jan 13 2012 spuhler <spuhler> 0.5.2-1.mga2 + Revision: 195577 - upgrade to 0.5.2 pearized spec * Fri Jan 21 2011 spuhler <spuhler> 0.5.1-4.mga1 + Revision: 28054 - removed buildroot definition from .spec removed the if mdkversion lines - imported package php-pear-XML_DTD