Search
j0ke.net Open Build Service
>
Projects
>
server:php:applications
>
php5-pear-xml_parser
> Changes
Sign Up
|
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
Changes of Revision 3
[-]
[+]
Added
php5-pear-xml_parser.spec
@@ -0,0 +1,97 @@ +# +# spec file for package php5-pear-xml_parser +# +# This file and all modifications and additions to the pristine +# package are under the same license as the package itself. +# + + +# norootforbuild + + +Name: php5-pear-xml_parser +Version: 1.2.8 +Release: 0 +Summary: XML parsing class based on PHP's bundled expat +License: PHP License +Group: Development/Libraries/PHP +Url: http://pear.php.net/package/XML_Parser +Source0: http://download.pear.php.net/package/XML_Parser-%version.tgz +BuildArch: noarch +PreReq: php5-pear +BuildRequires: php5-pear +BuildRoot: %{_tmppath}/%{name}-%{version}-build +%define peardir %(pear config-get php_dir 2> /dev/null) +%define xmldir %{_var}/lib/pear + +%description +This is an XML parser based on PHPs built-in xml extension. + +It supports two basic modes of operation: "func" and "event". In "func" mode, +it will look for a function named after each element (xmltag_ELEMENT for start +tags and xmltag_ELEMENT_ for end tags), and in "event" mode it uses a set of +generic callbacks. + +Since version 1.2.0 there's a new XML_Parser_Simple class that makes parsing of +most XML documents easier, by automatically providing a stack for the elements. +Furthermore its now possible to split the parser from the handler object, so +you do not have to extend XML_Parser anymore in order to parse a document with +it. + +Author: +------- + Stig Bakken + Stephan Schmidt + Thomas V.V.Cox + + +%prep +%setup -c -T +pear -v -c pearrc \ + -d php_dir=%{peardir} \ + -d doc_dir=%_defaultdocdir/%name \ + -d bin_dir=%{_bindir} \ + -d data_dir=%{peardir}/data \ + -d test_dir=%{peardir}/tests \ + -d ext_dir=%{_libdir} \ + -s + +%build + + +%install +pear -c pearrc install --offline --nodeps --packagingroot %{buildroot} %{SOURCE0} +%__rm -rf %{buildroot}/%{peardir}/.{filemap,lock,registry,channels,depdb,depdblock} + +# Install XML package description +%__mkdir_p %{buildroot}%{xmldir} +%__tar -xzf %{SOURCE0} package.xml +%__cp package.xml %{buildroot}%{xmldir}/XML_Parser.xml + + +%clean +%__rm -rf %{buildroot} + + +%post +pear install --nodeps --soft --force --register-only %{xmldir}/XML_Parser.xml + + +%postun +if [ "$1" -eq "0" ]; then + pear uninstall --nodeps --ignore-errors --register-only pear.php.net/XML_Parser +fi + + +%files +%defattr(-, root, root) +%doc %_defaultdocdir/%name +%dir %peardir/XML +%dir %peardir/XML/Parser +%peardir/XML/Parser.php +%peardir/XML/Parser/Simple.php +%peardir/tests/XML_Parser +%xmldir/XML_Parser.xml + + +%changelog