PEARããã±ã¼ã¸ã®ä½ãæ¹
MoonyãPEARã®ããã±ã¼ã¸ã«ãã¦ã¿ããã¹ãã
ã¾ããPEAR::PEAR_PackageFileManagerãå©ç¨ãã¦package.xmlãä½æããã
ã¾ã alphaãã¼ã¸ã§ã³ã®1.6.0a6ãã¤ã³ã¹ãã¼ã«ã
$ pear config-set preferred-state alpha $ pear install --alldeps PEAR/PEAR_PackageFileManager
PEAR_PackageFileManager2ãå©ç¨ãã¦package.xmlãä½æããã¹ã¯ãªããï¼gen_package.xml.phpï¼:
<?php require_once 'PEAR/PackageFileManager2.php'; PEAR::setErrorHandling(PEAR_ERROR_DIE); $pkg = new PEAR_PackageFileManager2; $opts = array( 'baseinstalldir' => 'Moony', 'packagedirectory' => '/path/to/Moony/', 'filelistgenerator' => 'file', 'exceptions' => array('CHANGELOG' => 'doc', 'LICENSE' => 'doc') ); $pkg->setOptions($opts); $pkg->setPackage('Moony'); $pkg->setSummary('The web application framework'); $pkg->setDescription('The web application framework (using Smarty for the template engine)'); $pkg->setLicense('The BSD License', 'http://www.opensource.org/licenses/bsd-license.php'); $pkg->setReleaseVersion('0.7.0'); $pkg->setAPIVersion('0.7.0'); $pkg->setReleaseStability('beta'); $pkg->setAPIStability('beta'); $pkg->setPackageType('php'); $pkg->setPhpDep('4.3.0'); $pkg->setPearinstallerDep('1.3.5'); $pkg->setUri('http://moony.sourceforge.jp/'); $pkg->addIgnore('*CVS*'); $pkg->addMaintainer('lead', 'hiro_y', 'YAMAOKA Hiroyuki', '[email protected]'); $pkg->addRelease(); $pkg->setNotes('Moony'); $pkg->generateContents(); if (isset($argv[1]) && $argv[1] == 'make') { $pkg->writePackageFile(); } else { $pkg->debugPackageFile(); } ?>
以ä¸ã®ããã«ã¹ã¯ãªãããå®è¡ããã¨ãpackagedirectoryã«æå®ãããã£ã¬ã¯ããªã«package.xmlãä½æãããã
$ php /path/to/gen_package.xml.php make
ãã¨ã¯ä½æãããpackage.xmlã¨packagedirectoryã®ãã£ã¬ã¯ããªãã¾ã¨ãã¦tar.gzã«åºãã¦ãã¾ãã°OKãä¾ãã°ãMoony-0.7.0.tar.gzã¨ãããã¡ã¤ã«åã«ããå ´åã以ä¸ã®ã³ãã³ãã§ã¤ã³ã¹ãã¼ã«ã§ããã
$ pear install /path/to/Moony-0.7.0.tar.gz
ã¢ã³ã¤ã³ã¹ãã¼ã«ããå ´åã¯ä»¥ä¸ã®ã³ãã³ããå®è¡ã
$ pear uninstall __uri/Moony