From: halt1983 Date: Tue, 27 Dec 2005 16:03:25 +0000 (+0000) Subject: - add script for make pear package X-Git-Tag: ETHNA_2_1_0~66 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=2fad450c1ade32d4acbb192727efd97e08ead1fe;p=ethna%2Fethna.git - add script for make pear package --- diff --git a/bin/make_package.php b/bin/make_package.php new file mode 100644 index 0000000..491df2c --- /dev/null +++ b/bin/make_package.php @@ -0,0 +1,53 @@ + 'Ethna', + 'baseinstalldir' => 'Ethna', + 'version' => '0.2.0', + 'packagedirectory' => dirname(dirname(__FILE__)), + 'summary' => 'Ethna PHP Framework Packages', + 'notes' => 'Ethna PHP', + 'state' => 'alpha', + 'license' => 'BSD', + 'filelistgenerator' => 'file', + 'ignore' => array('CVS/', 'make_package.php', 'package.xml'), + 'changelogoldtonew' => false, + 'description' => 'Ethna Framework Package', + 'simpleoutput' => true, + ); + +print("Start Script\n"); + +$packagexml = new PEAR_PackageFileManager; +$packagexml->setOptions($config); +$packagexml->addRole('tpl', 'php'); +$packagexml->addMaintainer('cocoitiban', 'contributor', 'Keita Arai', 'cocoiti@comio.info'); +$packagexml->addMaintainer('halt', 'lead', 'halt feits', 'halt.hde@gmail.com'); +$packagexml->addDependency('PEAR', '1.3.5', 'ge', 'pkg', false); +$packagexml->addDependency('php', '4.1.0', 'ge', 'php', false); + +// note use of debugPackageFile() - this is VERY important +if (isset($_GET['make']) || $_SERVER['argv'][1] == 'make') { + debug_print("writePackageFile\n"); + $result = $packagexml->writePackageFile(); +} else { + $result = $packagexml->debugPackageFile(); + debug_print("debugPackageFile\n"); +} + +if (PEAR::isError($result)) { + debug_print($result->getMessage()."\n"); + exit(); +} +debug_print("End Script\n"); + +function debug_print($message) +{ + return print($message); +} +?>