/**
  * Sets PEAR package.xml options, based on class properties.
  *
  * @throws BuildException
  * @return void
  */
 protected function setOptions()
 {
     // 1) first prepare/populate options
     $this->populateOptions();
     // 2) make any final adjustments (this could move into populateOptions() also)
     // default PEAR basedir would be the name of the package (e.g."phing")
     if (!isset($this->preparedOptions['baseinstalldir'])) {
         $this->preparedOptions['baseinstalldir'] = $this->package;
     }
     // unless filelistgenerator has been overridden, we use Phing FileSet generator
     if (!isset($this->preparedOptions['filelistgenerator'])) {
         if (empty($this->filesets)) {
             throw new BuildException("You must use a <fileset> tag to specify the files to include in the package.xml");
         }
         $this->preparedOptions['filelistgenerator'] = 'Fileset';
         $this->preparedOptions['usergeneratordir'] = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'pearpackage';
         // Some PHING-specific options needed by our Fileset reader
         $this->preparedOptions['phing_project'] = $this->project;
         $this->preparedOptions['phing_filesets'] = $this->filesets;
     } elseif ($this->preparedOptions['filelistgenerator'] != 'Fileset' && !empty($this->filesets)) {
         throw new BuildException("You cannot use <fileset> element if you have specified the \"filelistgenerator\" option.");
     }
     // 3) Set the options
     // No need for excessive validation here, since the  PEAR class will do its own
     // validation & return errors
     $e = $this->pkg->setOptions($this->preparedOptions);
     if (PEAR::isError($e)) {
         throw new BuildException("Unable to set options.", new Exception($e->getMessage()));
     }
     // convert roles
     foreach ($this->roles as $role) {
         $this->pkg->addRole($role->getExtension(), $role->getRole());
     }
 }
Beispiel #2
0
 public function main()
 {
     $packagexml = new PEAR_PackageFileManager();
     $e = $packagexml->setOptions(array('version' => '0.5', 'state' => 'alpha', 'notes' => 'Preview release.', 'pathtopackagefile' => $this->packageFileDir, 'packagedirectory' => $this->baseFilesDir, 'baseinstalldir' => 'phocoa', 'simpleoutput' => true, 'filelistgenerator' => 'file', 'ignore' => array(), 'installexceptions' => array('phpdocs' => '/*'), 'dir_roles' => array('phpdocs' => 'doc')));
     if (PEAR::isError($e)) {
         echo $e->getMessage();
         return;
     }
     $e = $packagexml->writePackageFile();
     if (PEAR::isError($e)) {
         echo $e->getMessage();
     }
 }
$version = '0.20.0';
$state = 'beta';
$notes = <<<EOT
- Request #13564:  bool(false) is converted to empty string
EOT;
$description = <<<EOT
XML_Serializer serializes complex data structures like arrays or object as XML documents.
This class helps you generating any XML document you require without the need for DOM.
Furthermore this package can be used as a replacement to serialize() and unserialize() as it comes with a matching XML_Unserializer that is able to create PHP data structures (like arrays and objects) from XML documents, if type hints are available.
If you use the XML_Unserializer on standard XML files, it will try to guess how it has to be unserialized. In most cases it does exactly what you expect it to do.
Try reading a RSS file with XML_Unserializer and you have the whole RSS file in a structured array or even a collection of objects, similar to XML_RSS.

Since version 0.8.0 the package is able to treat XML documents similar to the simplexml extension of PHP 5.
EOT;
$package = new PEAR_PackageFileManager();
$result = $package->setOptions(array('package' => 'XML_Serializer', 'summary' => 'Swiss-army knife for reading and writing XML files. Creates XML files from data structures and vice versa.', 'description' => $description, 'version' => $version, 'state' => $state, 'license' => 'BSD License', 'filelistgenerator' => 'cvs', 'ignore' => array('package.php', 'package.xml', 'package2.xml'), 'notes' => $notes, 'simpleoutput' => true, 'baseinstalldir' => 'XML', 'packagedirectory' => './', 'dir_roles' => array('docs' => 'doc', 'examples' => 'doc', 'tests' => 'test')));
if (PEAR::isError($result)) {
    echo $result->getMessage();
    die;
}
$package->addMaintainer('schst', 'lead', 'Stephan Schmidt', '*****@*****.**');
$package->addMaintainer('ashnazg', 'lead', 'Chuck Burgess', '*****@*****.**');
$package->addGlobalReplacement('package-info', '@package_version@', 'version');
$package->addDependency('php', '4.2.0', 'ge', 'php', false);
$package->addDependency('PEAR', '', 'has', 'pkg', false);
$package->addDependency('XML_Parser', '1.2.6', 'ge', 'pkg', false);
$package->addDependency('XML_Util', '1.1.1', 'ge', 'pkg', false);
if (isset($_GET['make']) || isset($_SERVER['argv'][1]) && $_SERVER['argv'][1] == 'make') {
    $result = $package->writePackageFile();
} else {
    $result = $package->debugPackageFile();
Beispiel #4
0
methods that actually contain test code. Top level test scripts then invoke
the run()  methods on every one of these test cases in order. Each test
method is written to invoke various assertions that the developer expects to
be true such as assertEqual(). If the expectation is correct, then a
successful result is dispatched to the observing test reporter, but any
failure triggers an alert and a description of the mismatch.

These tools are designed for the developer. Tests are written in the PHP
language itself more or less as the application itself is built. The advantage
of using PHP itself as the testing language is that there are no new languages
to learn, testing can start straight away, and the developer can test any part
of the code. Basically, all parts that can be accessed by the application code
can also be accessed by the test code if they are in the same language. 
EOD;
$packagexml = new PEAR_PackageFileManager();
$e = $packagexml->setOptions(array('baseinstalldir' => 'simpletest', 'version' => '1.0.0', 'license' => 'The Open Group Test Suite License', 'packagedirectory' => '/var/www/html/tmp/simpletest', 'state' => 'stable', 'package' => 'simpletest', 'simpleoutput' => true, 'summary' => $shortDesc, 'description' => $longDesc, 'filelistgenerator' => 'file', 'notes' => 'See the CHANGELOG for full list of changes', 'dir_roles' => array('extensions' => 'php', 'test' => 'test'), 'ignore' => array('packages/', 'tutorials/', 'ui/', 'docs/', '*CVS*', 'TODO'), 'roles' => array('php' => 'php', 'html' => 'php', '*' => 'php'), 'exceptions' => array('VERSION' => 'doc', 'HELP_MY_TESTS_DONT_WORK_ANYMORE' => 'doc', 'LICENSE' => 'doc', 'README' => 'doc')));
if (is_a($e, 'PEAR_Error')) {
    echo $e->getMessage();
    die;
}
$e = $packagexml->addMaintainer('lastcraft', 'lead', 'Marcus Baker', '*****@*****.**');
if (is_a($e, 'PEAR_Error')) {
    echo $e->getMessage();
    exit;
}
$e = $packagexml->addMaintainer('tswicegood', 'developer', 'Travis Swicegood', '*****@*****.**');
if (is_a($e, 'PEAR_Error')) {
    echo $e->getMessage();
    exit;
}
$e = $packagexml->addMaintainer('jsweat', 'helper', 'Jason Sweat', '*****@*****.**');
 * @package PEAR_PackageFileManager
 */
/**
 * Include the package file manager
 */
require_once 'PEAR/PackageFileManager.php';
$test = new PEAR_PackageFileManager();
// directory that phpDocumentor 1.2.2 CVS is located in
$packagedir = 'C:/Web Pages/chiara/phpdoc';
$e = $test->setOptions(array('baseinstalldir' => 'PhpDocumentor', 'version' => '1.2.2', 'packagedirectory' => $packagedir, 'state' => 'stable', 'filelistgenerator' => 'cvs', 'notes' => 'Bugfix release

- DocBook/peardoc2 converter outputs valid DocBook
- fixed Page-Level DocBlock issues, now a page-level
  docblock is the first docblock in a file if it contains
  a @package tag, UNLESS the next element is a class.  Warnings
  raised are much more informative
- removed erroneous warning of duplicate @package tag in certain cases
- fixed these bugs:
 [ 765455 ] phpdoc can\'t find php if it is in /usr/local/bin
 [ 767251 ] broken links when no files in default package
 [ 768947 ] Multiple vars not recognised
 [ 772441 ] nested arrays fail parser
', 'package' => 'PhpDocumentor', 'dir_roles' => array('Documentation' => 'doc', 'Documentation/tests' => 'test'), 'exceptions' => array('index.html' => 'php', 'docbuilder/index.html' => 'php', 'docbuilder/blank.html' => 'php', 'README' => 'doc', 'ChangeLog' => 'doc', 'PHPLICENSE.txt' => 'doc', 'poweredbyphpdoc.gif' => 'data', 'INSTALL' => 'doc', 'FAQ' => 'doc', 'Authors' => 'doc', 'Release-1.2.0beta1' => 'doc', 'Release-1.2.0beta2' => 'doc', 'Release-1.2.0beta3' => 'doc', 'Release-1.2.0rc1' => 'doc', 'Release-1.2.0rc2' => 'doc', 'Release-1.2.0' => 'doc', 'Release-1.2.1' => 'doc', 'Release-1.2.2' => 'doc', 'pear-phpdoc' => 'script', 'pear-phpdoc.bat' => 'script'), 'ignore' => array('package.xml', "{$packagedir}/phpdoc", 'phpdoc.bat', 'LICENSE'), 'installas' => array('pear-phpdoc' => 'phpdoc', 'pear-phpdoc.bat' => 'phpdoc.bat'), 'installexceptions' => array('pear-phpdoc' => '/', 'pear-phpdoc.bat' => '/', 'scripts/makedoc.sh' => '/')));
if (PEAR::isError($e)) {
    echo $e->getMessage();
    exit;
}
$e = $test->addPlatformException('pear-phpdoc', '(*ix|*ux)');
if (PEAR::isError($e)) {
    echo $e->getMessage();
    exit;
}
        $opts_h[$opts[0][$i][0]] = isset($opts[0][$i][1]) ? $opts[0][$i][1] : $opts[1][$i];
    }
    # -- Contrôle des paramètres obligatoires
    foreach ($mandatory_opts as $short => $long) {
        if (!in_array($short, $opts_h) && !in_array("--{$long}", $opts_h)) {
            die("!! Paramètre obligatoire non renseigné.\n");
        }
    }
}
// Par défaut, on considère que le package se situe dans le réperoire courant
$pkg_dir = isset($opts_h['--packagedir']) ? $opts_h['--packagedir'] : $opts_h['p'];
$pkg_dir = isset($pkg_dir) ? $pkg_dir : getcwd();
echo "Looking for files in {$pkg_dir}...\n";
$pkgxml = new PEAR_PackageFileManager();
# -- Options
$e = $pkgxml->setOptions(array('baseinstalldir' => '/', 'package' => 'Blogmarks', 'version' => '0.1', 'summary' => 'Stop bookmarking, start blogmarking', 'description' => 'Soon to come...', 'license' => 'GPL', 'packagedirectory' => $pkg_dir, 'filelistgenerator' => 'cvs', 'state' => 'beta', 'notes' => 'first try', 'ignore' => array('make_pkg.php'), 'installexceptions' => array(), 'dir_roles' => array('Blogmarks/tutorials' => 'doc'), 'exceptions' => array()));
# -- Roles
$pkgxml->addRole('ini', 'php');
$pkgxml->addRole('dist', 'php');
# -- Maintainers
$pkgxml->addMaintainer('mbertier', 'lead', 'Tristan Rivoallan', '*****@*****.**');
$pkgxml->addMaintainer('benfle', 'developer', 'Benoit Fleury', '*****@*****.**');
# -- Dépendances
$pkgxml->addDependency('DB_DataObject', '1.5.3', 'ge', 'pkg');
$pkgxml->addDependency('HTTP_Request', '1.2', 'ge', 'pkg');
if (PEAR::isError($e)) {
    echo "*** Erreur: " . $e->getMessage() . "\n";
    exit;
}
/*
$e = $pkgxml->debugPackageFile( false );
Beispiel #7
0
<?php

/**
 * Net_growl package generator
 * @package Net_Growl
 */
require_once 'PEAR/PackageFileManager.php';
$version = '0.7.0';
$notes = <<<EOT
Initial release
EOT;
$description = <<<EOT
Growl is a MACOSX application that listen to notifications sent by 
applications and displays them on the desktop using different display 
styles. Net_Growl offers the possibility to send notifications to Growl 
from your PHP application through network communication using UDP.
EOT;
$package = new PEAR_PackageFileManager();
$e = $package->setOptions(array('package' => 'Net_Growl', 'summary' => 'Send notifications to Growl from PHP on MACOSX', 'description' => $description, 'version' => $version, 'state' => 'beta', 'license' => 'BSD', 'filelistgenerator' => 'file', 'ignore' => array('package.php', 'package.xml'), 'notes' => $notes, 'changelogoldtonew' => false, 'simpleoutput' => true, 'baseinstalldir' => 'Net', 'packagedirectory' => '/Volumes/doc/Dev/trunk/Bindings/php/Net_Growl'));
if (PEAR::isError($e)) {
    echo $e->getMessage();
    exit;
}
$package->addMaintainer('mansion', 'lead', 'Bertrand Mansion', '*****@*****.**');
$package->addDependency('PEAR', '1.3.3', 'ge', 'pkg', false);
$e = $package->writePackageFile();
if (PEAR::isError($e)) {
    echo $e->getMessage();
    exit;
}
echo "package.xml generated successfully!\n";
$e = $test->setOptions(array('baseinstalldir' => 'PhpDocumentor', 'version' => '1.3.0RC3', 'packagedirectory' => $packagedir, 'state' => 'beta', 'filelistgenerator' => 'cvs', 'notes' => 'PHP 5 support and more, fix bugs

This will be the last release in the 1.x series.  2.0 is next

Features added to this release include:

 * Full PHP 5 support, phpDocumentor both runs in and parses Zend Engine 2
   language constructs.  Note that you must be running phpDocumentor in
   PHP 5 in order to parse PHP 5 code
 * XML:DocBook/peardoc2:default converter now beautifies the source using
   PEAR\'s XML_Beautifier if available
 * inline {@example} tag - this works just like {@source} except that
   it displays the contents of another file.  In tutorials, it works
   like <programlisting>
 * customizable README/INSTALL/CHANGELOG files
 * phpDocumentor tries to run .ini files out of the current directory
   first, to allow you to put them anywhere you want to
 * multi-national characters are now allowed in package/subpackage names
 * images in tutorials with the <graphic> tag
 * un-modified output with <programlisting role="html">
 * html/xml source highlighting with <programlisting role="tutorial">

From both Windows and Unix, both the command-line version
of phpDocumentor and the web interface will work
out of the box by using command phpdoc - guaranteed :)

WARNING: in order to use the web interface through PEAR, you must set your
data_dir to a subdirectory of your document root.

$ pear config-set data_dir /path/to/public_html/pear

on Windows with default apache setup, it might be

C:\\> pear config-set data_dir "C:\\Program Files\\Apache\\htdocs\\pear"

After this, install/upgrade phpDocumentor

$ pear upgrade phpDocumentor

and you can browse to:

http://localhost/pear/PhpDocumentor/

for the web interface

------
WARNING: The PDF Converter will not work in PHP5.  The PDF library that it relies upon
segfaults with the simplest of files.  Generation still works great in PHP4
------

- WARNING: phpDocumentor installs phpdoc in the
  scripts directory, and this will conflict with PHPDoc,
  you can\'t have both installed at the same time
- Switched to Smarty 2.6.0, now it will work in PHP 5.  Other
  changes made to the code to make it work in PHP 5, including parsing
  of private/public/static/etc. access modifiers
- fixed these bugs:
 [ 834941 ] inline @link doesn\'t work within <b>
 [ 839092 ] CHM:default:default produces bad links
 [ 839466 ] {$array[\'Key\']} in heredoc
 [ 840792 ] File Missing XML:DocBook/peardoc2:default "errors.tpl"
 [ 850731 ] No DocBlock template after page-level DocBlock?
 [ 850767 ] MHW Reference wrong
 [ 854321 ] web interface errors with template directory
 [ 856310 ] HTML:frames:DOM/earthli missing Class_logo.png image
 [ 865126 ] CHM files use hard paths
 [ 875525 ] <li> escapes <pre> and ignores paragraphs
 [ 876674 ] first line of pre and code gets left trimmed
 [ 877229 ] PHP 5 incompatibilities bork tutorial parsing
 [ 877233 ] PHP 5 incompatibilities bork docblock source highlighting
 [ 878911 ] [PHP 5 incompatibility] argv
 [ 879068 ] var arrays tripped up by comments
 [ 879151 ] HTML:frames:earthli Top row too small for IE
 [ 880070 ] PHP5 visability for member variables not working
 [ 880488 ] \'0\' file stops processing
 [ 884863 ] Multiple authors get added in wrong order.
 [ 884869 ] Wrong highligthing of object type variables
 [ 892305 ] peardoc2: summary require_once Path/File.php is PathFile.php
 [ 892306 ] peardoc2: @see of method not working
 [ 892479 ] {@link} in // comment is escaped
 [ 893470 ] __clone called directly in PackagePageElements.inc
 [ 895656 ] initialized private variables not recognized as private
 [ 904823 ] IntermediateParser fatal error
 [ 910676 ] Fatal error: Smarty error: unable to write to $compile_dir
 [ 915770 ] Classes in file not showing
 [ 924313 ] Objec access on array
', 'package' => 'PhpDocumentor', 'dir_roles' => array('Documentation' => 'doc', 'Documentation/tests' => 'test', 'docbuilder' => 'data', 'HTML_TreeMenu-1.1.2' => 'data', 'tutorials' => 'doc', 'phpDocumentor/Converters/CHM/default/templates/default/templates_c' => 'data', 'phpDocumentor/Converters/PDF/default/templates/default/templates_c' => 'data', 'phpDocumentor/Converters/HTML/frames/templates/default/templates_c' => 'data', 'phpDocumentor/Converters/HTML/frames/templates/l0l33t/templates_c' => 'data', 'phpDocumentor/Converters/HTML/frames/templates/phpdoc.de/templates_c' => 'data', 'phpDocumentor/Converters/HTML/frames/templates/phphtmllib/templates_c' => 'data', 'phpDocumentor/Converters/HTML/frames/templates/phpedit/templates_c' => 'data', 'phpDocumentor/Converters/HTML/frames/templates/earthli/templates_c' => 'data', 'phpDocumentor/Converters/HTML/frames/templates/DOM/default/templates_c' => 'data', 'phpDocumentor/Converters/HTML/frames/templates/DOM/l0l33t/templates_c' => 'data', 'phpDocumentor/Converters/HTML/frames/templates/DOM/phpdoc.de/templates_c' => 'data', 'phpDocumentor/Converters/HTML/frames/templates/DOM/phphtmllib/templates_c' => 'data', 'phpDocumentor/Converters/HTML/frames/templates/DOM/earthli/templates_c' => 'data', 'phpDocumentor/Converters/HTML/Smarty/templates/default/templates_c' => 'data', 'phpDocumentor/Converters/HTML/Smarty/templates/PHP/templates_c' => 'data', 'phpDocumentor/Converters/HTML/Smarty/templates/HandS/templates_c' => 'data', 'phpDocumentor/Converters/XML/DocBook/peardoc2/templates/default/templates_c' => 'data'), 'simpleoutput' => true, 'exceptions' => array('index.html' => 'data', 'README' => 'doc', 'ChangeLog' => 'doc', 'PHPLICENSE.txt' => 'doc', 'poweredbyphpdoc.gif' => 'data', 'INSTALL' => 'doc', 'FAQ' => 'doc', 'Authors' => 'doc', 'Release-1.2.0beta1' => 'doc', 'Release-1.2.0beta2' => 'doc', 'Release-1.2.0beta3' => 'doc', 'Release-1.2.0rc1' => 'doc', 'Release-1.2.0rc2' => 'doc', 'Release-1.2.0' => 'doc', 'Release-1.2.1' => 'doc', 'Release-1.2.2' => 'doc', 'Release-1.2.3' => 'doc', 'Release-1.2.3.1' => 'doc', 'Release-1.3.0' => 'doc', 'pear-phpdoc' => 'script', 'pear-phpdoc.bat' => 'script', 'HTML_TreeMenu-1.1.2/TreeMenu.php' => 'php', 'phpDocumentor/Smarty-2.6.0/libs/debug.tpl' => 'php', 'new_phpdoc.php' => 'data', 'phpdoc.php' => 'data'), 'ignore' => array('package.xml', "{$packagedir}/phpdoc", 'phpdoc.bat', 'LICENSE', '*docbuilder/actions.php', '*docbuilder/builder.php', '*docbuilder/config.php', '*docbuilder/file_dialog.php', '*docbuilder/top.php', 'utilities.php', 'Converter.inc', 'IntermediateParser.inc', '*templates/PEAR/*', 'phpDocumentor/Smarty-2.5.0/*', '*CSV*', 'Setup.inc.php', 'makedocs.ini', 'common.inc.php', 'publicweb-PEAR-1.2.1.patch.txt'), 'installas' => array('pear-phpdoc' => 'phpdoc', 'pear-phpdoc.bat' => 'phpdoc.bat', 'docbuilder/pear-actions.php' => 'docbuilder/actions.php', 'docbuilder/pear-builder.php' => 'docbuilder/builder.php', 'docbuilder/pear-config.php' => 'docbuilder/config.php', 'docbuilder/pear-file_dialog.php' => 'docbuilder/file_dialog.php', 'docbuilder/pear-top.php' => 'docbuilder/top.php', 'docbuilder/includes/pear-utilities.php' => 'docbuilder/includes/utilities.php', 'phpDocumentor/pear-IntermediateParser.inc' => 'phpDocumentor/IntermediateParser.inc', 'phpDocumentor/pear-Converter.inc' => 'phpDocumentor/Converter.inc', 'phpDocumentor/pear-Setup.inc.php' => 'phpDocumentor/Setup.inc.php', 'phpDocumentor/pear-common.inc.php' => 'phpDocumentor/common.inc.php', 'user/pear-makedocs.ini' => 'user/makedocs.ini'), 'installexceptions' => array('pear-phpdoc' => '/', 'pear-phpdoc.bat' => '/', 'scripts/makedoc.sh' => '/')));
/**
* Code starts here
*/
require_once 'PEAR/PackageFileManager.php';
$PPFM = new PEAR_PackageFileManager();
if (version_compare(phpversion(), '4.3.0', '<') || php_sapi_name() == 'cgi') {
    define('STDOUT', fopen('php://stdout', 'w'));
    define('STDERR', fopen('php://stderr', 'w'));
    register_shutdown_function(create_function('', 'fclose(STDOUT); fclose(STDERR); return true;'));
}
/**
* A giant array to configure the PackageFileManager. For the "roles" see
* http://pear.php.net/manual/en/developers.packagedef.php
*/
$options = array('baseinstalldir' => 'simpletest', 'version' => $version, 'packagedirectory' => $packagedir, 'outputdirectory' => $packagedir, 'pathtopackagefile' => $packagedir, 'state' => $state, 'summary' => $shortDesc, 'description' => $longDesc, 'filelistgenerator' => 'file', 'notes' => $releaseNotes, 'package' => 'SimpleTest', 'license' => 'The Open Group Test Suite License', 'dir_roles' => array('docs' => 'doc', 'test' => 'test', 'extensions' => 'php'), 'exceptions' => array('HELP_MY_TESTS_DONT_WORK_ANYMORE' => 'doc', 'LICENSE' => 'doc', 'README' => 'doc', 'TODO' => 'doc', 'VERSION' => 'doc'), 'ignore' => array("{$packagedir}/packages", "{$packagedir}/ui"));
$status = $PPFM->setOptions($options);
if (PEAR::isError($status)) {
    fwrite(STDERR, $status->getMessage());
    exit;
}
foreach ($maintainers as $maintainer) {
    $PPFM->addMaintainer($maintainer['handle'], $maintainer['role'], $maintainer['name'], $maintainer['email']);
}
// Adds a dependency of PHP 4.2.3+
$status = $PPFM->addDependency('php', '4.2.3', 'ge', 'php');
if (PEAR::isError($status)) {
    fwrite(STDERR, $status->getMessage());
    exit;
}
// hack (apparently)
$PPFM->addRole('tpl', 'php');
        $opts_h[$opts[0][$i][0]] = isset($opts[0][$i][1]) ? $opts[0][$i][1] : $opts[1][$i];
    }
    # -- Contrôle des paramètres obligatoires
    foreach ($mandatory_opts as $short => $long) {
        if (!in_array($short, $opts_h) && !in_array("--{$long}", $opts_h)) {
            die("!! Paramètre obligatoire non renseigné.\n");
        }
    }
}
// Par défaut, on considère que le package se situe dans le réperoire courant
$pkg_dir = isset($opts_h['--packagedir']) ? $opts_h['--packagedir'] : $opts_h['p'];
$pkg_dir = isset($pkg_dir) ? $pkg_dir : getcwd();
echo "Looking for files in {$pkg_dir}...\n";
$pkgxml = new PEAR_PackageFileManager();
# -- Options
$e = $pkgxml->setOptions(array('baseinstalldir' => '/', 'package' => 'MicroBuilder', 'version' => '0.1', 'summary' => 'MicroBuilder', 'description' => 'Soon to come...', 'license' => 'GPL', 'packagedirectory' => $pkg_dir, 'filelistgenerator' => 'cvs', 'state' => 'beta', 'notes' => 'first try', 'ignore' => array('make_pkg.php'), 'installexceptions' => array(), 'dir_roles' => array(), 'exceptions' => array()));
# -- Roles
$pkgxml->addRole('ini', 'php');
$pkgxml->addRole('dist', 'php');
# -- Maintainers
$pkgxml->addMaintainer('mbertier', 'lead', 'Tristan Rivoallan', '*****@*****.**');
# -- Dépendances
$pkgxml->addDependency('DB_DataObject', '1.5.3', 'ge', 'pkg');
$pkgxml->addDependency('HTTP_Request', '1.2', 'ge', 'pkg');
if (PEAR::isError($e)) {
    echo "*** Erreur: " . $e->getMessage() . "\n";
    exit;
}
/*
$e = $pkgxml->debugPackageFile( false );