Sophie

Sophie

distrib > Mageia > 3 > i586 > media > core-release-src > by-pkgid > 9c7516864a861b94e4017e629957fed3 > files > 2

php-pear-PHP_Parser-0.2.1-5.mga3.src.rpm

%define		_class		PHP
%define		_subclass	Parser
%define		upstream_name	%{_class}_%{_subclass}

Name:		php-pear-%{upstream_name}
Version:	0.2.1
Release:	%mkrel 5
Summary:	A PHP grammar parser
License:	PHP License
Group:		Development/PHP
URL:		http://pear.php.net/package/PHP_Parser/
Source0:	http://download.pear.php.net/package/%{upstream_name}-%{version}.tgz
Requires(post): php-pear
Requires(preun): php-pear
Requires:	php-pear
BuildArch:	noarch
BuildRequires:	php-pear

%description
PHP_Parser is a source code analysis tool based around a real Parser
generated by phpJay. The parser uses the same EBNF source that PHP
uses to parse itself, and it therefore as robust as PHP itself.
This version has full support for parsing out every re-usable element
in PHP 5 as of beta 1:
- classes
- abstract classes
- inheritance, implements
- interfaces
- methods
- exception parsing directly from source
- static variables declared
- global and superglobal ($_GET) variables used
and declared
- variables
- constants
- functions (same information as methods)
- defines
- global variables (with help of the Tokenizer Lexer)
- superglobal variables used in global code
- include statements

The output can be customized to return an array, return
objects of user-specified classes, and can also be
customized to publish each element as it is parsed, allowing
hooks into parsing to catch information.

%prep
%setup -q -c
mv package.xml %{upstream_name}-%{version}/%{upstream_name}.xml

%install
rm -rf %{buildroot}

cd %{upstream_name}-%{version}
pear install --nodeps --packagingroot %{buildroot} %{upstream_name}.xml
rm -rf %{buildroot}%{_datadir}/pear/.??*

rm -rf %{buildroot}%{_datadir}/pear/docs
rm -rf %{buildroot}%{_datadir}/pear/tests

install -d %{buildroot}%{_datadir}/pear/packages
install -m 644 %{upstream_name}.xml %{buildroot}%{_datadir}/pear/packages

%clean
rm -rf %{buildroot}


%files
%defattr(-,root,root)
%doc %{upstream_name}-%{version}/docs/*
%doc %{upstream_name}-%{version}/examples
%{_datadir}/pear/%{_class}
%{_datadir}/pear/data/%{upstream_name}
%{_datadir}/pear/packages/%{upstream_name}.xml






%changelog

* Sun Jan 13 2013 umeabot <umeabot> 0.2.1-5.mga3
+ Revision: 377212
- Mass Rebuild - https://wiki.mageia.org/en/Feature:Mageia3MassRebuild

* Sat Jan 29 2011 spuhler <spuhler> 0.2.1-4.mga1
+ Revision: 44093
- removed buildroot definition from .spec
  removed the if mdkversion lines
- imported package php-pear-PHP_Parser