コード例 #1
0
set_time_limit(0);
require_once 'PEAR/PackageFileManager2.php';
PEAR::setErrorHandling(PEAR_ERROR_PRINT);
$pkg = new PEAR_PackageFileManager2();
$pkg->setOptions(array('baseinstalldir' => '/', 'packagefile' => 'package2.xml', 'packagedirectory' => realpath(dirname(__FILE__) . '/library'), 'filelistgenerator' => 'file', 'include' => array('*'), 'dir_roles' => array('/' => 'php'), 'ignore' => array('HTMLPurifier.standalone.php', 'HTMLPurifier.path.php', 'standalone/')));
$pkg->setPackage('HTMLPurifier');
$pkg->setLicense('LGPL', 'http://www.gnu.org/licenses/lgpl.html');
$pkg->setSummary('Standards-compliant HTML filter');
$pkg->setDescription('HTML Purifier is an HTML filter that will remove all malicious code
    (better known as XSS) with a thoroughly audited, secure yet permissive
    whitelist and will also make sure your documents are standards
    compliant.');
$pkg->addMaintainer('lead', 'ezyang', 'Edward Z. Yang', '*****@*****.**', 'yes');
$version = trim(file_get_contents('VERSION'));
$api_version = substr($version, 0, strrpos($version, '.'));
$pkg->setChannel('htmlpurifier.org');
$pkg->setAPIVersion($api_version);
$pkg->setAPIStability('stable');
$pkg->setReleaseVersion($version);
$pkg->setReleaseStability('stable');
$pkg->addRelease();
$pkg->setNotes(file_get_contents('WHATSNEW'));
$pkg->setPackageType('php');
$pkg->setPhpDep('5.0.0');
$pkg->setPearinstallerDep('1.4.3');
$pkg->generateContents();
$compat =& $pkg->exportCompatiblePackageFile1();
$compat->writePackageFile();
$pkg->writePackageFile();
// vim: et sw=4 sts=4
コード例 #2
0
$packagexml->setNotes('Ethna PHP Web Application Framework');
$packagexml->setPackageType('php');
$packagexml->addRole('css', 'php');
$packagexml->addRole('tpl', 'php');
$packagexml->addRole('ethna', 'php');
$packagexml->addRole('sh', 'script');
$packagexml->addRole('bat', 'script');
$packagexml->setPhpDep('4.1.0');
$packagexml->setPearinstallerDep('1.3.5');
$packagexml->addMaintainer('lead', 'fujimoto', 'Masaki Fujimoto', '*****@*****.**');
$packagexml->addMaintainer('lead', 'halt', 'halt feits', '*****@*****.**');
$packagexml->addMaintainer('lead', 'cocoitiban', 'Keita Arai', '*****@*****.**');
$packagexml->setLicense('The BSD License', 'http://www.opensource.org/licenses/bsd-license.php');
$packagexml->addReplacement('bin/ethna.bat', 'pear-config', '@PEAR-DIR@', 'php_dir');
$packagexml->addReplacement('bin/ethna.bat', 'pear-config', '@PHP-BIN@', 'bin_dir');
$packagexml->addReplacement('bin/ethna.sh', 'pear-config', '@PEAR-DIR@', 'php_dir');
$packagexml->addReplacement('bin/ethna.sh', 'pear-config', '@PHP-BIN@', 'bin_dir');
$packagexml->addRelease();
$packagexml->setOSInstallCondition('windows');
$packagexml->addInstallAs('bin/ethna.bat', 'ethna.bat');
$packagexml->addIgnoreToRelease('bin/ethna.sh');
$packagexml->addRelease();
$packagexml->addInstallAs('bin/ethna.sh', 'ethna');
$packagexml->addIgnoreToRelease('bin/ethna.bat');
$packagexml->generateContents();
if ($is_old_package) {
    $pkg =& $packagexml->exportCompatiblePackageFile1();
    $pkg->writePackageFile();
} else {
    $packagexml->writePackageFile();
}