当前位置: 首页>>代码示例>>PHP>>正文


PHP PEAR_PackageFileManager2::addPackageDepWithChannel方法代码示例

本文整理汇总了PHP中PEAR_PackageFileManager2::addPackageDepWithChannel方法的典型用法代码示例。如果您正苦于以下问题:PHP PEAR_PackageFileManager2::addPackageDepWithChannel方法的具体用法?PHP PEAR_PackageFileManager2::addPackageDepWithChannel怎么用?PHP PEAR_PackageFileManager2::addPackageDepWithChannel使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在PEAR_PackageFileManager2的用法示例。


在下文中一共展示了PEAR_PackageFileManager2::addPackageDepWithChannel方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: execute

 protected function execute($arguments = array(), $options = array())
 {
     // Remove E_STRICT and E_DEPRECATED from error_reporting
     error_reporting(error_reporting() & ~(E_STRICT | E_DEPRECATED));
     require_once 'PEAR/PackageFileManager2.php';
     $pluginName = $arguments['name'];
     $info = $this->getPluginManager()->getPluginInfo($pluginName);
     if (!$info) {
         $info = array('n' => $pluginName, 'c' => opPluginManager::OPENPNE_PLUGIN_CHANNEL, 'l' => 'Apache', 's' => $pluginName, 'd' => $pluginName);
     }
     $packageXml = new PEAR_PackageFileManager2();
     $options = array('packagedirectory' => sfConfig::get('sf_plugins_dir') . '/' . $pluginName . '/', 'filelistgenerator' => 'file', 'baseinstalldir' => '/');
     $e = $packageXml->setOptions($options);
     if (PEAR::isError($e)) {
         echo $e->getMessage();
         exit;
     }
     $packageXml->_options['roles'] = array('*' => 'data');
     $maintainers = $this->getPluginManager()->getPluginMaintainer($pluginName);
     foreach ($maintainers as $maintainer) {
         $packageXml->addMaintainer($maintainer['r'], $maintainer['h'], $maintainer['n'], '');
     }
     $packageXml->setPackage($pluginName);
     $packageXml->setChannel(opPluginManager::OPENPNE_PLUGIN_CHANNEL);
     $packageXml->setReleaseVersion($arguments['version']);
     $packageXml->setReleaseStability($arguments['stability']);
     $packageXml->setApiVersion($arguments['version']);
     $packageXml->setApiStability($arguments['stability']);
     $packageXml->setNotes($arguments['note']);
     $packageXml->setPhpDep('5.2.3');
     $packageXml->setPearinstallerDep('1.4.0');
     $packageXml->addPackageDepWithChannel('package', 'symfony', 'pear.symfony-project.com', '1.2.0');
     $packageXml->generateContents();
     $packageXml->setPackageType('php');
     if (isset($info['l'])) {
         $packageXml->setLicense($info['l']);
     }
     if (isset($info['s'])) {
         $packageXml->setSummary($info['s']);
     }
     if (isset($info['d'])) {
         $packageXml->setDescription($info['d']);
     }
     $e = $packageXml->writePackageFile();
     if (PEAR::isError($e)) {
         echo $e->getMessage();
         exit;
     }
 }
开发者ID:phenom,项目名称:OpenPNE3,代码行数:49,代码来源:opPluginDefineTask.class.php

示例2: array

$package = new PEAR_PackageFileManager2();
$package->setOptions(array('filelistgenerator' => 'file', 'changelogoldtonew' => false, 'simpleoutput' => true, 'baseinstalldir' => '/', 'packagefile' => 'package.xml', 'packagedirectory' => '.', 'ignore' => array('package.php')));
$package->setPackage('Piece_Unity_Component_Flexy');
$package->setPackageType('php');
$package->setSummary('A component for HTML_Template_Flexy');
$package->setDescription('A component for HTML_Template_Flexy');
$package->setChannel('pear.piece-framework.com');
$package->setLicense('BSD License (revised)', 'http://www.opensource.org/licenses/bsd-license.php');
$package->setAPIVersion($apiVersion);
$package->setAPIStability($apiStability);
$package->setReleaseVersion($releaseVersion);
$package->setReleaseStability($releaseStability);
$package->setNotes($notes);
$package->setPhpDep('4.3.0');
$package->setPearinstallerDep('1.4.3');
$package->addPackageDepWithChannel('required', 'Piece_Unity', 'pear.piece-framework.com', '1.5.0');
$package->addPackageDepWithChannel('required', 'HTML_Template_Flexy', 'pear.php.net', '1.2.4');
$package->addPackageDepWithChannel('required', 'PEAR', 'pear.php.net', '1.4.3');
$package->addMaintainer('lead', 'iteman', 'KUBO Atsuhiro', 'iteman@users.sourceforge.net');
$package->addMaintainer('developer', 'kumatch', 'KUMAKURA Yousuke', 'kumatch@users.sourceforge.net');
$package->addGlobalReplacement('package-info', '@package_version@', 'version');
$package->generateContents();
if (array_key_exists(1, $_SERVER['argv']) && $_SERVER['argv'][1] == 'make') {
    $package->writePackageFile();
} else {
    $package->debugPackageFile();
}
exit;
/*
 * Local Variables:
 * mode: php
开发者ID:piece,项目名称:piece-unity-component-flexy,代码行数:31,代码来源:package.php

示例3: array

$packagexml = new PEAR_PackageFileManager2();
$packagexml->setOptions(array('baseinstalldir' => '/', 'simpleoutput' => true, 'packagedirectory' => './', 'filelistgenerator' => 'file', 'ignore' => array('runTests.php', 'generatePackage.php', 'phpunit-bootstrap.php', 'phpunit.xml', 'README', 'coverage*'), 'dir_roles' => array('tests' => 'test', 'examples' => 'doc')));
$packagexml->setPackage('HTTP_OAuth');
$packagexml->setSummary('PEAR implementation of the OAuth 1.0a specification');
$packagexml->setDescription('Allows the use of the consumer and provider angles of the OAuth 1.0a specification');
$packagexml->setChannel('pear.php.net');
$packagexml->setAPIVersion('0.2.0');
$packagexml->setReleaseVersion('0.2.3');
$packagexml->setReleaseStability('alpha');
$packagexml->setAPIStability('alpha');
$packagexml->setNotes('* Fixed GH issue #10.  don\'t use reset() to get the first array value
* Disabled E_DEPRECTED error logging when creating packages
');
$packagexml->setPackageType('php');
$packagexml->addRelease();
$packagexml->detectDependencies();
$packagexml->addMaintainer('lead', 'jeffhodsdon', 'Jeff Hodsdon', 'jeffhodsdon@gmail.com');
$packagexml->addMaintainer('lead', 'shupp', 'Bill Shupp', 'shupp@php.net');
$packagexml->setLicense('New BSD License', 'http://www.opensource.org/licenses/bsd-license.php');
$packagexml->setPhpDep('5.1.2');
$packagexml->setPearinstallerDep('1.4.0');
$packagexml->addPackageDepWithChannel('required', 'PEAR', 'pear.php.net', '1.4.0');
$packagexml->addPackageDepWithChannel('required', 'HTTP_Request2', 'pear.php.net', '0.5.1');
$packagexml->addPackageDepWithChannel('optional', 'Log', 'pear.php.net');
$packagexml->addPackageDepWithChannel('optional', 'Cache_Lite', 'pear.php.net');
$packagexml->addExtensionDep('required', 'date');
$packagexml->addExtensionDep('required', 'SPL');
$packagexml->addExtensionDep('required', 'hash');
$packagexml->addExtensionDep('optional', 'pecl_http', '1.6.0');
$packagexml->generateContents();
$packagexml->writePackageFile();
开发者ID:localdisk,项目名称:HTTP_OAuth,代码行数:31,代码来源:generatePackage.php

示例4: array

$description = <<<EOT
Tumblr blog integration with Site package.
EOT;
$package = new PEAR_PackageFileManager2();
PEAR::setErrorHandling(PEAR_ERROR_DIE);
$result = $package->setOptions(array('filelistgenerator' => 'file', 'simpleoutput' => true, 'baseinstalldir' => '/', 'packagedirectory' => './', 'dir_roles' => array('Sniftr' => 'php', 'locale' => 'data', 'www' => 'data', 'dependencies' => 'data', '/' => 'data')));
$package->setPackage('Sniftr');
$package->setSummary('Tumblr blog integration for Site package.');
$package->setDescription($description);
$package->setChannel('pear.silverorange.com');
$package->setPackageType('php');
$package->setLicense('LGPL', 'http://www.gnu.org/copyleft/lesser.html');
$package->setReleaseVersion($version);
$package->setReleaseStability('alpha');
$package->setAPIVersion('0.1.0');
$package->setAPIStability('alpha');
$package->setNotes($notes);
$package->addIgnore('package.php');
$package->addMaintainer('lead', 'gauthierm', 'Mike Gauthier', 'mike@silverorange.com');
$package->addReplacement('Sniftr/Sniftr.php', 'pear-config', '@DATA-DIR@', 'data_dir');
$package->setPhpDep('5.3.0');
$package->setPearinstallerDep('1.4.0');
$package->addPackageDepWithChannel('required', 'Site', 'pear.silverorange.com', '1.5.25');
$package->addExtensionDep('required', 'curl');
$package->addExtensionDep('required', 'simplexml');
$package->generateContents();
if (isset($_GET['make']) || isset($_SERVER['argv']) && @$_SERVER['argv'][1] == 'make') {
    $package->writePackageFile();
} else {
    $package->debugPackageFile();
}
开发者ID:GervaisdeM,项目名称:sniftr,代码行数:31,代码来源:package.php

示例5: main

    public function main()
    {
        require_once 'PEAR/PackageFileManager2.php';
        require_once 'PEAR/Exception.php';
        PEAR::setErrorHandling(PEAR_ERROR_CALLBACK, 'PEAR_ErrorToPEAR_Exception');
        if (!$this->baseDir || !file_exists($this->baseDir)) {
            throw new BuildException('Base directory is not defined or does not exist.');
        }
        if (!$this->buildDir || !file_exists($this->buildDir)) {
            throw new BuildException('Build directory is not defined or does not exist.');
        }
        set_time_limit(0);
        $this->log("Adding .keep files to empty directories", PROJECT_MSG_INFO);
        foreach (new RecursiveIteratorIterator(new RecursiveDirectoryIterator(realpath('samples')), RecursiveIteratorIterator::CHILD_FIRST) as $dir) {
            if ($dir->isDir()) {
                foreach (new DirectoryIterator($dir->getPathname()) as $d) {
                    if (!in_array($d->getFilename(), array('.', '..'))) {
                        continue 2;
                    }
                }
                touch($dir->getPathname() . '/.keep');
            }
        }
        $this->log("Building package contents in: {$this->dir}", PROJECT_MSG_INFO);
        $version = $this->project->getProperty('agavi.pear.version');
        $status = $this->project->getProperty('agavi.status');
        // Modify short description. Try to keep under 80 chars width
        $shortDesc = <<<EOD
PHP5 MVC Application Framework
EOD;
        // Modify long description. Try to keep under 80 chars width
        $longDesc = <<<EOD
Agavi is a full-featured MVC-style framework for PHP5 with a strong focus on structure, code reusability and flexibility.
EOD;
        $p2 = new PEAR_PackageFileManager2();
        $p2->setOptions(array('filelistgenerator' => 'file', 'outputdirectory' => $this->baseDir, 'packagedirectory' => $this->buildDir, 'baseinstalldir' => 'agavi', 'ignore' => array('.svn/'), 'addhiddenfiles' => true, 'dir_roles' => array('/' => 'php', 'bin' => 'script', 'samples' => 'data'), 'installexceptions' => array('bin/agavi-dist' => '/', 'bin/agavi.bat-dist' => '/'), 'exceptions' => array('API_CHANGELOG' => 'doc', 'CHANGELOG' => 'doc', 'COPYRIGHT' => 'doc', 'INSTALL' => 'doc', 'LICENSE' => 'doc', 'LICENSE-AGAVI' => 'doc', 'LICENSE-ICU' => 'doc', 'LICENSE-SCHEMATRON' => 'doc', 'LICENSE-UNICODE_CLDR' => 'doc', 'RELEASE_NOTES' => 'doc', 'UPGRADING' => 'doc')));
        $p2->setPackageType('php');
        $p2->setPackage('agavi');
        $p2->addMaintainer('lead', 'david', 'David Zülke', 'david.zuelke@bitextender.com');
        $p2->addMaintainer('developer', 'dominik', 'Dominik del Bondio', 'dominik.del.bondio@bitextender.com');
        $p2->addMaintainer('developer', 'felix', 'Felix Gilcher', 'felix.gilcher@bitextender.com');
        $p2->addMaintainer('developer', 'impl', 'Noah Fontes', 'nfontes@cynigram.com');
        $p2->addMaintainer('developer', 'v-dogg', 'Veikko Mäkinen', 'mail@veikkomakinen.com');
        $p2->setChannel('pear.agavi.org');
        $p2->setReleaseVersion($version);
        $p2->setAPIVersion($version);
        $p2->setReleaseStability($status);
        $p2->setAPIStability($status);
        $p2->setSummary($shortDesc);
        $p2->setDescription($longDesc);
        $p2->setNotes("To see what's new, please refer to the RELEASE_NOTES. Also, the CHANGELOG contains a full list of changes.\n\nFor installation instructions, consult INSTALL. Information on how to migrate applications written using previous releases can be found in UPGRADING.");
        // this must be the most stupid syntax I've ever seen.
        $p2->addRelease();
        $p2->setOSInstallCondition('windows');
        $p2->addInstallAs('bin/agavi.bat-dist', 'agavi.bat');
        $p2->addIgnoreToRelease('bin/agavi-dist');
        // and the next release... very cool, eh? how utterly stupid is that
        $p2->addRelease();
        $p2->addInstallAs('bin/agavi-dist', 'agavi');
        $p2->addIgnoreToRelease('bin/agavi.bat-dist');
        $p2->addPackageDepWithChannel('required', 'phing', 'pear.phing.info', '2.4.0');
        $p2->addPackageDepWithChannel('optional', 'PHPUnit', 'pear.phpunit.de', '3.7.0');
        $p2->addConflictingPackageDepWithChannel('phing', 'pear.php.net');
        $p2->setPhpDep('5.2.0');
        $p2->addExtensionDep('required', 'dom');
        $p2->addExtensionDep('required', 'libxml');
        $p2->addExtensionDep('required', 'SPL');
        $p2->addExtensionDep('required', 'Reflection');
        $p2->addExtensionDep('required', 'pcre');
        $p2->addExtensionDep('optional', 'xsl');
        $p2->addExtensionDep('optional', 'tokenizer');
        $p2->addExtensionDep('optional', 'session');
        $p2->addExtensionDep('optional', 'xmlrpc');
        $p2->addExtensionDep('optional', 'PDO');
        $p2->addExtensionDep('optional', 'iconv');
        $p2->addExtensionDep('optional', 'gettext');
        $p2->setPearinstallerDep('1.4.0');
        $p2->setLicense('LGPL', 'http://www.gnu.org/copyleft/lesser.html');
        $p2->addReplacement('bin/agavi-dist', 'pear-config', '@PEAR-DIR@', 'php_dir');
        $p2->addReplacement('bin/agavi-dist', 'pear-config', '@PHP-BIN@', 'php_bin');
        $p2->addReplacement('bin/agavi.bat-dist', 'pear-config', '@PEAR-DIR@', 'php_dir');
        $p2->addReplacement('bin/agavi.bat-dist', 'pear-config', '@PHP-BIN@', 'php_bin');
        $p2->addReplacement('src/build/build.xml', 'pear-config', '@PEAR-DIR@', 'php_dir');
        $p2->generateContents();
        try {
            $p2->writePackageFile();
        } catch (PEAR_Exception $e) {
            $this->log("Oops! Caught PEAR Exception: " . $e->getMessage());
        }
    }
开发者ID:horros,项目名称:agavi,代码行数:90,代码来源:AgaviPackageTask.php

示例6: array

$package = new PEAR_PackageFileManager2();
$package->setOptions(array('filelistgenerator' => 'file', 'changelogoldtonew' => false, 'simpleoutput' => true, 'baseinstalldir' => '/', 'packagefile' => 'package.xml', 'packagedirectory' => '.', 'ignore' => array('package.php')));
$package->setPackage('Piece_Unity_Component_ContentLength');
$package->setPackageType('php');
$package->setSummary('An output filter which sends a Content-Legnth header. This filter must be added first.');
$package->setDescription('An output filter which sends a Content-Legnth header. This filter must be added first.');
$package->setChannel('pear.piece-framework.com');
$package->setLicense('BSD License (revised)', 'http://www.opensource.org/licenses/bsd-license.php');
$package->setAPIVersion($apiVersion);
$package->setAPIStability($apiStability);
$package->setReleaseVersion($releaseVersion);
$package->setReleaseStability($releaseStability);
$package->setNotes($notes);
$package->setPhpDep('4.3.0');
$package->setPearinstallerDep('1.4.3');
$package->addPackageDepWithChannel('required', 'Piece_Unity', 'pear.piece-framework.com', '1.0.0');
$package->addMaintainer('lead', 'iteman', 'KUBO Atsuhiro', 'iteman@users.sourceforge.net');
$package->addGlobalReplacement('package-info', '@package_version@', 'version');
$package->generateContents();
if (array_key_exists(1, $_SERVER['argv']) && $_SERVER['argv'][1] == 'make') {
    $package->writePackageFile();
} else {
    $package->debugPackageFile();
}
exit;
/*
 * Local Variables:
 * mode: php
 * coding: iso-8859-1
 * tab-width: 4
 * c-basic-offset: 4
开发者ID:piece,项目名称:piece-unity-component-contentlength,代码行数:31,代码来源:package.php

示例7: array

<?php

require_once 'PEAR/PackageFileManager2.php';
PEAR::setErrorHandling(PEAR_ERROR_DIE);
$packagexml = new PEAR_PackageFileManager2();
$packagexml->setOptions(array('baseinstalldir' => '/', 'simpleoutput' => true, 'packagedirectory' => './', 'filelistgenerator' => 'file', 'ignore' => array('runTests.php', 'generatePackage.php', 'File/Mogile/BigFile.php'), 'dir_roles' => array('tests' => 'test', 'examples' => 'doc')));
$packagexml->setPackage('File_Mogile');
$packagexml->setSummary('PHP interface to MogileFS');
$packagexml->setDescription('An interface for accessing MogileFS.');
$packagexml->setChannel('pear.php.net');
$packagexml->setAPIVersion('0.2.0');
$packagexml->setReleaseVersion('0.2.0');
$packagexml->setReleaseStability('alpha');
$packagexml->setAPIStability('alpha');
$packagexml->setNotes('* Initial release');
$packagexml->setPackageType('php');
$packagexml->addRelease();
$packagexml->detectDependencies();
$packagexml->addMaintainer('lead', 'shupp', 'Bill Shupp', 'shupp@php.net');
$packagexml->addMaintainer('lead', 'richid', 'Rich Schumacher', 'rich.schu@gmail.com');
$packagexml->setLicense('New BSD License', 'http://www.opensource.org/licenses/bsd-license.php');
$packagexml->setPhpDep('5.2.0');
$packagexml->setPearinstallerDep('1.4.0b1');
$packagexml->addPackageDepWithChannel('required', 'PEAR', 'pear.php.net', '1.4.0');
$packagexml->addExtensionDep('required', 'curl');
$packagexml->addExtensionDep('required', 'mbstring');
$packagexml->addExtensionDep('required', 'filter');
$packagexml->addExtensionDep('required', 'date');
$packagexml->generateContents();
$packagexml->writePackageFile();
开发者ID:shupp,项目名称:File_Mogile,代码行数:30,代码来源:generatePackage.php

示例8: exit

if (PEAR::isError($result)) {
    echo $result->getMessage();
    exit(1);
}
$package->setPackage($name);
$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->setPhpDep('5.1.4');
$package->setPearinstallerDep('1.4.99');
$package->addPackageDepWithChannel('required', 'core', 'pear.limb-project.com', '0.2.0');
$package->addPackageDepWithChannel('required', 'dbal', 'pear.limb-project.com', '0.2.2');
$package->addPackageDepWithChannel('required', 'validation', 'pear.limb-project.com', '0.3.0');
$package->addPackageDepWithChannel('required', 'toolkit', 'pear.limb-project.com', '0.2.0');
$package->generateContents();
$result = $package->writePackageFile();
if (PEAR::isError($result)) {
    echo $result->getMessage();
    exit(1);
}
开发者ID:knevcher,项目名称:limb,代码行数:31,代码来源:package.php

示例9: array

$packagexml = new PEAR_PackageFileManager2();
$e = $packagexml->setOptions(array('clearcontents' => true, 'baseinstalldir' => 'SQLI', 'packagedirectory' => '.', 'dir_roles' => array('scripts' => 'script', 'tests' => 'test', 'CodeSniffer/Standards/Generic/Reports' => 'php', 'CodeSniffer/Standards/GN/Reports' => 'php', 'CodeSniffer/Standards/GNNew/Reports' => 'php', 'CodeSniffer/Standards/ZF/Reports' => 'php', 'CodeSniffer/Standards/Symfony/Reports' => 'php', 'CodeSniffer/Standards/Generic/Tests' => 'test', 'CodeSniffer/Standards/GN/Tests' => 'test', 'CodeSniffer/Standards/GNNew/Tests' => 'test', 'CodeSniffer/Standards/ZF/Tests' => 'test', 'CodeSniffer/Standards/Symfony/Tests' => 'test'), 'installexceptions' => array('scripts/sqlics.dist' => '/', 'scripts/sqlics.bat.dist' => '/')));
$packagexml->setPackage('SQLI_CodeSniffer');
$packagexml->setSummary('SQLI extension to PHP_CodeSniffer');
$packagexml->setDescription('SQLI_CodeSniffer extends PHP_CodeSniffer to add violation codes and configurable severities and messages');
$packagexml->setUri('http://www.assembla.com/spaces/sqlics/documents');
$packagexml->setAPIVersion('0.4.0dev1');
$packagexml->setReleaseVersion('0.4.0dev1');
$packagexml->setReleaseStability('devel');
$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');
开发者ID:proofek,项目名称:SQLI_CodeSniffer,代码行数:31,代码来源:PackageManager.php

示例10:

$package->setChannel('pear.silverorange.com');
$package->setPackageType('php');
$package->setLicense('LGPL', 'http://www.gnu.org/copyleft/lesser.html');
$package->setReleaseVersion($version);
$package->setReleaseStability('stable');
$package->setAPIVersion('0.0.1');
$package->setAPIStability('stable');
$package->setNotes($notes);
$package->addIgnore('package.php');
$package->addMaintainer('lead', 'nrf', 'Nathan Fredrickson', 'nathan@silverorange.com');
$package->addMaintainer('lead', 'gauthierm', 'Mike Gauthier', 'mike@silverorange.com');
$package->addMaintainer('lead', 'nick', 'Nick Burka', 'nick@silverorange.com');
$package->addReplacement('Pinhole/Pinhole.php', 'pear-config', '@data-dir@', 'data_dir');
$package->addReplacement('Pinhole/pages/PinholeWebDavServerPage.php', 'pear-config', '@data-dir@', 'data_dir');
$package->setPhpDep('5.3.0');
$package->setPearinstallerDep('1.4.0');
$package->addPackageDepWithChannel('required', 'Swat', 'pear.silverorange.com', '1.4.57');
$package->addPackageDepWithChannel('required', 'Site', 'pear.silverorange.com', '1.6.18');
$package->addPackageDepWithChannel('required', 'Admin', 'pear.silverorange.com', '1.3.42');
$package->addPackageDepWithChannel('required', 'MDB2', 'pear.php.net', '2.2.2');
$package->addPackageDepWithChannel('required', 'Yui', 'pear.silverorange.com', '1.0.6');
$package->addPackageDepWithChannel('required', 'NateGoSearch', 'pear.silverorange.com', '1.0.19');
$package->addPackageDepWithChannel('optional', 'Services_Akismet2', 'pear.php.net', '0.2.0');
$package->addExtensionDep('required', 'imagick', '2.0.0');
$package->addExtensionDep('required', 'iconv');
$package->generateContents();
if (isset($_GET['make']) || isset($_SERVER['argv']) && @$_SERVER['argv'][1] == 'make') {
    $package->writePackageFile();
} else {
    $package->debugPackageFile();
}
开发者ID:GervaisdeM,项目名称:pinhole,代码行数:31,代码来源:package.php

示例11: buildSubPackage

 public function buildSubPackage($dir, $baseinstalldir, $info)
 {
     $package = str_replace('/', '_', $baseinstalldir);
     $opts = array('packagedirectory' => $dir, 'filelistgenerator' => 'file', 'ignore' => array('*composer.json', '*package.xml'), 'baseinstalldir' => '/' . $info['target-dir'], 'packagefile' => 'package.xml');
     $pfm = new PEAR_PackageFileManager2();
     $e = $pfm->setOptions($opts);
     $pfm->setPackage($package);
     $pfm->setSummary($info['description']);
     $pfm->setDescription($info['description']);
     $pfm->setPackageType('php');
     $pfm->setChannel('guzzlephp.org/pear');
     $pfm->setAPIVersion('3.0.0');
     $pfm->setReleaseVersion($this->getVersion());
     $pfm->setAPIStability('stable');
     $pfm->setReleaseStability('stable');
     $pfm->setNotes($this->changelog_notes);
     $pfm->setPackageType('php');
     $pfm->setLicense('MIT', 'http://github.com/guzzle/guzzle/blob/master/LICENSE');
     $pfm->addMaintainer('lead', 'mtdowling', 'Michael Dowling', 'mtdowling@gmail.com', 'yes');
     $pfm->setDate($this->changelog_release_date);
     $pfm->generateContents();
     $phpdep = $this->guzzleinfo['require']['php'];
     $phpdep = str_replace('>=', '', $phpdep);
     $pfm->setPhpDep($phpdep);
     $pfm->setPearinstallerDep('1.4.6');
     foreach ($info['require'] as $type => $version) {
         if ($type == 'php') {
             continue;
         }
         if ($type == 'symfony/event-dispatcher') {
             $pfm->addPackageDepWithChannel('required', 'EventDispatcher', 'pear.symfony.com', '2.1.0');
         }
         if ($type == 'ext-curl') {
             $pfm->addExtensionDep('required', 'curl');
         }
         if (substr($type, 0, 6) == 'guzzle') {
             $gdep = str_replace('/', ' ', $type);
             $gdep = ucwords($gdep);
             $gdep = str_replace(' ', '_', $gdep);
             $pfm->addPackageDepWithChannel('required', $gdep, 'guzzlephp.org/pear', $this->getVersion());
         }
     }
     // can't have main Guzzle package AND sub-packages
     $pfm->addConflictingPackageDepWithChannel('Guzzle', 'guzzlephp.org/pear', false, $apiversion);
     ob_start();
     $startdir = getcwd();
     chdir((string) $this->basedir . '/build/pearwork');
     echo "DEBUGGING GENERATED PACKAGE FILE\n";
     $result = $pfm->debugPackageFile();
     if ($result) {
         $out = $pfm->writePackageFile();
         echo "\n\n\nWRITE PACKAGE FILE RESULT:\n";
         var_dump($out);
         // load up package file and build package
         $packager = new PEAR_Packager();
         echo "\n\n\nBUILDING PACKAGE FROM PACKAGE FILE:\n";
         $dest_package = $packager->package($opts['packagedirectory'] . '/package.xml');
         var_dump($dest_package);
     } else {
         echo "\n\n\nDEBUGGING RESULT:\n";
         var_dump($result);
     }
     echo "removing package.xml";
     unlink($opts['packagedirectory'] . '/package.xml');
     $log = ob_get_clean();
     file_put_contents((string) $this->basedir . '/build/artifacts/logs/pear_package_' . $package . '.log', $log);
     chdir($startdir);
 }
开发者ID:Frinstio,项目名称:AlfredWorkflow.com,代码行数:68,代码来源:GuzzlePearPharPackageTask.php

示例12: dirname

PEAR::setErrorHandling(PEAR_ERROR_DIE);
$packagexml = new PEAR_PackageFileManager2();
$e = $packagexml->setOptions(array('baseinstalldir' => 'Net/URL', 'packagedirectory' => dirname(__FILE__) . '/..', 'filelistgenerator' => 'file', 'include' => array('*.php'), 'ignore' => array('scripts/', '*.plex'), 'dir_roles' => array('tests' => 'test')));
$version = '0.9.0';
$packagexml->setPackage('Net_URL_Mapper');
$packagexml->setSummary('Provides a simple and flexible way to build nice URLs for web applications.');
$packagexml->setDescription('Net_URL_Mapper provides a simple and flexible way to build nice URLs for your web applications.

The URL syntax is similar to what can be found in Ruby on Rails or Python Routes module 
and as such, this package can be compared to what they call a router. Still, Net_URL_Mapper 
does not perform the dispatching like these frameworks and therefore can be used with your 
own router.');
$packagexml->setChannel('pear.php.net');
$packagexml->setAPIVersion('1.0.0');
$packagexml->setReleaseVersion($version);
$packagexml->setReleaseStability('beta');
$packagexml->setAPIStability('stable');
$packagexml->setNotes("Initial release");
$packagexml->setPackageType('php');
$packagexml->setPhpDep('5.1.0');
$packagexml->setPearinstallerDep('1.4.3');
$packagexml->addPackageDepWithChannel('required', 'Net_URL', 'pear.php.net', '1.0.14');
$packagexml->addMaintainer('lead', 'mansion', 'Bertrand Mansion', 'golgote@mamasam.com');
$packagexml->setLicense('New BSD License', 'http://opensource.org/licenses/bsd-license.php');
$packagexml->generateContents();
$packagexml->addGlobalReplacement('package-info', '@package_version@', 'version');
if (isset($_GET['make']) || isset($_SERVER['argv']) && @$_SERVER['argv'][1] == 'make') {
    $packagexml->writePackageFile();
} else {
    $packagexml->debugPackageFile();
}
开发者ID:Ki4mTaria,项目名称:ayawave,代码行数:31,代码来源:create_package.xml.php

示例13: 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();
}
开发者ID:Lazybin,项目名称:huisa,代码行数:31,代码来源:package.php

示例14: dirname

require_once 'PEAR/PackageFileManager2.php';
// recommended - makes PEAR_Errors act like exceptions (kind of)
PEAR::setErrorHandling(PEAR_ERROR_DIE);
$packagexml = new PEAR_PackageFileManager2();
$packagexml->setOptions(array('filelistgenerator' => 'file', 'packagedirectory' => dirname(__FILE__) . "/src", 'baseinstalldir' => 'PEAR', 'simpleoutput' => true));
$packagexml->setPackageType('php');
$packagexml->addRelease();
$packagexml->setPackage('ChainRecord');
$packagexml->setChannel('__uri');
$packagexml->setReleaseVersion('0.1.0');
$packagexml->setAPIVersion('0.1.0');
$packagexml->setReleaseStability('alpha');
$packagexml->setAPIStability('alpha');
$packagexml->setSummary('Object-Relation Mapper for php with Method Chain.');
$packagexml->setDescription('Database Access Library for php 5.2.x');
$packagexml->setNotes('Initial release');
$packagexml->setPhpDep('5.2.0');
$packagexml->setPearinstallerDep('1.4.0a12');
$packagexml->addPackageDepWithChannel('required', 'PEAR_PackageFileManager', 'pear.php.net', '1.5.1');
$packagexml->addMaintainer('lead', 'hirakiuc', 'Daisuke Hirakiuchi', 'hirakiuc@gmail.com');
$packagexml->setLicense('MIT License', 'http://www.opensource.org/licenses/mit-license.php');
$packagexml->addGlobalReplacement('package-info', '@PEAR-VER@', 'version');
$packagexml->generateContents();
//$pkg = &$packagexml->exportCompatiblePackageFile1();
if (isset($_GET['make']) || isset($_SERVER['argv']) && @$_SERVER['argv'][1] == 'make') {
    //    $pkg->writePackageFile();
    $packagexml->writePackageFile();
} else {
    //    $pkg->debugPackageFile();
    $packagexml->debugPackageFile();
}
开发者ID:hirakiuc,项目名称:ChainRecord,代码行数:31,代码来源:makepackage.php

示例15: foreach

{
    foreach (glob($path . '/*') as $file) {
        if (!is_dir($file)) {
            $GLOBALS['files'][] = $file;
        } else {
            readDirectory($file);
        }
    }
}
$files = array();
readDirectory(__DIR__ . '/library');
/**
 * @desc Strip this from the filename for 'addInstallAs'
 */
$base = __DIR__ . '/';
foreach ($files as $file) {
    $file2 = str_replace($base, '', $file);
    $package->addReplacement($file2, 'package-info', '@package_version@', 'version');
    $file2 = str_replace($base, '', $file);
    $package->addInstallAs($file2, str_replace('library/', '', $file2));
}
$package->setPhpDep('5.2.0');
$package->addPackageDepWithChannel('optional', 'ZF', 'pear.zfcampus.org', '1.10.0');
$package->addExtensionDep('required', 'spl');
$package->setPearInstallerDep('1.4.0a7');
$package->generateContents();
if (isset($_GET['make']) || isset($_SERVER['argv']) && @$_SERVER['argv'][1] == 'make') {
    $package->writePackageFile();
} else {
    $package->debugPackageFile();
}
开发者ID:cliftonscott,项目名称:EasyBib_Form_Decorator,代码行数:31,代码来源:generate-package.php


注:本文中的PEAR_PackageFileManager2::addPackageDepWithChannel方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。