<?php

error_reporting(E_ALL & ~E_DEPRECATED);
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('generatePackage.php'), 'dir_roles' => array('tests' => 'test', 'examples' => 'doc')));
$packagexml->setPackage('Services_ShortURL');
$packagexml->setSummary('Abstract PHP5 interface for shortening and expanding short URLs');
$packagexml->setDescription('Short URL services have become enormously popular on the internet. There are, literally, dozens (hundreds?) of these services. Services_ShortURL offers an abstract way of shortening and expanding URLs.');
$packagexml->setChannel('pear.php.net');
$packagexml->setAPIVersion('0.3.1');
$packagexml->setReleaseVersion('0.3.1');
$packagexml->setReleaseStability('alpha');
$packagexml->setAPIStability('alpha');
$packagexml->setNotes('* Added missing map for Googl driver');
$packagexml->setPackageType('php');
$packagexml->addRelease();
$packagexml->detectDependencies();
$packagexml->addMaintainer('lead', 'shupp', 'Bill Shupp', '*****@*****.**');
$packagexml->setLicense('New BSD License', 'http://www.opensource.org/licenses/bsd-license.php');
$packagexml->setPhpDep('5.0.0');
$packagexml->setPearinstallerDep('1.4.0b1');
$packagexml->addPackageDepWithChannel('required', 'PEAR', 'pear.php.net', '1.4.0');
$packagexml->addPackageDepWithChannel('required', 'HTTP_Request2', 'pear.php.net');
$packagexml->addPackageDepWithChannel('required', 'Net_URL2', 'pear.php.net', '0.2.0');
$packagexml->addExtensionDep('required', 'SimpleXML');
$packagexml->addExtensionDep('required', 'pcre');
$packagexml->addExtensionDep('required', 'SPL');
$packagexml->generateContents();
$packagexml->writePackageFile();
{
    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();
}
Exemple #3
0
$release_version = '0.0.0';
$release_state = 'alpha';
$release_notes = "No release notes.";
$description = <<<DESC
A JWT encoder/decoder.
DESC;
$package = new PEAR_PackageFileManager2();
$package->setOptions(array('filelistgenerator' => 'file', 'simpleoutput' => true, 'baseinstalldir' => '/', 'packagedirectory' => './', 'dir_roles' => array('tests' => 'test'), 'ignore' => array('package.php', '*.tgz')));
$package->setPackage('JWT');
$package->setSummary('A JWT encoder/decoder.');
$package->setDescription($description);
$package->setChannel('pear.php.net');
$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', 'lcfrs', 'Neuman Vong', '*****@*****.**');
$package->addExtensionDep('required', 'json');
$package->addExtensionDep('required', 'hash');
$package->setPhpDep('5.1');
$package->setPearInstallerDep('1.7.0');
$package->generateContents();
$package->addRelease();
if (isset($_GET['make']) || isset($_SERVER['argv']) && @$_SERVER['argv'][1] == 'make') {
    $package->writePackageFile();
} else {
    $package->debugPackageFile();
}
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
 /**
  * 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());
     }
 }
Exemple #6
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 #7
0
$package = new PEAR_PackageFileManager2();
PEAR::setErrorHandling(PEAR_ERROR_DIE);
$result = $package->setOptions(array('filelistgenerator' => 'svn', 'simpleoutput' => true, 'baseinstalldir' => '/', 'packagedirectory' => './', 'dir_roles' => array('Turing' => 'php')));
$package->setPackage('Turing');
$package->setSummary('Turing is a test framework');
$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.1.0');
$package->setAPIStability('stable');
$package->setNotes($notes);
$package->addIgnore('package.php');
$package->addMaintainer('lead', 'gauthierm', 'Mike Gauthier', '*****@*****.**');
$package->addReplacement('Turing/Turing.php', 'pear-config', '@DATA-DIR@', 'data_dir');
$package->setPhpDep('5.1.5');
$package->setPearinstallerDep('1.4.0');
$package->addExtensionDep('required', 'mbstring');
$package->addPackageDepWithChannel('required', 'HotDate', 'pear.silverorange.com', '0.1.3');
$package->addPackageDepWithChannel('required', 'Swat', 'pear.silverorange.com', '1.4.0');
$package->addPackageDepWithChannel('required', 'Site', 'pear.silverorange.com', '1.5.0');
$package->addPackageDepWithChannel('required', 'PHPUnit', 'pear.phpunit.de', '3.5.0');
$package->addPackageDepWithChannel('required', 'PHPUnit_Selenium', 'pear.phpunit.de', '1.0.3');
$package->generateContents();
if (isset($_GET['make']) || isset($_SERVER['argv']) && @$_SERVER['argv'][1] == 'make') {
    $package->writePackageFile();
} else {
    $package->debugPackageFile();
}
Exemple #8
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();
}
$packagexml->setSummary('A package for consuming oEmbed');
$packagexml->setDescription('oEmbed (http://www.oembed.com) is an open specification for discovering ' . 'more information about URI\'s. oEmbed services return structure meta-data ' . 'about a URI (e.g. type of object, title, author information, thumbnail details, etc.).');
$packagexml->setChannel('pear.php.net');
$packagexml->setAPIVersion('0.2.0');
$packagexml->setReleaseVersion('0.2.0');
$packagexml->setReleaseStability('alpha');
$packagexml->setAPIStability('alpha');
$packagexml->setNotes('
* Fixes E_STRICT warnings, per #18042
* Removed dependency on PEAR_Exception
* Removed dependency on HTTP_Request (lingering require_once)
* Added support for phpunit 3.5
* Added generatePackage.php for easy package maintenance
');
$packagexml->setPackageType('php');
$packagexml->addRelease();
$packagexml->detectDependencies();
$packagexml->addMaintainer('lead', 'shupp', 'Bill Shupp', '*****@*****.**');
$packagexml->addMaintainer('lead', 'jstump', 'Joe Stump', '*****@*****.**');
$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', 'Validate', 'pear.php.net', '0.8.4');
$packagexml->addPackageDepWithChannel('required', 'Net_URL2', 'pear.php.net', '0.2.0');
$packagexml->addExtensionDep('required', 'json');
$packagexml->addExtensionDep('required', 'pcre');
$packagexml->addExtensionDep('required', 'libxml');
$packagexml->addExtensionDep('required', 'SimpleXML');
$packagexml->addExtensionDep('required', 'curl');
$packagexml->generateContents();
$packagexml->writePackageFile();
$packagexml = new PEAR_PackageFileManager2();
$packagexml->setOptions(array('baseinstalldir' => '/', 'packagedirectory' => dirname(__FILE__), 'filelistgenerator' => 'file', 'ignore' => array('.DS_Store', '.svn', 'package.php', 'package.xml*', 'test.sh'), 'dir_roles' => array('examples' => 'doc', 'tests' => 'test'), 'exceptions' => array('COPYING' => 'doc', 'ChangeLog' => 'doc', 'README' => 'doc', 'RELEASE_NOTES' => 'doc', 'TODO' => 'doc')));
$packagexml->setPackage($packagename);
$packagexml->setSummary($summary);
$packagexml->setNotes($notes);
$packagexml->setDescription($description);
$packagexml->setLicense('MIT License', 'http://www.opensource.org/licenses/mit-license.php');
$packagexml->setReleaseVersion($version);
$packagexml->setAPIVersion($apiversion);
$packagexml->setReleaseStability($stability);
$packagexml->setAPIStability($apistability);
$packagexml->addMaintainer('lead', 'rsk', 'Ryusuke SEKIYAMA', '*****@*****.**');
$packagexml->setPackageType('php');
$packagexml->setPhpDep('5.1.0');
$packagexml->setPearinstallerDep('1.4.0');
$packagexml->addExtensionDep('required', 'pcre');
$packagexml->addExtensionDep('required', 'sockets');
$packagexml->addExtensionDep('required', 'SPL');
$packagexml->addExtensionDep('optional', 'http');
$packagexml->addPackageDepWithChannel('required', 'PEAR', 'pear.php.net');
//$packagexml->addPackageDepWithChannel('optional', 'HTTP_Request', 'pear.php.net');
//$packagexml->addPackageDepWithChannel('optional', 'pecl_http', 'pecl.php.net');
//$packagexml->addConflictingPackageDepWithChannel($packagename, 'pear.php.net');
$packagexml->addGlobalReplacement('package-info', '@package_version@', 'version');
$packagexml->setChannel('__uri');
$packagexml->generateContents();
// get a PEAR_PackageFile object
//$packagexml1 = &$packagexml->exportCompatiblePackageFile1();
// generate package.xml
if (php_sapi_name() == 'cli' && $argc > 1 && $argv[1] == 'make') {
    $make = true;
Exemple #11
0
$package->setOptions(array('filelistgenerator' => 'file', 'simpleoutput' => true, 'baseinstalldir' => '/', 'packagedirectory' => './', 'dir_roles' => array('Concentrate' => 'php', 'tests' => 'test', 'data' => 'data'), 'exceptions' => array('scripts/concentrate' => 'script'), 'ignore' => array('package.php', '*.tgz'), 'installexceptions' => array('scripts/concentrate' => '/')));
$package->setPackage('Concentrate');
$package->setSummary('Tool to glob and minify static resources for websites using ' . 'silverorange\'s Site framework.');
$package->setDescription($description);
$package->setChannel('pear.silverorange.com');
$package->setPackageType('php');
$package->setLicense('LGPL License 2.1', 'http://www.gnu.org/copyleft/lesser.html');
$package->setNotes($release_notes);
$package->setReleaseVersion($release_version);
$package->setReleaseStability($release_state);
$package->setAPIVersion($api_version);
$package->setAPIStability($api_state);
$package->addMaintainer('lead', 'gauthierm', 'Mike Gauthier', '*****@*****.**');
$package->addReplacement('data/cli.xml', 'package-info', '@package-version@', 'version');
$package->addReplacement('Concentrate/CLI.php', 'package-info', '@package-name@', 'name');
$package->addReplacement('Concentrate/CLI.php', 'pear-config', '@data-dir@', 'data_dir');
$package->setPhpDep('5.2.1');
$package->addExtensionDep('optional', 'memcached');
$package->addPackageDepWithChannel('required', 'YAML', 'pear.symfony-project.com', '1.0.2');
$package->addPackageDepWithChannel('required', 'PEAR', 'pear.php.net', '1.4.0');
$package->addPackageDepWithChannel('required', 'Console_CommandLine', 'pear.php.net', '1.1.0');
$package->setPearInstallerDep('1.4.0');
$package->generateContents();
// *nix release
$package->addRelease();
$package->addInstallAs('scripts/concentrate', 'concentrate');
if (isset($_GET['make']) || isset($_SERVER['argv']) && @$_SERVER['argv'][1] == 'make') {
    $package->writePackageFile();
} else {
    $package->debugPackageFile();
}
$packagexml->setDescription('An interface for communicating with Twitter\'s public API. Send status updates, fetch information, add friends, etc.');
$packagexml->setChannel('pear.php.net');
$packagexml->setAPIVersion('0.6.0');
$packagexml->setReleaseVersion('0.6.3');
$packagexml->setReleaseStability('beta');
$packagexml->setAPIStability('beta');
$packagexml->setNotes('
* Applied patch from steve_twitpic: support for users/lookup, geo/search, and geo/id (fixes #17694)
* Updated the search endpoint
');
$packagexml->setPackageType('php');
$packagexml->addRelease();
$packagexml->detectDependencies();
$packagexml->addMaintainer('lead', 'shupp', 'Bill Shupp', '*****@*****.**');
$packagexml->addMaintainer('lead', 'izi', 'David Jean Louis', '*****@*****.**');
$packagexml->addMaintainer('lead', 'jstump', 'Joe Stump', '*****@*****.**');
$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->addPackageDepWithChannel('required', 'HTTP_Request2', 'pear.php.net');
$packagexml->addPackageDepWithChannel('optional', 'HTTP_OAuth', 'pear.php.net', '0.1.7');
$packagexml->addExtensionDep('required', 'json');
$packagexml->addExtensionDep('required', 'mbstring');
$packagexml->addExtensionDep('required', 'simplexml');
$packagexml->addReplacement('Services/Twitter.php', 'pear-config', '@data_dir@', 'data_dir');
$packagexml->addReplacement('Services/Twitter.php', 'package-info', '@package_version@', 'version');
$packagexml->addReplacement('Services/Twitter/Exception.php', 'package-info', '@package_version@', 'version');
$packagexml->addReplacement('tests/AllTests.php', 'package-info', '@package_version@', 'version');
$packagexml->generateContents();
$packagexml->writePackageFile();
Exemple #13
0
$notes = <<<EOT
Bits on the Run API version 1.4.
EOT;
$description = <<<EOT
Packages the Bits on the Run API PHP SDK.
EOT;
$package = new PEAR_PackageFileManager2();
PEAR::setErrorHandling(PEAR_ERROR_DIE);
$package->setOptions(array('filelistgenerator' => 'file', 'simpleoutput' => true, 'baseinstalldir' => '/', 'packagedirectory' => './', 'exceptions' => array('examples.php' => 'doc')));
$package->setPackage('BotrAPI');
$package->setSummary('Bits on the Run API SDK');
$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('1.4.0');
$package->setAPIStability('stable');
$package->setNotes($notes);
$package->addIgnore('package.php');
$package->addMaintainer('lead', 'gauthierm', 'Mike Gauthier', '*****@*****.**');
$package->setPhpDep('5.1.5');
$package->setPearinstallerDep('1.4.0');
$package->addExtensionDep('optional', 'curl');
$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);
 }
Exemple #15
0
$packagexml->setOptions(array("outputdirectory" => ".", "filelistgenerator" => "file", "packagefile" => "package_pman.xml", "packagedirectory" => "output/", "baseinstalldir" => "php.net/", "simpleoutput" => true, "roles" => array("sh" => "script"), "dir_roles" => array("man3" => "doc"), "ignore" => array("index.sqlite", "man3/DomDocument.xinclude.3.gz")));
$packagexml->setPackage("pman");
$packagexml->setSummary("PHP Unix manual pages");
$packagexml->setDescription("Unix manual pages of the PHP documentations from php.net.");
$packagexml->setChannel("doc.php.net");
$packagexml->setAPIVersion("1.0.0");
$packagexml->setReleaseVersion(date("Y.m.d"));
$packagexml->setReleaseStability("stable");
$packagexml->setAPIStability("stable");
$packagexml->setLicense("Creative Commons Attribution 3.0", "http://creativecommons.org/licenses/by/3.0/");
$packagexml->setNotes("New release \\o/");
$packagexml->setPackageType("php");
$packagexml->addRelease();
$packagexml->setPhpDep("5.0.0");
$packagexml->setPearinstallerDep("1.9.0");
$packagexml->addExtensionDep("required", "zlib");
$packagexml->addMaintainer("lead", "phpdoc", "The PHP Documentation team", "*****@*****.**");
rename("output/php-functions", "output/man3");
copy(__DIR__ . "/pman.sh", "output/pman.sh");
$packagexml->addReplacement("pman.sh", "pear-config", "@doc_dir@", "doc_dir");
$packagexml->addInstallAs("pman.sh", "pman");
$packagexml->generateContents();
$packagexml->writePackageFile();
rename("output/pman.sh", "pman.sh");
rename("output/man3", "man3");
$contents = file_get_contents("package_pman.xml");
$contents = str_replace('baseinstalldir="php.net/" name="pman.sh"', 'baseinstalldir="" name="pman.sh"', $contents);
file_put_contents("package_pman.xml", $contents);
system("pear package package_pman.xml");
rename("man3", "output/php-functions");
unlink("pman.sh");
Exemple #16
0
/**
 * @var PEAR_PackageFileManager
 */
PEAR::setErrorHandling(PEAR_ERROR_DIE);
chdir(dirname(__FILE__));
$pfm = new PEAR_PackageFileManager2();
$pfm->setOptions(array('packagedirectory' => '${basedir}/tmp/CAS-${phpcas.version}', 'outputdirectory' => '${basedir}/tmp', 'baseinstalldir' => '/', 'filelistgenerator' => 'file', 'simpleoutput' => true, 'roles' => array('php' => 'php'), 'exceptions' => array('README.md' => 'doc', 'LICENSE' => 'doc', 'NOTICE' => 'doc')));
$pfm->setPackage('CAS');
$pfm->setPackageType('php');
// this is a PEAR-style php script package
$pfm->setSummary('Central Authentication Service client library in php');
$pfm->setDescription('This package is a PEAR installable library for using a Central Authentication Service.');
$pfm->setChannel('__uri');
$pfm->setAPIStability('${phpcas.apiStability}');
$pfm->setReleaseStability('${phpcas.releaseStability}');
$pfm->setAPIVersion('${phpcas.version}');
$pfm->setReleaseVersion('${phpcas.version}');
$pfm->setNotes('see https://github.com/Jasig/phpCAS/blob/master/docs/ChangeLog');
$pfm->addMaintainer('lead', 'jfritschi', 'Joachim Fritschi', '*****@*****.**');
$pfm->addMaintainer('contributor', 'adamfranco', 'Adam Franco', '*****@*****.**');
$pfm->setLicense('Apache 2.0 License', 'https://github.com/Jasig/phpCAS/blob/master/LICENSE');
$pfm->clearDeps();
$pfm->setPhpDep('5.0.0');
$pfm->setPearinstallerDep('1.4.3');
$pfm->addExtensionDep('required', 'curl');
$pfm->addExtensionDep('required', 'openssl');
$pfm->addExtensionDep('required', 'dom');
$pfm->addExtensionDep('required', 'zlib');
$pfm->addExtensionDep('required', 'pdo');
$pfm->generateContents();
$pfm->writePackageFile();
Exemple #17
0
$package->setPackage('NewsFlash');
$package->setSummary('News aggregator');
$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('NewsFlash/NewsFlash.php', 'pear-config', '@DATA-DIR@', 'data_dir');
$package->setPhpDep('5.1.5');
$package->setPearinstallerDep('1.4.0');
$package->addPackageDepWithChannel('required', 'Swat', 'pear.silverorange.com', '0.9.2');
$package->addPackageDepWithChannel('required', 'Site', 'pear.silverorange.com', '1.5.25');
$package->addPackageDepWithChannel('required', 'HTTP_Request2', 'pear.php.net', '0.5.2');
$package->addPackageDepWithChannel('optional', 'Services_Twitter', 'pear.php.net', '0.5.1');
$package->addPackageDepWithChannel('optional', 'HTTP_OAuth', 'pear.php.net', '0.2.3');
$package->addPackageDepWithChannel('optional', 'Sniftr', 'pear.silverorange.com', '0.1.6');
$package->addPackageDepWithChannel('optional', 'Deliverance', 'pear.silverorange.com', '0.2.33');
$package->addExtensionDep('optional', 'json');
$package->addExtensionDep('required', 'dom');
$package->generateContents();
if (isset($_GET['make']) || isset($_SERVER['argv']) && @$_SERVER['argv'][1] == 'make') {
    $package->writePackageFile();
} else {
    $package->debugPackageFile();
}
$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');
$package->addInstallAs('bin/phpspecrunner', 'phpspecrunner');
$package->addInstallAs('bin/phpspecrunner.bat', 'phpspecrunner.bat');
$package->addInstallAs('bin/phptrunner', 'phptrunner');
$package->addInstallAs('bin/phptrunner.bat', 'phptrunner.bat');
$package->addInstallAs('bin/phpunitrunner', 'phpunitrunner');
$package->addInstallAs('bin/phpunitrunner.bat', 'phpunitrunner.bat');
$package->addInstallAs('bin/simpletestrunner', 'simpletestrunner');
$package->addInstallAs('bin/simpletestrunner.bat', 'simpletestrunner.bat');
$package->generateContents();
 /**
  * Main entry point for d51pearpkg2 task
  */
 public function main()
 {
     PEAR_Frontend::setFrontendObject(new d51PearPkg2Task_Frontend($this));
     $package = new PEAR_PackageFileManager2();
     $this->_initOptions();
     $a = $package->setOptions($this->_options);
     if (PEAR::isError($a)) {
         $this->log($a->getMessage(), Project::MSG_ERR);
         exit(-1);
     }
     $package->setPackage((string) $this->_name);
     $package->setSummary((string) $this->_summary);
     $desc = preg_replace("/^({$this->_description->indention_type}{{$this->_description->indentions_to_remove}}|\t)+/m", '', (string) $this->_description);
     $package->setDescription($desc);
     $package->setChannel((string) $this->_channel);
     $package->setAPIVersion($this->_version->api);
     $package->setReleaseVersion($this->_version->release);
     $package->setAPIStability($this->_stability->api);
     $package->setReleaseStability($this->_stability->release);
     // TODO: allow different types
     $package->setPackageType($this->_type);
     $package->addRelease();
     if (!is_null($this->_dependencies->php)) {
         $this->log('Using explicit PHP minimum version: ' . $this->_dependencies->php->minimum_version);
         $package->setPhpDep($this->_dependencies->php->minimum_version);
     } else {
         $this->log('Using current PHP version as minimum: ' . phpversion());
         $package->setPhpDep(phpversion());
     }
     if (!is_null($this->_dependencies->pear)) {
         $this->log('setting minimum PEAR version: ' . $this->_dependencies->pear->minimum_version);
         $package->setPearinstallerDep($this->_dependencies->pear->minimum_version, $this->_dependencies->pear->maximum_version, $this->_dependencies->pear->recommended_version, $this->_dependencies->pear->exclude_version);
     } else {
         $this->log('setting minimum PEAR version to currently installed version');
         $pear_version = PEAR_Config::singleton()->getRegistry()->packageInfo('PEAR', 'version');
         $this->log('minimum PEAR version: ' . $pear_version);
         $package->setPearinstallerDep(PEAR_Config::singleton()->getRegistry()->packageInfo('PEAR', 'version'));
     }
     foreach ($this->_maintainers as $maintainer) {
         $this->log("adding maintainer [{$maintainer->user}/{$maintainer->name}] with role [{$maintainer->role}]");
         $package->addMaintainer($maintainer->role, $maintainer->user, $maintainer->name, $maintainer->email, $maintainer->active);
     }
     // handle dependencies
     if (!empty($this->_dependencies)) {
         $this->log('adding dependencies');
         if (count($this->_dependencies->groups) > 0) {
             $this->log('found dependency groups');
             foreach ($this->_dependencies->groups as $group) {
                 $this->log("adding [{$group->name}] :: [{$group->hint}]");
                 $package->addDependencyGroup($group->name, $group->hint);
                 foreach ($group->packages as $sub_package) {
                     $package->addGroupPackageDepWithChannel('subpackage', $group->name, $sub_package->name, $sub_package->channel, '0.0.1');
                 }
             }
         }
         if (count($this->_dependencies->packages) > 0) {
             $this->log('found dependencies');
             foreach ($this->_dependencies->packages as $dependency) {
                 $this->log("adding following dependency: {$dependency->channel}/{$dependency->name}");
                 $package->addPackageDepWithChannel($dependency->type, $dependency->name, $dependency->channel, $dependency->minimum_version, $dependency->maximum_version, $dependency->recommended_version, $dependency->exclude_version, $dependency->providesextension, $dependency->nodefault);
             }
         }
         if (count($this->_dependencies->extensions) > 0) {
             $this->log('adding extension dependencies');
             foreach ($this->_dependencies->extensions as $extension) {
                 $this->log("adding ext dependency for: {$extension->name}");
                 $package->addExtensionDep($extension->type, $extension->name, $extension->minimum_version, $extension->maximum_version, $extension->recommended_version, $extension->extension);
             }
         }
     }
     foreach ($this->_changelogs as $changelog) {
         $this->log("adding changelog for prior release [{$changelog->version}]");
         $changelog->package = $package;
         $package->setChangelogEntry($changelog->version, $changelog->toArray());
         if (is_null($this->_notes) && $package->getVersion() == $changelog->version) {
             $this->log("no package notes specified, using changelog entry");
             $this->_notes = $changelog->contents;
         }
     }
     foreach ($this->_replacements as $replacement) {
         $replacement->isValid();
         $this->log("adding replace from [{$replacement->from}] to [{$replacement->to}]");
         $package->addReplacement($replacement->path, $replacement->type, $replacement->from, $replacement->to);
     }
     foreach ($this->_releases as $release) {
         $this->log('adding new release');
         $package->addRelease();
         foreach ($release->install as $install) {
             $this->log("installing [{$install->name}] as [{$install->as}]");
             $package->addInstallAs($install->name, $install->as);
         }
     }
     $notes = preg_replace("/^( {4}|\t)+/m", '', (string) $this->_notes);
     $package->setNotes($notes);
     $package->setLicense($this->_license->license, $this->_license->uri);
     $package->generateContents();
     $e = $package->writePackageFile();
     if (PEAR::isError($e)) {
         throw new d51PearPkg2Task_Exception('unable to write package.xml file: ' . $e->getMessage());
     }
 }
$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:
 * mode: php
 * coding: iso-8859-1
 * tab-width: 4
Exemple #21
0
$p2->setSummary($summary);
$p2->setDescription($description);
$p2->setChannel('pear.php.net');
$p2->setPackageType('php');
$p2->addGlobalReplacement('package-info', '@package_version@', 'version');
$p2->generateContents();
$p2->setReleaseVersion($current_version);
$p2->setAPIVersion('1.4.0');
$p2->setReleaseStability($current_stability);
$p2->setAPIStability('stable');
$p2->setNotes($current_notes);
$p2->addGlobalReplacement('package-info', '@package_version@', 'version');
$p2->addInstallAs('tests/AllTests.php', 'AllTests.php');
$p2->addInstallAs('tests/Net_FTPTest.php', 'Net_FTPTest.php');
$p2->addInstallAs('tests/config.php.dist', 'config.php.dist');
$p2->addInstallAs('tests/testfile.dat', 'testfile.dat');
$p2->addInstallAs('tests/extensions.ini', 'extensions.ini');
$p2->addRelease();
$p2->addMaintainer('lead', 'jorrit', 'Jorrit Schippers', '*****@*****.**', 'yes');
$p2->addMaintainer('lead', 'toby', 'Tobias Schlitt', '*****@*****.**', 'no');
$p2->setPhpDep('4.3.0');
$p2->setPearinstallerDep('1.3.0');
$p2->setLicense('BSD License', 'http://www.opensource.org/licenses/bsd-license.html');
$p2->addExtensionDep('required', 'ftp');
if (isset($_GET['make']) || isset($_SERVER['argv']) && @$_SERVER['argv'][1] == 'make') {
    echo "Writing package file\n";
    $p2->writePackageFile();
} else {
    echo "Debugging package file\n";
    $p2->debugPackageFile();
}
Exemple #22
0
<?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();
Piece_Unity_Service_ExceptionHandler_InternalServerError: Outputs a typical *Internal Server Error* HTML page.

Additionally, any exception handlers which implement the interface Piece_Unity_Service_ExceptionHandler_Interface can be used.');
$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.0.0');
$package->setPearinstallerDep('1.4.3');
$package->addPackageDepWithChannel('required', 'Piece_Unity', 'pear.piece-framework.com', '1.5.0');
$package->addPackageDepWithChannel('required', 'Stagehand_HTTP_Status', 'pear.piece-framework.com', '1.0.0');
$package->addPackageDepWithChannel('required', 'Stagehand_LegacyError', 'pear.piece-framework.com', '0.1.0');
$package->addExtensionDep('required', 'pcre');
$package->addExtensionDep('required', 'date');
$package->addMaintainer('lead', 'iteman', 'KUBO Atsuhiro', '*****@*****.**');
$package->addMaintainer('helper', 'noricot', 'KUBO Noriko', '*****@*****.**');
$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 #24
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());
        }
    }
Exemple #25
0
$packagexml->setReleaseVersion('0.3.3');
$packagexml->setReleaseStability('alpha');
$packagexml->setAPIStability('alpha');
$packagexml->setNotes('
* Fix bug #19234: Normalization of identifiers/openID not implemented correctly
* Some doc block fixes
');
$packagexml->setPackageType('php');
$packagexml->addRelease();
$packagexml->detectDependencies();
$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.0b1');
$packagexml->addPackageDepWithChannel('required', 'HTTP_Request2', 'pear.php.net', '0.5.1');
$packagexml->addPackageDepWithChannel('required', 'Cache_Lite', 'pear.php.net');
$packagexml->addPackageDepWithChannel('required', 'Crypt_DiffieHellman', 'pear.php.net');
$packagexml->addPackageDepWithChannel('required', 'Services_Yadis', 'pear.php.net', '0.5.1');
$packagexml->addPackageDepWithChannel('optional', 'Log', 'pear.php.net');
$packagexml->addPackageDepWithChannel('required', 'Net_URL2', 'pear.php.net', '0.2.0');
$packagexml->addPackageDepWithChannel('optional', 'MDB2', 'pear.php.net');
$packagexml->addPackageDepWithChannel('optional', 'HTTP_OAuth', 'pear.php.net', '0.1.7');
$packagexml->addExtensionDep('required', 'date');
$packagexml->addExtensionDep('required', 'dom');
$packagexml->addExtensionDep('required', 'hash');
$packagexml->addExtensionDep('required', 'libxml');
$packagexml->addExtensionDep('required', 'mbstring');
$packagexml->addExtensionDep('required', 'pcre');
$packagexml->addExtensionDep('required', 'SPL');
$packagexml->generateContents();
$packagexml->writePackageFile();
$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 #27
0
$package = new PEAR_PackageFileManager2();
$package->setOptions(array('filelistgenerator' => 'file', 'simpleoutput' => true, 'baseinstalldir' => '/', 'packagedirectory' => './', 'dir_roles' => array('lib' => 'php', 'tests' => 'test'), 'exceptions' => array('README.md' => 'doc', 'CHANGELOG.md' => 'doc', 'LICENSE' => 'doc', 'phpunit.xml.dist' => 'test'), 'ignore' => array('package.php', 'ci.sh', 'Rakefile', 'composer.json', '*.tgz')));
$package->setPackage('Braintree');
$package->setSummary('The Braintree PHP library provides integration access to the ' . 'Braintree Gateway.');
$package->setDescription($description);
$package->setChannel('pear.silverorange.com');
$package->setPackageType('php');
$package->setLicense('MIT License', 'https://github.com/braintree/braintree_php/blob/master/LICENSE');
$package->setNotes($release_notes);
$package->setReleaseVersion($release_version);
$package->setReleaseStability($release_state);
$package->setAPIVersion($api_version);
$package->setAPIStability($api_state);
$package->addMaintainer('lead', 'gauthierm', 'Mike Gauthier', '*****@*****.**');
$package->setPhpDep('5.3.0');
$package->addExtensionDep('required', 'curl');
$package->addExtensionDep('required', 'dom');
$package->addExtensionDep('required', 'hash');
$package->addExtensionDep('required', 'openssl');
$package->addExtensionDep('required', 'xmlwriter');
$package->setPearInstallerDep('1.4.0');
$package->generateContents();
$package->addRelease();
function rewriteInstallPath($package, $current_dir)
{
    $dir = dir(__DIR__ . '/' . $current_dir);
    while (false != ($entry = $dir->read())) {
        if ($entry === '.' || $entry === '..') {
            continue;
        }
        if (is_dir(__DIR__ . '/' . $current_dir . '/' . $entry)) {