本文整理汇总了PHP中PEAR_PackageFileManager2::addInstallAs方法的典型用法代码示例。如果您正苦于以下问题:PHP PEAR_PackageFileManager2::addInstallAs方法的具体用法?PHP PEAR_PackageFileManager2::addInstallAs怎么用?PHP PEAR_PackageFileManager2::addInstallAs使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PEAR_PackageFileManager2
的用法示例。
在下文中一共展示了PEAR_PackageFileManager2::addInstallAs方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1:
$packagexml->setAPIStability('devel');
$packagexml->setNotes("This version adds/recovers some compatibility with PHP_CodeSniffer : sniffers' interface, tests.");
$packagexml->setPackageType('php');
// this is a PEAR-style php script package
$packagexml->setPhpDep('5.1.2');
$packagexml->setPearinstallerDep('1.4.0b1');
$packagexml->addPackageDepWithChannel('package', 'PHP_CodeSniffer', 'pear.php.net', '1.2.0RC1');
$packagexml->addMaintainer('lead', 'blacksun', 'Gabriele Santini', 'gsantini@sqli.com');
$packagexml->setLicense('New BSD License', 'http://www.opensource.org/licenses/bsd-license.php');
$packagexml->addRelease();
// set up a release section
$packagexml->setOSInstallCondition('windows');
$packagexml->addReplacement('scripts/sqlics.bat.dist', 'pear-config', '@php_bin@', 'php_bin');
$packagexml->addReplacement('scripts/sqlics.bat.dist', 'pear-config', '@php_dir@', 'php_dir');
$packagexml->addReplacement('scripts/sqlics.bat.dist', 'pear-config', '@bin_dir@', 'bin_dir');
$packagexml->addInstallAs('scripts/sqlics.bat.dist', 'sqlics.bat');
$packagexml->addInstallAs('scripts/sqlics.dist', 'sqlics');
$packagexml->addRelease();
// set up a release section
$packagexml->addReplacement('scripts/sqlics.dist', 'pear-config', '@php_bin@', 'php_bin');
$packagexml->addInstallAs('scripts/sqlics.dist', 'sqlics');
$packagexml->addGlobalReplacement('package-info', '@package_version@', 'version');
$packagexml->addIgnore('PackageManager.php');
$packagexml->addIgnore('scripts/sqlics');
$packagexml->addIgnore('scripts/sqlics.bat');
$packagexml->generateContents();
// create the <contents> tag
if (isset($_GET['make']) || isset($_SERVER['argv']) && @$_SERVER['argv'][1] == 'make') {
$packagexml->writePackageFile();
} else {
$packagexml->debugPackageFile();
示例2: list
$package->setSummary($summary);
$package->setDescription($description);
$package->setChannel('pear.limb-project.com');
$package->setAPIVersion($apiVersion);
$package->setReleaseVersion($version);
$package->setReleaseStability($state);
$package->setAPIStability($apiStability);
$package->setNotes($changelog);
$package->setPackageType('php');
$package->setLicense('LGPL', 'http://www.gnu.org/copyleft/lesser.txt');
foreach ($maintainers as $line) {
list($role, $nick, $name, $email, $active) = explode(',', $line);
$package->addMaintainer($role, $nick, $name, $email, $active);
}
$package->addReplacement('pear_limb_unit', 'pear-config', '@PHP-BIN@', 'php_bin');
$package->addReplacement('pear_limb_unit', 'pear-config', '@PHP-DIR@', 'php_dir');
$package->addReplacement('pear_limb_unit.bat', 'pear-config', '@PHP-BIN@', 'php_bin');
$package->addReplacement('pear_limb_unit.bat', 'pear-config', '@PHP-DIR@', 'php_dir');
$package->addUnixEol('pear_limb_unit');
$package->addWindowsEol('pear_limb_unit.bat');
$package->addRelease();
$package->addInstallAs('pear_limb_unit', 'limb_unit');
$package->addInstallAs('pear_limb_unit.bat', 'limb_unit.bat');
$package->setPhpDep('5.1.4');
$package->setPearinstallerDep('1.4.99');
$package->generateContents();
$result = $package->writePackageFile();
if (PEAR::isError($result)) {
echo $result->getMessage();
exit(1);
}
示例3: array
foreach ($maintainers as $_m) {
$package->addMaintainer($_m['role'], $_m['user'], $_m['name'], $_m['email']);
}
$files = array();
// classes and tests
readDirectory($outsideDir . '/library');
readDirectory($outsideDir . '/tests');
$base = $outsideDir . '/';
foreach ($files as $file) {
$file = str_replace($base, '', $file);
$package->addReplacement($file, 'package-info', '@name@', 'name');
$package->addReplacement($file, 'package-info', '@package_version@', 'version');
}
$files = array();
// reset global
readDirectory($outsideDir . '/library');
foreach ($files as $file) {
$file = str_replace($base, '', $file);
$package->addInstallAs($file, str_replace('library/', '', $file));
}
$package->setPhpDep('5.3.3');
$package->setPearInstallerDep('1.7.0');
$package->addPackageDepWithChannel('required', 'DoctrineCommon', 'pear.doctrine-project.org');
$package->addPackageDepWithChannel('optional', 'symfony', 'pear.symfony-project.com');
$package->generateContents();
$package->addRelease();
if (isset($_GET['make']) || isset($_SERVER['argv']) && @$_SERVER['argv'][1] == 'make') {
$package->writePackageFile();
} else {
$package->debugPackageFile();
}
示例4: array
$post_install_script = $pfm->initPostinstallScript($postinstall_file);
$post_install_script->addParamGroup('setup',
array($post_install_script->getParam('db_user', 'User', 'string', 'root'),
$post_install_script->getParam('db_password', 'Password', 'string', ''),
$post_install_script->getParam('db_host', 'Host', 'string', 'localhost'),
$post_install_script->getParam('db_name', 'Database', 'string', 'intraface'),
$post_install_script->getParam('path_root', 'Root path', 'string', '/home/intraface/'),
$post_install_script->getParam('path_www', 'WWW Path', 'string', '/'),
$post_install_script->getParam('path_template', 'template path', 'string', '/'),
$post_install_script->getParam('path_template_kundelogin', 'kundelogin template', 'string', '/'),
$post_install_script->getParam('intraface_private_key', 'Intraface key', 'string', '/'),
$post_install_script->getParam('quickpay_merchant_id', 'Quickpay merchant', 'string', '/'),
$post_install_script->getParam('quickpay_md5_secret', 'Quickpay secret', 'string', '/'),
),
'');
$pfm->addPostInstallTask($post_install_script, $postinstall_file);
*/
$pfm->addInstallAs('www/.htaccess', 'elevforeningen.vih.dk/.htaccess');
$pfm->addInstallAs('www/index.php', 'elevforeningen.vih.dk/index.php');
$pfm->addInstallAs('www/gfx/images/vih75x151.gif', 'elevforeningen.vih.dk/gfx/images/vih75x151.gif');
$pfm->addInstallAs('www/gfx/images/widepics/hangingout1.jpg', 'elevforeningen.vih.dk/gfx/images/widepics/hangingout1.jpg');
$pfm->generateContents();
if (isset($_GET['make']) || isset($_SERVER['argv']) && @$_SERVER['argv'][1] == 'make') {
if ($pfm->writePackageFile()) {
exit('package file written');
}
} else {
$pfm->debugPackageFile();
}
示例5: array
$package->setOptions(array('filelistgenerator' => 'file', 'simpleoutput' => true, 'baseinstalldir' => '/', 'packagedirectory' => './', 'dir_roles' => array('Concentrate' => 'php', 'tests' => 'test', 'data' => 'data'), 'exceptions' => array('scripts/concentrate' => 'script'), 'ignore' => array('package.php', '*.tgz'), 'installexceptions' => array('scripts/concentrate' => '/')));
$package->setPackage('Concentrate');
$package->setSummary('Tool to glob and minify static resources for websites using ' . 'silverorange\'s Site framework.');
$package->setDescription($description);
$package->setChannel('pear.silverorange.com');
$package->setPackageType('php');
$package->setLicense('LGPL License 2.1', 'http://www.gnu.org/copyleft/lesser.html');
$package->setNotes($release_notes);
$package->setReleaseVersion($release_version);
$package->setReleaseStability($release_state);
$package->setAPIVersion($api_version);
$package->setAPIStability($api_state);
$package->addMaintainer('lead', 'gauthierm', 'Mike Gauthier', 'mike@silverorange.com');
$package->addReplacement('data/cli.xml', 'package-info', '@package-version@', 'version');
$package->addReplacement('Concentrate/CLI.php', 'package-info', '@package-name@', 'name');
$package->addReplacement('Concentrate/CLI.php', 'pear-config', '@data-dir@', 'data_dir');
$package->setPhpDep('5.2.1');
$package->addExtensionDep('optional', 'memcached');
$package->addPackageDepWithChannel('required', 'YAML', 'pear.symfony-project.com', '1.0.2');
$package->addPackageDepWithChannel('required', 'PEAR', 'pear.php.net', '1.4.0');
$package->addPackageDepWithChannel('required', 'Console_CommandLine', 'pear.php.net', '1.1.0');
$package->setPearInstallerDep('1.4.0');
$package->generateContents();
// *nix release
$package->addRelease();
$package->addInstallAs('scripts/concentrate', 'concentrate');
if (isset($_GET['make']) || isset($_SERVER['argv']) && @$_SERVER['argv'][1] == 'make') {
$package->writePackageFile();
} else {
$package->debugPackageFile();
}
示例6:
$package->addPackageDepWithChannel('required', 'Stagehand_AlterationMonitor', 'pear.piece-framework.com', '1.0.0');
$package->addPackageDepWithChannel('required', 'Stagehand_Autoload', 'pear.piece-framework.com', '0.4.0');
$package->addPackageDepWithChannel('required', 'Stagehand_CLIController', 'pear.piece-framework.com', '0.1.0');
$package->addPackageDepWithChannel('required', 'Stagehand_DirectoryScanner', 'pear.piece-framework.com', '1.0.0');
$package->addPackageDepWithChannel('optional', 'Console_Color', 'pear.php.net', '1.0.2');
$package->addPackageDepWithChannel('optional', 'Net_Growl', 'pear.php.net', '0.7.0');
$package->addPackageDepWithChannel('optional', 'PHPSpec', 'pear.phpspec.org', '0.2.3');
$package->addPackageDepWithChannel('optional', 'PHPUnit', 'pear.phpunit.de', '3.4.1');
$package->addExtensionDep('required', 'pcre');
$package->addExtensionDep('required', 'SPL');
$package->addExtensionDep('optional', 'dom');
$package->addExtensionDep('optional', 'mbstring');
$package->addMaintainer('lead', 'iteman', 'KUBO Atsuhiro', 'kubo@iteman.jp');
$package->addMaintainer('developer', 'kumatch', 'KUMAKURA Yousuke', 'kumatch@gmail.com');
$package->addGlobalReplacement('package-info', '@package_version@', 'version');
$package->addInstallAs('bin/phpspecrunner', 'phpspecrunner');
$package->addInstallAs('bin/phpspecrunner.bat', 'phpspecrunner.bat');
$package->addInstallAs('bin/phptrunner', 'phptrunner');
$package->addInstallAs('bin/phptrunner.bat', 'phptrunner.bat');
$package->addInstallAs('bin/phpunitrunner', 'phpunitrunner');
$package->addInstallAs('bin/phpunitrunner.bat', 'phpunitrunner.bat');
$package->addInstallAs('bin/simpletestrunner', 'simpletestrunner');
$package->addInstallAs('bin/simpletestrunner.bat', 'simpletestrunner.bat');
$package->generateContents();
if (array_key_exists(1, $_SERVER['argv']) && $_SERVER['argv'][1] == 'make') {
$package->writePackageFile();
} else {
$package->debugPackageFile();
}
exit;
/*
示例7:
$package->setDescription($description);
$package->setChannel('pear.php.net');
$package->setPackageType('php');
$package->setLicense('LGPL', 'http://www.gnu.org/copyleft/lesser.html');
$package->setNotes($releaseNotes);
$package->setReleaseVersion($releaseVersion);
$package->setReleaseStability($releaseState);
$package->setAPIVersion($apiVersion);
$package->setAPIStability($apiState);
$package->addMaintainer('lead', 'gauthierm', 'Mike Gauthier', 'mike@silverorange.com');
$package->addMaintainer('lead', 'nrf', 'Nathan Fredrickson', 'nathan@silverorange.com');
$package->addMaintainer('lead', 'alec', 'Aleksander Machniak', 'alec@alec.pl');
$package->addReplacement('data/pinentry-cli.xml', 'package-info', '@package-version@', 'version');
$package->addReplacement('Crypt/GPG/PinEntry.php', 'package-info', '@package-name@', 'name');
$package->addReplacement('Crypt/GPG/PinEntry.php', 'pear-config', '@data-dir@', 'data_dir');
$package->addReplacement('Crypt/GPG/Engine.php', 'pear-config', '@bin-dir@', 'bin_dir');
$package->addReplacement('scripts/crypt-gpg-pinentry', 'pear-config', '@php-dir@', 'php_dir');
$package->setPhpDep('5.4.8');
$package->addExtensionDep('optional', 'posix');
$package->addExtensionDep('required', 'mbstring');
$package->addOsDep('windows', true);
$package->setPearinstallerDep('1.4.0');
$package->addPackageDepWithChannel('required', 'Console_CommandLine', 'pear.php.net', '1.1.10');
$package->generateContents();
$package->addRelease();
$package->addInstallAs('scripts/crypt-gpg-pinentry', 'crypt-gpg-pinentry');
if (isset($_GET['make']) || isset($_SERVER['argv']) && @$_SERVER['argv'][1] == 'make') {
$package->writePackageFile();
} else {
$package->debugPackageFile();
}
示例8:
$packagexml->setSummary('So, tell me about your file...');
$packagexml->setDescription('Given any file, Describr will describe it. Can be used as a command line script or within a PHP project');
$packagexml->setChannel(BOXUK_PEAR_CHANNEL);
$packagexml->setAPIVersion($version);
$packagexml->setReleaseVersion($version);
$packagexml->setReleaseStability('stable');
$packagexml->setAPIStability('stable');
$packagexml->setNotes("-");
$packagexml->setPackageType('php');
$packagexml->addReplacement('BoxUK/Describr/Plugins/BoxUK/ImageMainColourPicker.php', 'pear-config', '@DATA_DIR@', 'data_dir');
$packagexml->addReplacement('bin/describr-pear.php', 'pear-config', '@PHP_DIR@', 'php_dir');
////////////WINDOWS///////////////////////////
$packagexml->addRelease();
// WINDOWS
$packagexml->setOSInstallCondition('windows');
$packagexml->addInstallAs('bin/describr-pear.bat', 'describr.bat');
$packagexml->addReplacement('bin/describr-pear.bat', 'pear-config', '@PHP_BIN@', 'php_bin');
$packagexml->addReplacement('bin/describr-pear.bat', 'pear-config', '@BIN_DIR@', 'bin_dir');
$packagexml->addInstallAs('bin/describr-pear.php', 'describr-pear.php');
/////////////////////////////////////////////
///////////NON-WINDOWS///////////////////////
$packagexml->addRelease();
// NON-WINDOWS
$packagexml->addInstallAs('bin/describr-pear', 'describr');
$packagexml->addReplacement('bin/describr-pear', 'pear-config', '@PHP_BIN@', 'php_bin');
$packagexml->addReplacement('bin/describr-pear', 'pear-config', '@BIN_DIR@', 'bin_dir');
$packagexml->addInstallAs('bin/describr-pear.php', 'describr-pear.php');
/////////////////////////////////////////////
$packagexml->setPhpDep('5.3.0');
$packagexml->setPearinstallerDep('1.3.0');
$packagexml->addMaintainer('lead', 'Open', 'Source', 'opensource@boxuk.com');
示例9: main
/**
* Main entry point for d51pearpkg2 task
*/
public function main()
{
PEAR_Frontend::setFrontendObject(new d51PearPkg2Task_Frontend($this));
$package = new PEAR_PackageFileManager2();
$this->_initOptions();
$a = $package->setOptions($this->_options);
if (PEAR::isError($a)) {
$this->log($a->getMessage(), Project::MSG_ERR);
exit(-1);
}
$package->setPackage((string) $this->_name);
$package->setSummary((string) $this->_summary);
$desc = preg_replace("/^({$this->_description->indention_type}{{$this->_description->indentions_to_remove}}|\t)+/m", '', (string) $this->_description);
$package->setDescription($desc);
$package->setChannel((string) $this->_channel);
$package->setAPIVersion($this->_version->api);
$package->setReleaseVersion($this->_version->release);
$package->setAPIStability($this->_stability->api);
$package->setReleaseStability($this->_stability->release);
// TODO: allow different types
$package->setPackageType($this->_type);
$package->addRelease();
if (!is_null($this->_dependencies->php)) {
$this->log('Using explicit PHP minimum version: ' . $this->_dependencies->php->minimum_version);
$package->setPhpDep($this->_dependencies->php->minimum_version);
} else {
$this->log('Using current PHP version as minimum: ' . phpversion());
$package->setPhpDep(phpversion());
}
if (!is_null($this->_dependencies->pear)) {
$this->log('setting minimum PEAR version: ' . $this->_dependencies->pear->minimum_version);
$package->setPearinstallerDep($this->_dependencies->pear->minimum_version, $this->_dependencies->pear->maximum_version, $this->_dependencies->pear->recommended_version, $this->_dependencies->pear->exclude_version);
} else {
$this->log('setting minimum PEAR version to currently installed version');
$pear_version = PEAR_Config::singleton()->getRegistry()->packageInfo('PEAR', 'version');
$this->log('minimum PEAR version: ' . $pear_version);
$package->setPearinstallerDep(PEAR_Config::singleton()->getRegistry()->packageInfo('PEAR', 'version'));
}
foreach ($this->_maintainers as $maintainer) {
$this->log("adding maintainer [{$maintainer->user}/{$maintainer->name}] with role [{$maintainer->role}]");
$package->addMaintainer($maintainer->role, $maintainer->user, $maintainer->name, $maintainer->email, $maintainer->active);
}
// handle dependencies
if (!empty($this->_dependencies)) {
$this->log('adding dependencies');
if (count($this->_dependencies->groups) > 0) {
$this->log('found dependency groups');
foreach ($this->_dependencies->groups as $group) {
$this->log("adding [{$group->name}] :: [{$group->hint}]");
$package->addDependencyGroup($group->name, $group->hint);
foreach ($group->packages as $sub_package) {
$package->addGroupPackageDepWithChannel('subpackage', $group->name, $sub_package->name, $sub_package->channel, '0.0.1');
}
}
}
if (count($this->_dependencies->packages) > 0) {
$this->log('found dependencies');
foreach ($this->_dependencies->packages as $dependency) {
$this->log("adding following dependency: {$dependency->channel}/{$dependency->name}");
$package->addPackageDepWithChannel($dependency->type, $dependency->name, $dependency->channel, $dependency->minimum_version, $dependency->maximum_version, $dependency->recommended_version, $dependency->exclude_version, $dependency->providesextension, $dependency->nodefault);
}
}
if (count($this->_dependencies->extensions) > 0) {
$this->log('adding extension dependencies');
foreach ($this->_dependencies->extensions as $extension) {
$this->log("adding ext dependency for: {$extension->name}");
$package->addExtensionDep($extension->type, $extension->name, $extension->minimum_version, $extension->maximum_version, $extension->recommended_version, $extension->extension);
}
}
}
foreach ($this->_changelogs as $changelog) {
$this->log("adding changelog for prior release [{$changelog->version}]");
$changelog->package = $package;
$package->setChangelogEntry($changelog->version, $changelog->toArray());
if (is_null($this->_notes) && $package->getVersion() == $changelog->version) {
$this->log("no package notes specified, using changelog entry");
$this->_notes = $changelog->contents;
}
}
foreach ($this->_replacements as $replacement) {
$replacement->isValid();
$this->log("adding replace from [{$replacement->from}] to [{$replacement->to}]");
$package->addReplacement($replacement->path, $replacement->type, $replacement->from, $replacement->to);
}
foreach ($this->_releases as $release) {
$this->log('adding new release');
$package->addRelease();
foreach ($release->install as $install) {
$this->log("installing [{$install->name}] as [{$install->as}]");
$package->addInstallAs($install->name, $install->as);
}
}
$notes = preg_replace("/^( {4}|\t)+/m", '', (string) $this->_notes);
$package->setNotes($notes);
$package->setLicense($this->_license->license, $this->_license->uri);
$package->generateContents();
$e = $package->writePackageFile();
//.........这里部分代码省略.........
示例10: array
$pfm->setDescription('
Konstrukt is a minimalistic framework which provides a foundation on which to build rather than a boxed solution to all problems. It focuses on the controller layer, and tries to encourage the developer to deal directly with the HTTP protocol instead of abstracting it away. Konstrukt uses a hierarchical controller pattern, which provides a greater level of flexibility than the popular routed front controller frameworks.');
$pfm->setUri('http://www.konstrukt.dk/');
$pfm->setLicense('LGPL License', 'http://www.gnu.org/licenses/lgpl.html');
$pfm->addMaintainer('lead', 'troelskn', 'Troels Knak-Nielsen', 'troelskn@gmail.com');
$pfm->addMaintainer('helper', 'anders.ekdahl', 'Anders Ekdahl', '');
$pfm->addMaintainer('helper', 'lsolesen', 'Lars Olesen', 'lsolesen@users.sourceforge.net');
$pfm->setPackageType('php');
$pfm->setAPIVersion($version);
$pfm->setReleaseVersion($version);
$pfm->setAPIStability($stability);
$pfm->setReleaseStability($stability);
$pfm->setNotes($notes);
$pfm->addRelease();
$pfm->clearDeps();
$pfm->setPhpDep('5.2.0');
$pfm->setPearinstallerDep('1.5.0');
$lib_files = array('konstrukt/adapter.inc.php', 'konstrukt/charset.inc.php', 'konstrukt/konstrukt.inc.php', 'konstrukt/template.inc.php', 'konstrukt/logging.inc.php', 'konstrukt/response.inc.php', 'konstrukt/virtualbrowser.inc.php');
foreach ($lib_files as $file) {
$pfm->addInstallAs('lib/' . $file, $file);
}
$pfm->generateContents();
if (isset($_GET['make']) || isset($_SERVER['argv']) && @$_SERVER['argv'][1] == 'make') {
echo "\nCreating PEAR package file\n";
if ($pfm->writePackageFile()) {
echo "\npackage.xml written\n\n";
exit;
}
} else {
$pfm->debugPackageFile();
}
示例11:
$packagexml->setReleaseVersion($config['release_ver']);
$packagexml->setAPIVersion($config['api_ver']);
$packagexml->setReleaseStability($config['stability']);
$packagexml->setAPIStability($config['stability']);
$packagexml->setSummary($config['summery']);
$packagexml->setDescription($config['description']);
$packagexml->setNotes($config['note']);
$packagexml->setPhpDep($config['dep_php']);
$packagexml->setPearinstallerDep($config['pear_ver']);
$packagexml->addMaintainer('lead', 'koriyama', 'Koriyama', 'koriyama@bear-project.net');
$packagexml->setLicense('The BSD License', 'http://www.opensource.org/licenses/bsd-license.php');
$packagexml->addRole('sh', 'script');
$packagexml->addRole('conf', 'php');
$packagexml->addRole('yml', 'php');
$packagexml->addRole('tpl', 'php');
$packagexml->addInstallAs('BEAR/BEAR/bin/bear.sh', 'bear');
// dependency pear.bear-project.net
$packagexml->addPackageDepWithChannel('required', 'Panda', 'pear.bear-project.net', '0.3.38');
// dependency pear.zfcampus.org1
//$packagexml->addPackageDepWithChannel('required', 'zf', 'pear.zfcampus.org', '1.10.2');
// dependency pear.php.net
/**
$packagexml->addPackageDepWithChannel('required', 'Cache_Lite', 'pear.php.net', '1.7.0');
$packagexml->addPackageDepWithChannel('required', 'HTML_QuickForm', 'pear.php.net', '3.2.5');
$packagexml->addPackageDepWithChannel('required', 'HTML_QuickForm_Renderer_Tableless', 'pear.php.net', '0.6.0');
$packagexml->addPackageDepWithChannel('required', 'HTTP_Request2', 'pear.php.net', '1.1.0');
$packagexml->addPackageDepWithChannel('required', 'HTTP_Session2', 'pear.php.net', '0.7.2');
$packagexml->addPackageDepWithChannel('required', 'Log', 'pear.php.net', '1.9.3');
$packagexml->addPackageDepWithChannel('required', 'Net_UserAgent_Mobile', 'pear.php.net', '0.26.0');
$packagexml->addPackageDepWithChannel('required', 'Pager', 'pear.php.net', '2.3.6');
$packagexml->addPackageDepWithChannel('required', 'Spreadsheet_Excel_Writer', 'pear.php.net', '0.9.0');
示例12: array
array(//$post_install_script->getParam('db_user', 'User', 'string', 'root'),
//$post_install_script->getParam('db_password', 'Password', 'string', ''),
//$post_install_script->getParam('db_host', 'Host', 'string', 'localhost'),
//$post_install_script->getParam('db_name', 'Database', 'string', 'intraface')
),
'');
$pfm->addPostInstallTask($post_install_script, 'kursuscenter.php');
foreach ($web_files AS $file) {
$formatted_file = substr($file, strlen($web_dir . '/'));
if (in_array($formatted_file, $ignore)) continue;
$pfm->addInstallAs($file, 'kursuscenter.vih.dk/' . $formatted_file);
}
*/
$pfm->addInstallAs('web/index.php', 'kursuscenter.vih.dk/index.php');
$pfm->addInstallAs('web/images/borsen.jpg', 'kursuscenter.vih.dk/images/borsen.jpg');
$pfm->addInstallAs('web/images/dobbeltvaerelse.jpg', 'kursuscenter.vih.dk/images/dobbeltvaerelse.jpg');
$pfm->addInstallAs('web/images/enkeltvaerelse.jpg', 'kursuscenter.vih.dk/images/enkeltvaerelse.jpg');
$pfm->addInstallAs('web/images/forhallen.jpg', 'kursuscenter.vih.dk/images/forhallen.jpg');
$pfm->addInstallAs('web/images/globen_sh.jpg', 'kursuscenter.vih.dk/images/globen_sh.jpg');
$pfm->addInstallAs('web/images/globen1.jpg', 'kursuscenter.vih.dk/images/globen1.jpg');
$pfm->addInstallAs('web/images/globenkursuscenter.jpg', 'kursuscenter.vih.dk/images/globenkursuscenter.jpg');
$pfm->addInstallAs('web/images/hall.jpg', 'kursuscenter.vih.dk/images/hall.jpg');
$pfm->addInstallAs('web/images/lenegammelgaard.jpg', 'kursuscenter.vih.dk/images/lenegammelgaard.jpg');
$pfm->addInstallAs('web/images/modelokale.jpg', 'kursuscenter.vih.dk/images/modelokale.jpg');
$pfm->addInstallAs('web/images/naturkompagniet.jpg', 'kursuscenter.vih.dk/images/naturkompagniet.jpg');
$pfm->addInstallAs('web/images/spisesal.jpg', 'kursuscenter.vih.dk/images/spisesal.jpg');
$pfm->addInstallAs('web/images/tack.jpg', 'kursuscenter.vih.dk/images/tack.jpg');
$pfm->addInstallAs('web/faciliteter.php', 'kursuscenter.vih.dk/faciliteter.php');
$pfm->addInstallAs('web/include_kursuscenter.php', 'kursuscenter.vih.dk/include_kursuscenter.php');
示例13: array
$packagexml->setOptions(array("outputdirectory" => ".", "filelistgenerator" => "file", "packagefile" => "package_pman.xml", "packagedirectory" => "output/", "baseinstalldir" => "php.net/", "simpleoutput" => true, "roles" => array("sh" => "script"), "dir_roles" => array("man3" => "doc"), "ignore" => array("index.sqlite", "man3/DomDocument.xinclude.3.gz")));
$packagexml->setPackage("pman");
$packagexml->setSummary("PHP Unix manual pages");
$packagexml->setDescription("Unix manual pages of the PHP documentations from php.net.");
$packagexml->setChannel("doc.php.net");
$packagexml->setAPIVersion("1.0.0");
$packagexml->setReleaseVersion(date("Y.m.d"));
$packagexml->setReleaseStability("stable");
$packagexml->setAPIStability("stable");
$packagexml->setLicense("Creative Commons Attribution 3.0", "http://creativecommons.org/licenses/by/3.0/");
$packagexml->setNotes("New release \\o/");
$packagexml->setPackageType("php");
$packagexml->addRelease();
$packagexml->setPhpDep("5.0.0");
$packagexml->setPearinstallerDep("1.9.0");
$packagexml->addExtensionDep("required", "zlib");
$packagexml->addMaintainer("lead", "phpdoc", "The PHP Documentation team", "phpdoc@lists.php.net");
rename("output/php-functions", "output/man3");
copy(__DIR__ . "/pman.sh", "output/pman.sh");
$packagexml->addReplacement("pman.sh", "pear-config", "@doc_dir@", "doc_dir");
$packagexml->addInstallAs("pman.sh", "pman");
$packagexml->generateContents();
$packagexml->writePackageFile();
rename("output/pman.sh", "pman.sh");
rename("output/man3", "man3");
$contents = file_get_contents("package_pman.xml");
$contents = str_replace('baseinstalldir="php.net/" name="pman.sh"', 'baseinstalldir="" name="pman.sh"', $contents);
file_put_contents("package_pman.xml", $contents);
system("pear package package_pman.xml");
rename("man3", "output/php-functions");
unlink("pman.sh");
示例14:
$pack->setSummary("Database Faker PHP 5.3.x");
$pack->setDescription("Database Faker for PHP 5.3.x projects");
$pack->setChannel('icomefromthenet.github.com/pear');
$pack->setPackageType('php');
// this is a PEAR-style php script package
$pack->setReleaseVersion('1.0.3');
$pack->setAPIVersion('1.0.3');
$pack->setReleaseStability('stable');
$pack->setAPIStability('stable');
$pack->setNotes('
* The first release of Faker for PHP 5.3.x
');
$pack->setLicense('Apache License, Version 2.0', 'http://www.apache.org/licenses/LICENSE-2.0');
$pack->addMaintainer('lead', 'icomefromthenet', 'Lewis Dyer', 'getintouch@icomefromthenet.com');
$pack->addRelease();
$pack->addInstallAs('bin/faker.php', 'faker');
// core dependencies
$pack->setPhpDep('5.3.2');
$pack->setPearinstallerDep('1.4.6');
// package dependencies
#none;
$pack->addReplacement('bin/faker.php', 'pear-config', '@PHP-BIN@', 'php_bin');
$pack->addReplacement('bin/faker.php', 'pear-config', '@PEAR-DATA@', 'data_dir');
$pack->addReplacement('bin/faker.php', 'pear-config', '/usr/bin/env php', 'php_bin');
//$pack->addReplacement('bin/faker.php', 'pear-config', '@PEAR-DIR@', 'php_dir');
$pack->addReplacement('Faker/Bootstrap.php', 'pear-config', '@PHP-BIN@', 'php_bin');
$pack->addReplacement('Faker/Command/InitProjectCommand.php', 'pear-config', '@PHP-BIN@', 'php_bin');
$pack->addReplacement('Faker/Command/InitProjectCommand.php', 'pear-config', '@PEAR-DATA@', 'data_dir');
$pack->generateContents();
$pack->writePackageFile();
$output->writeLn('Package file created: <info>' . $outputDir . 'package.xml</info>');
示例15:
$pfm->setReleaseVersion($version);
$pfm->setReleaseStability('stable');
$pfm->setAPIStability('stable');
$pfm->setNotes("v1.0.0 release candidate #1");
$pfm->setPackageType('php');
// dependencies
//$pfm->addDependency("Console_Getopt");
// windows-release
$pfm->addRelease();
// set up a release section
$pfm->setOSInstallCondition('windows');
$pfm->addIgnoreToRelease('bin/xref-lint');
$pfm->addIgnoreToRelease('bin/xref-doc');
$pfm->addIgnoreToRelease('bin/xref-ci');
$pfm->addIgnoreToRelease('bin/git-xref-lint');
$pfm->addInstallAs('bin/xref-lint.bat', 'xref-lint.bat');
$pfm->addInstallAs('bin/xref-doc.bat', 'xref-doc.bat');
// other platforms
$pfm->addRelease();
$pfm->addIgnoreToRelease('bin/xref-lint.bat');
$pfm->addIgnoreToRelease('bin/xref-doc.bat');
$pfm->addInstallAs('bin/xref-lint', 'xref-lint');
$pfm->addInstallAs('bin/xref-doc', 'xref-doc');
$pfm->addInstallAs('bin/xref-ci', 'xref-ci');
$pfm->addInstallAs('bin/git-xref-lint', 'git-xref-lint');
$pfm->setPhpDep('5.2.0');
$pfm->setPearinstallerDep('1.4.0a12');
$pfm->addMaintainer('lead', 'gariev', 'Igor Gariev', 'gariev@hotmail.com');
$pfm->setLicense('PHP License', 'http://www.php.net/license');
$pfm->addGlobalReplacement('package-info', '@version@', 'version');
$pfm->addGlobalReplacement('pear-config', '@php_bin@', 'php_bin');