cvs: pear /PHP_CompatInfo package.php
| From: | Laurent Laville | Date: | Sat, 10 Feb 2007 15:36:03 +0000 |
| Subject: | cvs: pear /PHP_CompatInfo package.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-44609@lists.php.net to get a copy of this message | ||
farell Sat Feb 10 15:36:03 2007 UTC
Modified files:
/pear/PHP_CompatInfo package.php
Log:
new package script generator that will produce only package xml version 2.0
http://cvs.php.net/viewvc.cgi/pear/PHP_CompatInfo/package.php?r1=1.14&r2=1.15&diff_format=u
Index: pear/PHP_CompatInfo/package.php
diff -u pear/PHP_CompatInfo/package.php:1.14 pear/PHP_CompatInfo/package.php:1.15
--- pear/PHP_CompatInfo/package.php:1.14 Mon Mar 14 13:39:25 2005
+++ pear/PHP_CompatInfo/package.php Sat Feb 10 15:36:03 2007
@@ -1,62 +1,64 @@
<?php
-require_once 'PEAR/PackageFileManager.php';
-
-unset($_SERVER['PATH_TRANSLATED']);
-
-$version = '1.0.0';
-$notes = <<<EOT
-Fixed Bug #3657
-- Now unsets all constants that are PHP5 only. This means
-that PHP5 detection on PHP4 is now highly unlikely but that PHP4
-detection should be much better.
-EOT;
-
-$description =<<<EOT
-PHP_CompatInfo will parse a file/folder/script/array to find out the minimum
-version and extensions required for it to run. Features advanced debug output
-which shows which functions require which version and CLI output script
-EOT;
-
-$package = new PEAR_PackageFileManager();
-
-$result = $package->setOptions(array(
- 'package' => 'PHP_CompatInfo',
- 'summary' => 'Find out the minimum version and the extensions
required for a piece of code to run',
- 'description' => $description,
- 'version' => $version,
- 'state' => 'stable',
- 'license' => 'PHP License',
- 'ignore' =>
array('*entries*','*Template*','*Root*','*Repository*','package.php',
'package.xml', '*.bak', '*src*', '*.tgz',
'*pear_media*', 'index.htm', '*tests*'),
- 'filelistgenerator' => 'cvs', // other option is 'file'
- 'notes' => $notes,
+/**
+ * PHP_CompatInfo Package Script Generator
+ *
+ * Generate a new fresh version of package xml 2.0 built with PEAR_PackageFileManager 1.6.0+
+ *
+ * LICENSE: This source file is subject to version 3.01 of the PHP license
+ * that is available through the world-wide-web at the following URI:
+ * http://www.php.net/license/3_01.txt. If you
did not receive a copy of
+ * the PHP License and are unable to obtain it through the web, please
+ * send a note to license@php.net so we can mail you a copy immediately.
+ *
+ * @category PHP
+ * @package PHP_CompatInfo
+ * @author Laurent Laville <pear@laurent-laville.org>
+ * @license http://www.php.net/license/3_01.txt PHP License 3.01
+ * @version CVS: $Id: package.php,v 1.15 2007/02/10 15:36:03 farell Exp $
+ * @link http://pear.php.net/package/PHP_CompatInfo
+ * @since File available since Release 1.4.1
+ * @ignore
+ */
+
+require_once 'PEAR/PackageFileManager2.php';
+
+PEAR::setErrorHandling(PEAR_ERROR_DIE);
+
+$packagefile = 'c:/php/pear/PHP_CompatInfo/package2.xml';
+
+$options = array('filelistgenerator' => 'cvs',
+ 'packagefile' => 'package2.xml',
+ 'baseinstalldir' => 'PHP',
+ 'simpleoutput' => true,
+ 'clearcontents' => false,
'changelogoldtonew' => false,
- 'baseinstalldir' => 'PHP',
- 'packagedirectory' => '',
- 'simpleoutput' => true,
- 'cleardependencies' => true,
- ));
-
-if (PEAR::isError($result)) {
- echo $result->getMessage();
- die();
-}
-
-$package->addMaintainer('davey','lead','Davey
Shafik','davey@php.net');
+ 'ignore' => array('package.php', 'index.htm')
+ );
-$package->addDependency('php', '4.3.0', 'ge', 'php');
-$package->addDependency('tokenizer', '', 'has', 'ext',
false);
-$package->addDependency('Console_Table','1.0.1','ge','pkg',true);
-$package->addDependency('Console_Getopt','1.2','ge','pkg',true);
+$p2 = &PEAR_PackageFileManager2::importOptions($packagefile, $options);
+$p2->setPackageType('php');
+$p2->addRelease();
+$p2->generateContents();
+$p2->setReleaseVersion('1.4.1');
+$p2->setAPIVersion('1.4.0');
+$p2->setReleaseStability('stable');
+$p2->setAPIStability('stable');
+$p2->setNotes('* changes
+- upgrade license from PHP 3.0 to 3.01
+- fixed wrong implementation of Console_Getargs feature fixed in version 1.33 (see bug #9252)
+- improve PHP5 detection with a new fresh up-to-date func_array.php file
+(that include the new function "spl_object_hash" came with PHP 5.2.0)
+
+* QA
+- Improve readability (hilighted source code) of User Guide 1.4.1 included in this release
+that cover all versions 1.4.x
+ see http://pear.laurent-laville.org/PHP_CompatInfo
for more format to download.
+');
+$p2->setLicense('PHP License 3.01', 'http://www.php.net/license/3_01.txt');
-
-if (isset($_SERVER['argv'][1]) && $_SERVER['argv'][1] ==
'commit') {
- $result = $package->writePackageFile();
+if (isset($_GET['make']) || (isset($_SERVER['argv']) &&
@$_SERVER['argv'][1] == 'make')) {
+ $p2->writePackageFile();
} else {
- $result = $package->debugPackageFile();
-}
-
-if (PEAR::isError($result)) {
- echo $result->getMessage();
- die();
+ $p2->debugPackageFile();
}
?>
\ No newline at end of file