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

Source for file buildPackageXML.php

Documentation is available at buildPackageXML.php

  1. <?php
  2. /* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4 foldmethod=marker */
  3. // $Id: buildPackageXML.php 268725 2008-11-10 08:43:06Z firman $
  4.  
  5. require_once 'PEAR/PackageFileManager2.php';
  6. require_once 'PEAR/PackageFileManager/Cvs.php';
  7.  
  8. $pkg = new PEAR_PackageFileManager2;
  9.  
  10. $options = array(
  11.     'simpleoutput'      => true,
  12.     'baseinstalldir'    => '/',
  13.     'packagedirectory'  => dirname(__FILE__),
  14.     'pathtopackagefile' => basename(__FILE__),
  15.     'filelistgenerator' => 'Cvs',
  16.     'dir_roles'         => array(
  17.         'tests'         => 'test',
  18.         'docs'          => 'doc',
  19.         'data'          => 'data'
  20.     ),
  21.     'ignore'            => array(
  22.         'package.xml',
  23.         'package2.xml',
  24.         '*.tgz',
  25.         basename(__FILE__)
  26.     )
  27. );
  28.  
  29. $pkg->setOptions($options);
  30.  
  31. $summary = <<<EOT
  32. Numerical Root-Finding methods package in PHP
  33. EOT;
  34.  
  35. $desc = <<<EOT
  36. Math_Numerical_RootFinding is the package provide various number of Numerical
  37. Root-Finding Methods functions implemented in PHP.
  38. Supported methods:
  39. 1. Bisection/Binary Chopping/Interval Halving/Bolzano
  40. 2. False Position/Regula Falsi
  41. 3. Fixed Point
  42. 4. Netwon-Raphson
  43. 5. Netwon-Raphson 2
  44. 6. Ralston-Rabinowitz
  45. 7. Secant
  46. EOT;
  47.  
  48. $notes = <<<EOT
  49. * Request #2897: added new parameter \$guess to validateEqFunction()
  50. * Added unit tests
  51. * Examples files renamed to lower case
  52. EOT;
  53.  
  54. // Some hard-coded stuffs.
  55. $pkg->setPackage('Math_Numerical_RootFinding');
  56. $pkg->setSummary($summary);
  57. $pkg->setDescription($desc);
  58. $pkg->setChannel('pear.php.net');
  59. $pkg->setAPIVersion('1.0');
  60. $pkg->setReleaseVersion('1.1.0a1');
  61. $pkg->setReleaseStability('alpha');
  62. $pkg->setAPIStability('alpha');
  63. $pkg->setNotes($notes);
  64. $pkg->setPackageType('php');
  65. $pkg->setLicense('BSD License''http://www.opensource.org/licenses/bsd-license.php');
  66.  
  67. // Add maintainers.
  68. $pkg->addMaintainer('lead''firman''Firman Wandayandi''firman@php.net''yes');
  69. $pkg->addMaintainer('lead''mfonda''Matthew Fonda''mfonda@php.net''yes');
  70.  
  71. // Core dependencies.
  72. $pkg->setPhpDep('4.3.0');
  73. $pkg->setPearinstallerDep('1.4.0');
  74.  
  75. // Add some replacements.
  76. $pkg->addGlobalReplacement('package-info''@package_version@''version');
  77.  
  78. // Generate file contents.
  79. $pkg->generateContents();
  80.  
  81. // Writes a package.xml.
  82. $e $pkg->writePackageFile();
  83.  
  84. // Some errors occurs.
  85. if (PEAR::isError($e)) {
  86.     throw new Exception('Unable to write package file. Got message: ' $e->getMessage());
  87. }
  88.  
  89. /*
  90.  * Local variables:
  91.  * mode: php
  92.  * tab-width: 4
  93.  * c-basic-offset: 4
  94.  * c-hanging-comment-ender-p: nil
  95.  * End:
  96.  */
  97. ?>

Documentation generated on Mon, 11 Mar 2019 15:40:48 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.