PHP_CompatInfo
[ class tree: PHP_CompatInfo ] [ index: PHP_CompatInfo ] [ all elements ]

Source for file package.php

Documentation is available at package.php

  1. <?php
  2. require_once 'PEAR/PackageFileManager.php';
  3.  
  4. unset($_SERVER['PATH_TRANSLATED']);
  5.  
  6. $version = '1.0.0RC5';
  7. $notes = <<<EOT
  8. Added Request #3656
  9. Fixed Bug #3657
  10. EOT;
  11. $description =<<<EOT
  12. PHP_CompatInfo will parse a file/folder/script/array to find out the minimum
  13. version and extensions required for it to run. Features advanced debug output
  14. which shows which functions require which version and CLI output script
  15. EOT;
  16. $package = new PEAR_PackageFileManager();
  17.  
  18. $result = $package->setOptions(array(
  19. 'package' => 'PHP_CompatInfo',
  20. 'summary' => 'Find out the minimum version and the extensions required for a piece of code to run',
  21. 'description' => $description,
  22. 'version' => $version,
  23. 'state' => 'beta',
  24. 'license' => 'PHP License',
  25. 'ignore' => array('*entries*','*Template*','*Root*','*Repository*','package.php', 'package.xml', '*.bak', '*src*', '*.tgz', '*pear_media*', 'index.htm', '*tests*'),
  26. 'filelistgenerator' => 'cvs', // other option is 'file'
  27. 'notes' => $notes,
  28. 'changelogoldtonew' => false,
  29. 'baseinstalldir' => 'PHP',
  30. 'packagedirectory' => '',
  31. 'simpleoutput' => true,
  32. 'cleardependencies' => true,
  33. ));
  34.  
  35. if (PEAR::isError($result)) {
  36. echo $result->getMessage();
  37. die();
  38. }
  39.  
  40. $package->addMaintainer('davey','lead','Davey Shafik','davey@php.net');
  41.  
  42. $package->addDependency('php', '4.3.0', 'ge', 'php');
  43. $package->addDependency('tokenizer', '', 'has', 'ext', false);
  44. $package->addDependency('Console_Table','1.0.1','ge','pkg',true);
  45. $package->addDependency('Console_Getopt','1.2','ge','pkg',true);
  46.  
  47.  
  48. if (isset($_SERVER['argv'][1]) && $_SERVER['argv'][1] == 'commit') {
  49. $result = $package->writePackageFile();
  50. } else {
  51. $result = $package->debugPackageFile();
  52. }
  53.  
  54. if (PEAR::isError($result)) {
  55. echo $result->getMessage();
  56. die();
  57. }
  58. ?>

Documentation generated on Sat, 05 Mar 2005 20:00:55 -0500 by phpDocumentor 1.3.0RC3