Permalink
Browse files

* package data update

  • Loading branch information...
Pádraic Brady
Pádraic Brady committed Sep 29, 2007
1 parent f1da33b commit 1aa5dbf3bd8ba0f1a743a45682ff0029b80ae014
Showing with 43 additions and 25 deletions.
  1. +43 −25 generate_package_xml.php
View
@@ -1,43 +1,61 @@
<?php
require_once('PEAR/PackageFileManager2.php');
PEAR::setErrorHandling(PEAR_ERROR_DIE);
-//require_once 'PEAR/Config.php';
-//PEAR_Config::singleton('/path/to/unusualpearconfig.ini');
-// use the above lines if the channel information is not validating
-$packagexml = new PEAR_PackageFileManager2;
-// for an existing package.xml use
-// $packagexml = {@link importOptions()} instead
-$e = $packagexml->setOptions(
- array('baseinstalldir' => 'Crypt',
- 'packagedirectory' => 'D:/xampp/htdocs/projects/pear/trunk/Crypt_DiffieHellman',
- 'filelistgenerator' => 'file',
- 'dir_roles' => array('docs' => 'doc', 'tests' => 'test'),
- 'ignore' => array('generate_package_xml.php', '.svn', '.cvs')
- )
+
+$packagefile = './package.xml';
+
+$options = array(
+ 'filelistgenerator' => 'cvs',
+ 'changelogoldtonew' => false,
+ 'simpleoutput' => true,
+ 'baseinstalldir' => '/',
+ 'packagedirectory' => './',
+ 'packagefile' => $packagefile,
+ 'clearcontents' => false,
+ 'ignore' => array('generate_package_xml.php', '.svn', '.cvs*'),
+ 'dir_roles' => array(
+ 'docs' => 'doc',
+ 'examples' => 'doc',
+ 'tests' => 'test',
+ ),
);
+
+$packagexml = &PEAR_PackageFileManager2::importOptions($packagefile, $options);
+$packagexml->setPackageType('php');
+
$packagexml->setPackage('Crypt_DiffieHellman');
$packagexml->setSummary('Implementation of Diffie-Hellman Key Exchange cryptographic protocol for PHP5');
$packagexml->setDescription("Implementation of the Diffie-Hellman Key Exchange cryptographic protocol\nin PHP5. Enables two parties without any prior knowledge of each other\nestablish a secure shared secret key across an insecure channel\nof communication.");
+
$packagexml->setChannel('pear.php.net');
-$packagexml->setAPIVersion('0.1.0');
-$packagexml->setReleaseVersion('0.1.0a3');
-$packagexml->setReleaseStability('alpha');
-$packagexml->setAPIStability('alpha');
-$packagexml->setNotes("* Updated tests location inside directory hierarchy for easier running\n* Fixed a PHP variable undefined notice\n* Full support for three input/output modes: Number (big integer string, Binary and Btwoc (big-endian two's complement)\n* Allowed for a specific BigInteger extension to be selected for use from the Crypt_DiffieHellman contructor\n* Minor typo fixes against PEAR Coding Standard\n* ");
-$packagexml->setPackageType('php');
+
+$notes = <<EOT
+* Initial release!
+* Updated tests location inside directory hierarchy for easier running
+* Fixed a PHP variable undefined notice
+* Full support for three input/output modes: Number (big integer string, Binary and Btwoc (big-endian twos complement)
+* Allowed for a specific BigInteger extension to be selected for use from the Crypt_DiffieHellman contructor
+* Minor typo fixes against PEAR Coding Standard
+EOT;
+$packagexml->setNotes($notes);
+
$packagexml->setPhpDep('5.0.0');
-$packagexml->setPearinstallerDep('1.4.0');
+$packagexml->setPearinstallerDep('1.4.0b1');
+$packagexml->addPackageDepWithChannel('required', 'PEAR', 'pear.php.net', '1.3.6');
+
$packagexml->addMaintainer('lead', 'padraic', 'Pádraic Brady', 'padraic@php.net');
$packagexml->setLicense('New BSD License', 'http://opensource.org/licenses/bsd-license.php');
+
+$packagexml->addRelease();
$packagexml->generateContents();
-//$pkg = &$packagexml->exportCompatiblePackageFile1(); // get a PEAR_PackageFile object
+$packagexml->setAPIVersion('0.2.0');
+$packagexml->setReleaseVersion('0.2.0');
+$packagexml->setReleaseStability('beta');
+$packagexml->setAPIStability('beta');
if (isset($_GET['make']) || (isset($_SERVER['argv']) && @$_SERVER['argv'][1] == 'make')) {
- //$pkg->writePackageFile();
$packagexml->writePackageFile();
} else {
- //$pkg->debugPackageFile();
$packagexml->debugPackageFile();
-}
-?>
+}

0 comments on commit 1aa5dbf

Please sign in to comment.