Search
j0ke.net Open Build Service
>
Projects
>
server:php:applications
>
php5-pear-phpdocumentor
> Changes
Sign Up
|
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
Changes of Revision 3
[-]
[+]
Added
php5-pear-phpdocumentor.spec
@@ -0,0 +1,146 @@ +#norootforbuild + +# +# spec file for package PhpDocumentor (Version 1.3.2) +# +# Copyright (c) 2007 SuSE Linux AG, Nuernberg, Germany. +# This file and all modifications and additions to the pristine +# package are under the same license as the package itself. +# +# Please submit bug fixes or comments via http://bugs.opensuse.org/ +# + +%define peardir %(pear config-get php_dir 2> /dev/null) +%define xmldir /var/lib/pear + +Summary: The phpDocumentor package provides automatic documenting of php api directly from the source +Name: php5-pear-phpdocumentor +Version: 1.3.2 +Release: 1 +License: LGPL +Group: Development/Libraries/Other +Source0: http://pear.php.net/get/PhpDocumentor-%{version}.tgz +BuildRoot: %{_tmppath}/%{name}-%{version}-build +URL: http://pear.php.net/package/PhpDocumentor +BuildRequires: php5-pear +PreReq: php5-pear +BuildArch: noarch + +%description + +The phpDocumentor tool is a standalone auto-documentor similar to JavaDoc +written in PHP. It differs from PHPDoc in that it is MUCH faster, parses +a much +wider range of php files, and comes with many customizations including 11 +HTML +templates, windows help file CHM output, PDF output, and XML DocBook +peardoc2 +output for use with documenting PEAR. In addition, it can do PHPXref +source +code highlighting and linking. + +Features (short list): +-output in HTML, PDF (directly), CHM (with windows help compiler), XML +DocBook +-very fast +-web and command-line interface +-fully customizable output with Smarty-based templates +-recognizes JavaDoc-style documentation with special tags customized for +PHP 4 +-automatic linking, class inheritance diagrams and intelligent override +-customizable source code highlighting, with phpxref-style +cross-referencing +-parses standard README/CHANGELOG/INSTALL/FAQ files and includes them + directly in documentation +-generates a todo list from @todo tags in source +-generates multiple documentation sets based on @access private, @internal +and + {@internal} tags +-example php files can be placed directly in documentation with +highlighting + and phpxref linking using the @example tag +-linking between external manual and API documentation is possible at the + sub-section level in all output formats +-easily extended for specific documentation needs with Converter +-full documentation of every feature, manual can be generated directly +from + the source code with "phpdoc -c makedocs" in any format desired. +-current manual always available at http://www.phpdoc.org/manual.php +-user .ini files can be used to control output, multiple outputs can be + generated at once + +**WARNING**: +To use the web interface, you must set PEAR's data_dir to a subdirectory +of +document root. + +If browsing to http://localhost/index.php displays +/path/to/htdocs/index.php, +set data_dir to a subdirectory of /path/to/htdocs: + +$ pear config-set data_dir /path/to/htdocs/pear +$ pear install PhpDocumentor + +http://localhost/pear/PhpDocumentor is the web interface + +%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 + +export PHP_PEAR_PHP_BIN="/usr/bin/php5 -dmemory_limit=-1" + +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 + +mv %{buildroot}/docs . + + +# Install XML package description +mkdir -p %{buildroot}%{xmldir} +tar -xzf %{SOURCE0} package.xml +cp -p package.xml %{buildroot}%{xmldir}/PhpDocumentor.xml + +%clean + +rm -rf %{buildroot} + +%post + +pear install --nodeps --soft --force --register-only %{xmldir}/PhpDocumentor.xml + +%postun + +if [ "$1" -eq "0" ]; then + pear uninstall --nodeps --ignore-errors --register-only pear.php.net/PhpDocumentor +fi + +%files + +%defattr(-,root,root) +%doc docs/PhpDocumentor/* +%{_bindir}/phpdoc +# is this acceptable for openSUSE packages ?? +%{_bindir}/scripts/makedoc.sh +%{peardir}/* +%{xmldir}/PhpDocumentor.xml