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;
     }
 }
$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', '*****@*****.**');
$package->addMaintainer('developer', 'kumatch', 'KUMAKURA Yousuke', '*****@*****.**');
$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
$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', '*****@*****.**');
$packagexml->addMaintainer('lead', 'shupp', 'Bill Shupp', '*****@*****.**');
$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();
Exemple #4
0
$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', '*****@*****.**');
$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();
}
Exemple #5
0
    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', '*****@*****.**');
        $p2->addMaintainer('developer', 'dominik', 'Dominik del Bondio', '*****@*****.**');
        $p2->addMaintainer('developer', 'felix', 'Felix Gilcher', '*****@*****.**');
        $p2->addMaintainer('developer', 'impl', 'Noah Fontes', '*****@*****.**');
        $p2->addMaintainer('developer', 'v-dogg', 'Veikko Mäkinen', '*****@*****.**');
        $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());
        }
    }
$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', '*****@*****.**');
$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
<?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', '*****@*****.**');
$packagexml->addMaintainer('lead', 'richid', 'Rich Schumacher', '*****@*****.**');
$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();
Exemple #8
0
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);
}
$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', '*****@*****.**');
$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');
Exemple #10
0
$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', '*****@*****.**');
$package->addMaintainer('lead', 'gauthierm', 'Mike Gauthier', '*****@*****.**');
$package->addMaintainer('lead', 'nick', 'Nick Burka', '*****@*****.**');
$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();
}
 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', '*****@*****.**', '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);
 }
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', '*****@*****.**');
$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();
}
Exemple #13
0
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();
}
Exemple #14
0
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', '*****@*****.**');
$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();
}
{
    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();
}
PEAR::setErrorHandling(PEAR_ERROR_DIE);
$packagexml = new PEAR_PackageFileManager2();
$packagexml->setOptions(array('baseinstalldir' => '/', 'packagedirectory' => dirname(__FILE__), 'filelistgenerator' => 'file', 'ignore' => array('TODO'), 'exceptions' => array('README' => 'doc', 'LICENSE' => 'doc')));
$packagexml->setPackage('sfFacebookConnectPlugin');
$packagexml->setSummary('Add easily Facebook connect to your symfony website and/or develop IFrame-FBML agnostic Facebook applications.');
$packagexml->setDescription('The sfFacebookConnectPlugin provides multiples functionalities geared both at making Facebook Connect integration in a symfony website easy and also help develop Facebook applications. This is achieved by smoothly connecting sfGuard (Doctrine AND Propel) with Facebook and helping developers program without worrying about whether the application is FBML or IFrame/Facebook Connect.');
$packagexml->setChannel('plugins.symfony-project.org');
$packagexml->addMaintainer('lead', 'fabriceb', 'Fabrice Bernhard', '*****@*****.**');
$packagexml->addMaintainer('developer', 'oncletom', 'Thomas Parisot', '*****@*****.**');
$packagexml->addMaintainer('developer', 'dalexandre', 'Damien Alexandre', '*****@*****.**');
$packagexml->addMaintainer('developer', 'benjaming', 'Benjamin Grandfond', '*****@*****.**');
$packagexml->setLicense('MIT License', 'http://www.symfony-project.org/license');
// This will ADD a changelog entry to an existing package.xml
$packagexml->setAPIVersion('1.1.1');
$packagexml->setReleaseVersion('1.1.1');
$packagexml->setNotes('Symfony 1.4 officialy compatible version');
$packagexml->setReleaseStability('stable');
$packagexml->setAPIStability('stable');
$packagexml->addRelease();
$packagexml->setPackageType('php');
$packagexml->setPhpDep('5.2.0');
$packagexml->setPearinstallerDep('1.4.1');
// Supported versions of Symfony
$packagexml->addPackageDepWithChannel('required', 'symfony', 'pear.symfony-project.com', '1.0.0', '1.5.0');
$packagexml->generateContents();
// Add the files
if (isset($_GET['make']) || isset($_SERVER['argv']) && @$_SERVER['argv'][1] == 'make') {
    $packagexml->writePackageFile();
} else {
    $packagexml->debugPackageFile();
}
$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_JSON');
$package->setPackageType('php');
$package->setSummary('A renderer to output view elements as JSON.');
$package->setDescription('A renderer to output view elements as JSON.');
$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('optional', 'HTML_AJAX', 'pear.php.net', '0.5.0');
$package->addPackageDepWithChannel('optional', 'PEAR', 'pear.php.net', '1.4.3');
$package->addExtensionDep('optional', 'json');
$package->addMaintainer('lead', 'iteman', 'KUBO Atsuhiro', '*****@*****.**');
$package->addMaintainer('developer', 'csakatoku', 'Chihiro Sakatoku', '*****@*****.**');
$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:
Exemple #18
0
    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', 'toolkit', 'pear.limb-project.com', '0.2.0');
$package->addPackageDepWithChannel('required', 'net', 'pear.limb-project.com', '0.1.3');
$package->addPackageDepWithChannel('required', 'fs', 'pear.limb-project.com', '0.1.0');
$package->addPackageDepWithChannel('required', 'config', 'pear.limb-project.com', '0.3.0');
$package->addPackageDepWithChannel('optional', 'filter_chain', 'pear.limb-project.com', '0.1.0');
$package->generateContents();
$result = $package->writePackageFile();
if (PEAR::isError($result)) {
    echo $result->getMessage();
    exit(1);
}
Exemple #19
0
$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', '*****@*****.**');
$package->addMaintainer('lead', 'nrf', 'Nathan Fredrickson', '*****@*****.**');
$package->addMaintainer('lead', 'alec', 'Aleksander Machniak', '*****@*****.**');
$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();
}
Exemple #20
0
$package->setPackage('Piece_Flow');
$package->setPackageType('php');
$package->setSummary('A web flow engine and continuation server');
$package->setDescription('Piece_Flow is a web flow engine and continuation server.

Piece_Flow provides a stateful programming model for developers, and high security for applications.');
$package->setChannel('pear.piece-framework.com');
$package->setLicense('New BSD License', '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', 'Stagehand_FSM', 'pear.piece-framework.com', '1.10.0');
$package->addPackageDepWithChannel('required', 'Cache_Lite', 'pear.php.net', '1.7.0');
$package->addPackageDepWithChannel('required', 'PEAR', 'pear.php.net', '1.4.3');
$package->addMaintainer('lead', 'iteman', 'KUBO Atsuhiro', '*****@*****.**');
$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
Exemple #21
0
$apiStability = $state;
$package = new PEAR_PackageFileManager2();
$result = $package->setOptions(array('license' => 'LGPL', 'filelistgenerator' => 'file', 'ignore' => array('package.php', 'package.xml', '*.tgz', 'var', 'setup.override.php', 'common.ini.override'), 'baseinstalldir' => 'limb/' . $name, 'packagedirectory' => './', 'packagefile' => 'package.xml', 'dir_roles' => array('docs' => 'doc', 'examples' => 'doc', 'tests' => 'test'), 'roles' => array('*' => 'php')));
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->generateContents();
$result = $package->writePackageFile();
if (PEAR::isError($result)) {
    echo $result->getMessage();
    exit(1);
}
Exemple #22
0
*/
require_once 'PEAR/PackageFileManager2.php';
//using this, we don't need to do any error handling ourselves
PEAR::setErrorHandling(PEAR_ERROR_DIE);
/* don't modify this */
// Directory where the package files are located.
$packagedir = dirname(__FILE__);
$glDir = realpath(dirname(__FILE__) . '/../../');
/**
 * Static page configuration file
 */
require $packagedir . '/config.php';
$channel = 'pear.geeklog.net';
$category = 'Geeklog Plugins';
$package = 'Geeklog_Plugin_Staticpages';
// Should be actual FCKeditor version number to avoid any confusion
$version = $_SP_CONF['version'];
$summary = <<<EOT
Staticpages Plugin for Geeklog 1.x
EOT;
$description = <<<EOT
Staticpages Plugin for Geeklog 1.x
EOT;
$license = 'GPL';
$notes = 'Initial Release';
// Instanciate package file manager
$pkg = new PEAR_PackageFileManager2();
// Setting options
$e = $pkg->setOptions(array('packagefile' => 'package-staticpages.xml', 'packagedirectory' => $glDir . DIRECTORY_SEPARATOR, 'baseinstalldir' => 'Geeklog', 'outputdirectory' => $glDir . DIRECTORY_SEPARATOR, 'pathtopackagefile' => dirname(__FILE__), 'filelistgenerator' => 'CVS', 'ignore' => array('buildpackage*.php', 'package.xml', '*.tgz'), 'include' => array($packagedir . '/', $glDir . '/public_html/staticpages/', $glDir . '/public_html/admin/plugins/staticpages/', $glDir . '/public_html/javascript/staticpages_fckeditor.js'), 'simpleoutput' => true, 'dir_roles' => array('*' => 'web'), 'roles' => array('*' => 'web')));
$pkg->addPackageDepWithChannel('required', 'Geeklog_FCKeditor', 'pear.geeklog.net', '2.3.1');
include $glDir . '/system/build/buildpackage-end.php';
Exemple #23
0
$release_version = '3.12.8';
$release_state = 'stable';
$release_notes = 'Add Addresses support';
$description = <<<DESC
A SDK (or helper library, as we're calling them) for PHP developers to write
applications against Twilio's REST API and generate TwiML responses.
DESC;
$package = new PEAR_PackageFileManager2();
$package->setOptions(array('filelistgenerator' => 'file', 'simpleoutput' => true, 'baseinstalldir' => '/', 'packagedirectory' => './', 'dir_roles' => array('Services' => 'php', 'Services/Twilio' => 'php', 'tests' => 'test'), 'ignore' => array('package.php', '*.tgz', 'scratch/*', 'vendor/*', 'composer.*', 'coverage/*', '.travis.yml', 'venv/*')));
$package->setPackage('Services_Twilio');
$package->setSummary('PHP helper library for Twilio');
$package->setDescription($description);
$package->setChannel('twilio-pear.herokuapp.com/pear');
$package->setPackageType('php');
$package->setLicense('MIT License', 'http://creativecommons.org/licenses/MIT/');
$package->setNotes($release_notes);
$package->setReleaseVersion($release_version);
$package->setReleaseStability($release_state);
$package->setAPIVersion($api_version);
$package->setAPIStability($api_state);
$package->addMaintainer('lead', 'ihumanable', 'Matt Nowack', '*****@*****.**');
$package->setPhpDep('5.2.1');
$package->addPackageDepWithChannel('optional', 'Mockery', 'pear.survivethedeepend.com');
$package->setPearInstallerDep('1.9.3');
$package->generateContents();
$package->addRelease();
if (isset($_GET['make']) || isset($_SERVER['argv']) && @$_SERVER['argv'][1] == 'make') {
    $package->writePackageFile();
} else {
    $package->debugPackageFile();
}
$package = new PEAR_PackageFileManager2();
$package->setOptions(array('filelistgenerator' => 'file', 'changelogoldtonew' => false, 'simpleoutput' => true, 'baseinstalldir' => '/', 'packagefile' => 'package.xml', 'packagedirectory' => '.', 'dir_roles' => array('bin' => 'script', 'data' => 'php', 'doc' => 'doc', 'examples' => 'doc', 'src' => 'php', 'tests' => 'test'), 'ignore' => array('package.php')));
$package->setPackage($packageName);
$package->setPackageType('php');
$package->setSummary('A test runner for Test Driven Development');
$package->setDescription('Stagehand_TestRunner provides a test runner to run unit tests. Stagehand_TestRunner strongly supports Test Driven Development by various features.');
$package->setChannel('pear.piece-framework.com');
$package->setLicense('New BSD License', '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('5.2.0');
$package->setPearinstallerDep('1.4.3');
$package->addPackageDepWithChannel('required', 'Stagehand_AccessControl', 'pear.piece-framework.com', '0.1.0');
$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', '*****@*****.**');
$package->addMaintainer('developer', 'kumatch', 'KUMAKURA Yousuke', '*****@*****.**');
$package->addGlobalReplacement('package-info', '@package_version@', 'version');
$pfm->setPackage('VIH_Elevforeningen');
$pfm->setSummary('VIH');
$pfm->setDescription('VIH');
$pfm->setUri('http://localhost/');
$pfm->setLicense('LGPL License', 'http://www.gnu.org/licenses/lgpl.html');
$pfm->addMaintainer('lead', 'lsolesen', 'Lars Olesen', '*****@*****.**');
$pfm->setPackageType('php');
$pfm->setAPIVersion($version);
$pfm->setReleaseVersion($version);
$pfm->setAPIStability('beta');
$pfm->setReleaseStability('stable');
$pfm->setNotes($notes);
$pfm->addRelease();
$pfm->resetUsesRole();
$pfm->addUsesRole('web', 'Role_Web', 'pearified.com');
$pfm->addPackageDepWithChannel('required', 'Role_Web', 'pearified.com', '1.1.1');
// $pfm->addGlobalReplacement('package-info', '@package-version@', 'version');
$pfm->addReplacement($postinstall_file, 'pear-config', '@php-dir@', 'php_dir');
$pfm->addReplacement($postinstall_file, 'pear-config', '@web-dir@', 'web_dir');
$pfm->addReplacement($postinstall_file, 'pear-config', '@data-dir@', 'data_dir');
$pfm->clearDeps();
$pfm->setPhpDep('5.2.0');
$pfm->setPearinstallerDep('1.5.4');
$pfm->addPackageDepWithChannel('required', 'MDB2', 'pear.php.net', '2.4.0');
$pfm->addPackageDepWithChannel('required', 'MDB2_Driver_mysql', 'pear.php.net', '1.4.0');
$pfm->addPackageDepWithChannel('required', 'Validate', 'pear.php.net', '0.7.0');
$pfm->addPackageDepWithChannel('required', 'Validate_DK', 'pear.php.net', '0.1.1');
$pfm->addPackageDepWithChannel('required', 'Image_Transform', 'pear.php.net', '0.9.0');
$pfm->addPackageDepWithChannel('required', 'HTTP_Upload', 'pear.php.net', '0.9.1');
$pfm->addPackageDepWithChannel('required', 'HTML_QuickForm', 'pear.php.net', '2.0.0');
$pfm->addPackageDepWithChannel('required', 'antispambot', 'public.intraface.dk', '0.1.0');
    echo $result->getMessage();
    die(__LINE__ . "\n");
}
$package->setPackage($name);
$package->setSummary($summary);
$package->setDescription($description);
$package->setChannel($channel);
$package->setAPIVersion($version);
$package->setReleaseVersion($version);
$package->setReleaseStability($stability);
$package->setAPIStability($stability);
$package->setNotes($notes);
$package->setPackageType('php');
// this is a PEAR-style php script package
$package->setLicense($license['name'], $license['url']);
foreach ($maintainer as $m) {
    $package->addMaintainer($m['role'], $m['handle'], $m['name'], $m['email'], $m['active']);
}
foreach ($dependency as $d) {
    $package->addPackageDepWithChannel($d['type'], $d['package'], $d['channel'], $d['version']);
}
$package->setPhpDep($require['php']);
$package->setPearinstallerDep($require['pear_installer']);
$package->generateContents();
// $package->debugPackageFile();
$result = $package->writePackageFile();
if (PEAR::isError($result)) {
    echo $result->getMessage();
    die;
}
exit(0);
Exemple #27
0
}
$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.1.3');
$package->addPackageDepWithChannel('required', 'config', 'pear.limb-project.com', '0.2.0');
$package->addPackageDepWithChannel('required', 'datetime', 'pear.limb-project.com', '0.1.0');
$package->addPackageDepWithChannel('required', 'toolkit', 'pear.limb-project.com', '0.2.0');
$package->addPackageDepWithChannel('required', 'fs', 'pear.limb-project.com', '0.1.0');
$package->addPackageDepWithChannel('optional', 'cli', 'pear.limb-project.com', '0.2.0');
$package->addPackageDepWithChannel('optional', 'view', 'pear.limb-project.com', '0.1.0');
$package->generateContents();
$result = $package->writePackageFile();
if (PEAR::isError($result)) {
    echo $result->getMessage();
    exit(1);
}
Exemple #28
0
This class provides an object oriented interface for
asynchronous server side PHP calls from client side
javascript without the need for a full page request.
EOT;
$package = new PEAR_PackageFileManager2();
PEAR::setErrorHandling(PEAR_ERROR_DIE);
$result = $package->setOptions(array('filelistgenerator' => 'file', 'simpleoutput' => true, 'baseinstalldir' => '/', 'packagedirectory' => './', 'dir_roles' => array('www' => 'data', 'dependencies' => 'data', 'tests' => 'test'), 'exceptions' => array('README.md' => 'doc')));
$package->setPackage('XML_RPCAjax');
$package->setSummary('XML-RPC client implementation using AJAX');
$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('stable');
$package->setAPIVersion('0.0.1');
$package->setAPIStability('stable');
$package->setNotes($notes);
$package->addIgnore('package.php');
$package->addIgnore('deprecated');
$package->addMaintainer('lead', 'nrf', 'Nathan Fredrickson', '*****@*****.**');
$package->addMaintainer('lead', 'gauthierm', 'Mike Gauthier', '*****@*****.**');
$package->setPhpDep('5.1.5');
$package->setPearinstallerDep('1.4.0');
$package->addPackageDepWithChannel('required', 'Swat', 'pear.silverorange.com', '0.9.4');
$package->generateContents();
if (isset($_GET['make']) || isset($_SERVER['argv']) && @$_SERVER['argv'][1] == 'make') {
    $package->writePackageFile();
} else {
    $package->debugPackageFile();
}
Exemple #29
0
$pack->setAPIVersion($config['phrozn']['version']);
$pack->setReleaseStability($config['phrozn']['stability']);
$pack->setAPIStability($config['phrozn']['stability']);
$pack->setNotes('
    * The first public release of Phrozn
');
$pack->setLicense('Apache License, Version 2.0', 'http://www.apache.org/licenses/LICENSE-2.0');
$pack->addMaintainer('lead', 'victor', 'Victor Farazdagi', '*****@*****.**');
$pack->addRelease();
$pack->addInstallAs('bin/phr.php', 'phr');
$pack->addInstallAs('bin/phrozn.php', 'phrozn');
// core dependencies
$pack->setPhpDep('5.3.0');
$pack->setPearinstallerDep('1.4.6');
// package dependencies
$pack->addPackageDepWithChannel('required', 'Console_CommandLine', 'pear.php.net', '1.1.3');
$pack->addPackageDepWithChannel('required', 'Console_Color', 'pear.php.net', '1.0.3');
$pack->addPackageDepWithChannel('required', 'Console_Table', 'pear.php.net', '1.1.4');
$pack->addPackageDepWithChannel('required', 'Archive_Tar', 'pear.php.net', '1.3.7');
$pack->addReplacement('bin/phrozn.php', 'pear-config', '/usr/bin/env php', 'php_bin');
$pack->addReplacement('bin/phrozn.php', 'pear-config', '@PHP-BIN@', 'php_bin');
$pack->addReplacement('bin/phrozn.php', 'pear-config', '@DATA-DIR@', 'data_dir');
$pack->addReplacement('bin/phrozn.php', 'pear-config', '@PEAR-DIR@', 'php_dir');
$pack->addReplacement('bin/phr.php', 'pear-config', '/usr/bin/env php', 'php_bin');
$pack->addReplacement('bin/phr.php', 'pear-config', '@PHP-BIN@', 'php_bin');
$pack->addReplacement('bin/phr.php', 'pear-config', '@DATA-DIR@', 'data_dir');
$pack->addReplacement('bin/phr.php', 'pear-config', '@PEAR-DIR@', 'php_dir');
$pack->addReplacement('Phrozn/Autoloader.php', 'pear-config', '@PHP-BIN@', 'php_bin');
$pack->addReplacement('Phrozn/Autoloader.php', 'pear-config', '@DATA-DIR@', 'data_dir');
$pack->addReplacement('Phrozn/Autoloader.php', 'pear-config', '@PEAR-DIR@', 'php_dir');
$pack->generateContents();
Exemple #30
0
 /**
  * Main entry point for d51pearpkg2 task
  */
 public function main()
 {
     $package = new PEAR_PackageFileManager2();
     $this->_initOptions();
     $package->setOptions($this->_options);
     $package->setPackage($this->_name->__toString());
     $package->setSummary($this->_summary->__toString());
     $desc = preg_replace("/^({$this->_description->indention_type}{{$this->_description->indentions_to_remove}}|\t)+/m", '', $this->_description->__toString());
     $package->setDescription($desc);
     $package->setChannel($this->_channel->__toString());
     $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('php');
     $package->addRelease();
     if ($this->_dependencies->php !== false) {
         $package->setPhpDep($this->_dependencies->php->minimum_version);
     } else {
         $package->setPhpDep(phpversion());
     }
     if ($this->_dependencies->pear !== false) {
         $package->setPearinstallerDep($this->_dependencies->pear->minimum_version, $this->_dependencies->pear->maximum_version, $this->_dependencies->pear->recommended_version, $this->_dependencies->pear->exclude_version);
     } else {
         $package->setPearinstallerDep(PEAR_Config::singleton()->getRegistry()->packageInfo('PEAR', 'version'));
     }
     foreach ($this->_maintainers as $maintainer) {
         $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();
         $package->addReplacement($replacement->path, $replacement->type, $replacement->from, $replacement->to);
     }
     foreach ($this->_globalreplacements as $replacement) {
         $replacement->isValid();
         $this->log("adding global repalcement: {$replacement->from}");
         $package->addGlobalReplacement($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", '', $this->_notes->__toString());
     $package->setNotes($notes);
     $package->setLicense($this->_license->license, $this->_license->uri);
     // handle PostInstallation
     if (!empty($this->_postinstalls)) {
         foreach ($this->_postinstalls as $postInstall) {
             $postInstallScript = $package->initPostinstallScript($postInstall->script);
             $this->log('adding post installation for script : ' . $postInstall->script);
             foreach ($postInstall->paramgroups as $paramGroup) {
                 $this->log('adding parameter group' . $paramGroup->name);
                 $instructions = $paramGroup->instructions;
                 if (empty($instructions)) {
                     $instructions = false;
                 }
                 $params = array();
                 foreach ($paramGroup->params as $param) {
                     $this->log('adding parameter ' . $param->name);
                     $params[] = $postInstallScript->getParam($param->name, $param->prompt, $param->type, $param->default);
                 }
                 if (empty($params)) {
                     $params = false;
                 }
                 $postInstallScript->addParamGroup($paramGroup->name, $params, $instructions);
             }
             $e = $package->addPostInstallTask($postInstallScript, $postInstall->script);
             if (PEAR::isError($e)) {
                 throw new d51PearPkg2Task_Exception('unable to add post install task: ' . $e->getMessage());
             }
             $this->log('Added POSTINSTALL for ' . $postInstall->script);
         }
     }
     $package->generateContents();
     $e = $package->writePackageFile();
     if (PEAR::isError($e)) {
         throw new d51PearPkg2Task_Exception('unable to write package.xml file: ' . $e->getMessage());
     }
 }