{
    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();
}
示例#2
0
$package = new PEAR_PackageFileManager2();
PEAR::setErrorHandling(PEAR_ERROR_DIE);
$result = $package->setOptions(array('filelistgenerator' => 'file', 'simpleoutput' => true, 'baseinstalldir' => '/', 'packagedirectory' => './', 'dir_roles' => array('Blorg' => 'php', 'locale' => 'data', 'dependencies' => 'data', 'www' => 'data')));
$package->setPackage('Blorg');
$package->setSummary('A package for creating weblogs.');
$package->setDescription($description);
$package->setChannel('pear.silverorange.com');
$package->setPackageType('php');
$package->setLicense('private', 'http://www.silverorange.com/');
$package->setReleaseVersion($version);
$package->setReleaseStability('stable');
$package->setAPIVersion('0.0.1');
$package->setAPIStability('stable');
$package->setNotes($notes);
$package->addIgnore('package.php');
$package->addMaintainer('lead', 'gauthierm', 'Mike Gauthier', '*****@*****.**');
$package->addReplacement('Blorg/Blorg.php', 'pear-config', '@DATA-DIR@', 'data_dir');
$package->setPhpDep('5.2.4');
$package->setPearinstallerDep('1.4.0');
$package->addPackageDepWithChannel('required', 'Swat', 'pear.silverorange.com', '1.4.131');
$package->addPackageDepWithChannel('required', 'Site', 'pear.silverorange.com', '1.6.18');
$package->addPackageDepWithChannel('required', 'Admin', 'pear.silverorange.com', '1.3.42');
$package->addPackageDepWithChannel('required', 'XML_Atom', 'pear.silverorange.com', '0.1.7');
$package->addPackageDepWithChannel('optional', 'Services_Akismet2', 'pear.php.net', '0.2.0');
$package->addPackageDepWithChannel('optional', 'Services_Twitter', 'pear.php.net', '0.5.1');
$package->generateContents();
if (isset($_GET['make']) || isset($_SERVER['argv']) && @$_SERVER['argv'][1] == 'make') {
    $package->writePackageFile();
} else {
    $package->debugPackageFile();
}
示例#3
0
$result = $package->setOptions(array('filelistgenerator' => 'file', 'simpleoutput' => true, 'baseinstalldir' => '/', 'packagedirectory' => './', 'dir_roles' => array('Deliverance' => 'php', '/' => 'data')));
$package->setPackage('Deliverance');
$package->setSummary('Library for managing mailing lists built on the ' . 'Site 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->addMaintainer('lead', 'nrf', 'Nathan Fredrickson', '*****@*****.**');
$package->addReplacement('Delverance/Deliverance.php', 'pear-config', '@DATA-DIR@', 'data_dir');
$package->setPhpDep('5.1.5');
$package->setPearinstallerDep('1.4.0');
$package->addPackageDepWithChannel('required', 'Site', 'pear.silverorange.com', '1.6.8');
$package->addPackageDepWithChannel('required', 'Swat', 'pear.silverorange.com', '1.4.62');
$package->addPackageDepWithChannel('required', 'Mail', 'pear.php.net', '1.1.10');
$package->addPackageDepWithChannel('required', 'Mail_Mime', 'pear.silverorange.com', '1.5.2so3');
$package->addPackageDepWithChannel('required', 'Net_SMTP', 'pear.php.net', '1.2.8');
$package->addPackageDepWithChannel('optional', 'MailChimpAPI', 'pear.silverorange.com', '1.3.1');
$package->addPackageDepWithChannel('optional', 'Admin', 'pear.silverorange.com', '1.3.70');
$package->generateContents();
if (isset($_GET['make']) || isset($_SERVER['argv']) && @$_SERVER['argv'][1] == 'make') {
    $package->writePackageFile();
} else {
    $package->debugPackageFile();
}
示例#4
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());
        }
    }
示例#5
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();
}
$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');
$packagexml->addIgnore('PackageManager.php');
$packagexml->addIgnore('scripts/sqlics');
$packagexml->addIgnore('scripts/sqlics.bat');
$packagexml->generateContents();
// create the <contents> tag
if (isset($_GET['make']) || isset($_SERVER['argv']) && @$_SERVER['argv'][1] == 'make') {
示例#7
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());
     }
 }
示例#8
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");
示例#9
0
$strCustDistFile = $packagedir . '/system/lib-custom.php.dist';
$bCustCopy = !file_exists($strCustDistFile);
if ($bCustCopy) {
    copy($packagedir . '/system/lib-custom.php', $strCustDistFile);
}
// We have some hard coded ignores here but also add all the includes of the subpackages to the
// ignore list.
$arGlIgnores = array($packagedir . '/config.php', $packagedir . '/system/lib-custom.php', 'package*.xml', '*.tgz', $packagedir . '/public_html/fckeditor/', $packagedir . '/public_html/layout/', $packagedir . '/plugins/', $packagedir . '/public_html/admin/plugins/', $packagedir . '/public_html/calendar/', $packagedir . '/public_html/polls/', $packagedir . '/public_html/links/', $packagedir . '/public_html/staticpages/');
/*foreach ($arIncludes as $arSubpackageIgnores) {
    $arGlIgnores = array_merge($arGlIgnores, $arSubpackageIgnores);
}*/
//print 'packagedir: ' . $packagedir; exit;
// Setting options
$e = $pkg->setOptions(array('packagefile' => 'package.xml', 'packagedirectory' => $packagedir, 'baseinstalldir' => 'Geeklog', 'outputdirectory' => $packagedir . DIRECTORY_SEPARATOR, 'simpleoutput' => true, 'filelistgenerator' => 'CVS', 'ignore' => $arGlIgnores, 'dir_roles' => array('backups' => 'web', 'system' => 'web', 'language' => 'web', 'plugins' => 'web', 'sql' => 'web', 'data' => 'data', 'logs' => 'web', 'public_html' => 'web'), 'roles' => array('*' => 'web')));
// The following modifies the require_once of config.php in lib-common.php automagically
$pkg->addReplacement('public_html/lib-common.php', 'pear-config', '@WEB_DIR@', 'web_dir');
$pkg->addReplacement('public_html/lib-common.php', 'package-info', '@PACKAGE@', 'name');
// PEAR error checking
if (PEAR::isError($e)) {
    die($e->getMessage());
}
// Choices for this are alpha, beta and stable.
$pkg->setReleaseStability('stable');
// Set misc package information.  You shouldn't have to ever change these.
$pkg->setPackage($package);
$pkg->setSummary($summary);
$pkg->setDescription($description);
$pkg->setChannel($channel);
$pkg->setAPIStability('stable');
$pkg->setReleaseVersion($version);
$pkg->setAPIVersion($version);
示例#10
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();
}
示例#11
0
    $pack->setAPIVersion('1.0.3');
    $pack->setReleaseStability('stable');
    $pack->setAPIStability('stable');
    $pack->setNotes('
    * The first release of Faker for PHP 5.3.x
    ');
    $pack->setLicense('Apache License, Version 2.0', 'http://www.apache.org/licenses/LICENSE-2.0');
    $pack->addMaintainer('lead', 'icomefromthenet', 'Lewis Dyer', '*****@*****.**');
    $pack->addRelease();
    $pack->addInstallAs('bin/faker.php', 'faker');
    // core dependencies
    $pack->setPhpDep('5.3.2');
    $pack->setPearinstallerDep('1.4.6');
    // package dependencies
    #none;
    $pack->addReplacement('bin/faker.php', 'pear-config', '@PHP-BIN@', 'php_bin');
    $pack->addReplacement('bin/faker.php', 'pear-config', '@PEAR-DATA@', 'data_dir');
    $pack->addReplacement('bin/faker.php', 'pear-config', '/usr/bin/env php', 'php_bin');
    //$pack->addReplacement('bin/faker.php', 'pear-config', '@PEAR-DIR@',  'php_dir');
    $pack->addReplacement('Faker/Bootstrap.php', 'pear-config', '@PHP-BIN@', 'php_bin');
    $pack->addReplacement('Faker/Command/InitProjectCommand.php', 'pear-config', '@PHP-BIN@', 'php_bin');
    $pack->addReplacement('Faker/Command/InitProjectCommand.php', 'pear-config', '@PEAR-DATA@', 'data_dir');
    $pack->generateContents();
    $pack->writePackageFile();
    $output->writeLn('Package file created: <info>' . $outputDir . 'package.xml</info>');
});
//---------------------------------------------------------------------
// Parse Names CSV
//
//--------------------------------------------------------------------
$parse_names = new Command('names');
示例#12
0
$api_state = 'alpha';
$release_version = '0.3.0';
$release_state = 'alpha';
$release_notes = " * Fixed Bug #15567: Exception is thrown when referrer is not set in " . "comment.\n" . " * Fixed Req #15569: Ability to set a custom user-agent.\n" . " * Fixed Bug #15571: Don't always include server-related fields. There " . "is a new parameter on the isSpam() method to auto-set server-related " . "fields.\n" . " * API doc cleanups.\n" . " * Wrote end-user documentation (PEAR manual is not up-to-date yet, but " . "source files are in CVS).\n" . " * More complete unit tests.\n" . " * Fix bug in 0.2.0 that caused incorrect host to be used to requests " . "requiring an API key.\n" . " * Allow specifying comment as an array rather than an object.\n" . " * Make \$fields property of comment class protected for easier " . "sub-classing of the comment class.\n" . " * PHPCS cleanups.\n";
$description = "This package provides an object-oriented interface to the Akismet REST " . "API. The Akismet API is used to detect and to filter spam comments " . "posted on weblogs.\n\n" . "There are several anti-spam service providers that use the Akismet API. " . "To use the API, you will need an API key from such a provider. Example " . "providers include Wordpress (http://wordpress.com) and TypePad " . "(http://antispam.typepad.com).\n\n" . "Most services are free for personal or low-volume use, and offer " . "licensing for commercial or high-volume applications.\n\n" . "This package is derived from the miPHP Akismet class written by Bret " . "Kuhns for use in PHP 4. This package requires PHP 5.2.1.";
$package = new PEAR_PackageFileManager2();
$package->setOptions(array('filelistgenerator' => 'svn', 'simpleoutput' => true, 'baseinstalldir' => '/', 'packagedirectory' => './', 'dir_roles' => array('Services' => 'php', 'Services/Akismet2' => 'php', 'tests' => 'test'), 'ignore' => array('package.php')));
$package->setPackage('Services_Akismet2');
$package->setExtends('Services_Akismet');
$package->setSummary('PHP client for the Akismet REST API');
$package->setDescription($description);
$package->setChannel('pear.php.net');
$package->setPackageType('php');
$package->setLicense('MIT', 'http://www.opensource.org/licenses/mit-license.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('Services/Akismet.php', 'package-info', '@api-version@', 'api-version');
$package->addReplacement('Services/Akismet.php', 'package-info', '@name@', 'name');
$package->setPhpDep('5.2.1');
$package->addPackageDepWithChannel('required', 'HTTP_Request2', 'pear.php.net', '0.1.0');
$package->setPearinstallerDep('1.4.0');
$package->generateContents();
if (isset($_GET['make']) || isset($_SERVER['argv']) && @$_SERVER['argv'][1] == 'make') {
    $package->writePackageFile();
} else {
    $package->debugPackageFile();
}
示例#13
0
$description = "This package provides a command-line tool to glob and minify static " . "resources for a website using silverorange's Site package. Files are " . "combined according to a configuration file passed on the command-line.";
$package = new PEAR_PackageFileManager2();
$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 {
$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();
示例#15
0
文件: package.php 项目: Lazybin/huisa
$package->setAPIStability($api_state);
/**
 * Dependencies
 */
$maintainers = array(array('name' => 'Robert Allen', 'user' => 'zircote', 'email' => '*****@*****.**', 'role' => 'lead'));
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();
示例#16
0
PEAR::setErrorHandling(PEAR_ERROR_DIE);
$result = $package->setOptions(array('filelistgenerator' => 'file', 'simpleoutput' => true, 'baseinstalldir' => '/', 'packagedirectory' => './', 'dir_roles' => array('NewsFlash' => 'php', 'locale' => 'data', 'www' => 'data', '/' => 'data')));
$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 {
示例#17
0
$package->setPackage('Pinhole');
$package->setSummary('Framework for building gallery sites');
$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->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();
示例#18
0
$aFilesToIgnore[] = 'bootstrap.custom.php';
$aFilesToIgnore[] = 'bootstrap.custom.php-sample';
$packagexml = new PEAR_PackageFileManager2();
$packagexml->addPackageDepWithChannel('package', 'Autoload', BOXUK_PEAR_CHANNEL, '1.0.1');
$packagexml->setOptions(array('dir_roles' => array('bin' => 'script'), 'packagedirectory' => 'lib', 'baseinstalldir' => '/', 'ignore' => $aFilesToIgnore));
$packagexml->setPackage('describr');
$packagexml->setSummary('So, tell me about your file...');
$packagexml->setDescription('Given any file, Describr will describe it. Can be used as a command line script or within a PHP project');
$packagexml->setChannel(BOXUK_PEAR_CHANNEL);
$packagexml->setAPIVersion($version);
$packagexml->setReleaseVersion($version);
$packagexml->setReleaseStability('stable');
$packagexml->setAPIStability('stable');
$packagexml->setNotes("-");
$packagexml->setPackageType('php');
$packagexml->addReplacement('BoxUK/Describr/Plugins/BoxUK/ImageMainColourPicker.php', 'pear-config', '@DATA_DIR@', 'data_dir');
$packagexml->addReplacement('bin/describr-pear.php', 'pear-config', '@PHP_DIR@', 'php_dir');
////////////WINDOWS///////////////////////////
$packagexml->addRelease();
// WINDOWS
$packagexml->setOSInstallCondition('windows');
$packagexml->addInstallAs('bin/describr-pear.bat', 'describr.bat');
$packagexml->addReplacement('bin/describr-pear.bat', 'pear-config', '@PHP_BIN@', 'php_bin');
$packagexml->addReplacement('bin/describr-pear.bat', 'pear-config', '@BIN_DIR@', 'bin_dir');
$packagexml->addInstallAs('bin/describr-pear.php', 'describr-pear.php');
/////////////////////////////////////////////
///////////NON-WINDOWS///////////////////////
$packagexml->addRelease();
// NON-WINDOWS
$packagexml->addInstallAs('bin/describr-pear', 'describr');
$packagexml->addReplacement('bin/describr-pear', 'pear-config', '@PHP_BIN@', 'php_bin');
示例#19
0
文件: package.php 项目: knevcher/limb
$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->addReplacement('pear_limb', 'pear-config', '@PHP-BIN@', 'php_bin');
$package->addReplacement('pear_limb', 'pear-config', '@PHP-DIR@', 'php_dir');
$package->addReplacement('pear_limb.bat', 'pear-config', '@PHP-BIN@', 'php_bin');
$package->addReplacement('pear_limb.bat', 'pear-config', '@PHP-DIR@', 'php_dir');
$package->addUnixEol('pear_limb');
$package->addWindowsEol('pear_limb.bat');
$package->addRelease();
$package->addInstallAs('pear_limb', 'limb');
$package->addInstallAs('pear_limb.bat', 'limb.bat');
$package->setPhpDep('5.1.4');
$package->setPearinstallerDep('1.4.99');
$package->addPackageDepWithChannel('required', 'core', 'pear.limb-project.com', '0.1.3');
$package->generateContents();
$result = $package->writePackageFile();
if (PEAR::isError($result)) {
    echo $result->getMessage();
 /**
  * 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());
     }
 }
示例#21
0
$package->setOptions(array('filelistgenerator' => 'file', 'simpleoutput' => true, 'baseinstalldir' => '/', 'packagedirectory' => './', 'dir_roles' => array('Crypt' => 'php', 'Crypt/GPG' => 'php', 'tests' => 'test', 'data' => 'data'), 'exceptions' => array('LICENSE' => 'doc', 'README.md' => 'doc', 'scripts/crypt-gpg-pinentry' => 'script'), 'ignore' => array('tests/config.php', 'tools/', 'package.php', 'composer.json', '*.tgz'), 'installexceptions' => array('scripts/crypt-gpg-pinentry' => '/')));
$package->setPackage('Crypt_GPG');
$package->setSummary('GNU Privacy Guard (GnuPG)');
$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();
示例#22
0
$api_version = '0.5.0';
$api_state = 'beta';
$release_version = '0.5.1';
$release_state = 'beta';
$release_notes = " * Fixed API endpoint for sandbox signature authentication. \n";
$description = "This package provides an easy-to-use wrapper of PHP 5's SOAP client " . "for use with the PayPal SOAP API.\n\n" . "This package requires PHP 5.1.0 or greater, built with the SOAP " . "extension enabled.\n\n" . "Note: Due to a PHP bug, PHP versions 5.2.2 to 5.2.6 are incompatible " . "with this package.";
$package = new PEAR_PackageFileManager2();
$package->setOptions(array('filelistgenerator' => 'file', 'simpleoutput' => true, 'baseinstalldir' => '/', 'packagedirectory' => './', 'dir_roles' => array('Payment' => 'php', 'Payment/PayPal' => 'php', 'Payment/PayPal/SOAP' => 'php', 'tests' => 'test', 'data' => 'data'), 'ignore' => array('package.php')));
$package->setPackage('Payment_PayPal_SOAP');
$package->setSummary('PayPal SOAP API client');
$package->setDescription($description);
$package->setChannel('pear.php.net');
$package->setPackageType('php');
$package->setLicense('MIT', 'http://www.opensource.org/licenses/mit-license.html');
$package->setNotes($release_notes);
$package->setReleaseVersion($release_version);
$package->setReleaseStability($release_state);
$package->setAPIVersion($api_version);
$package->setAPIStability($api_state);
$package->addReplacement('Payment/PayPal/SOAP.php', 'pear-config', '@data-dir@', 'data_dir');
$package->addReplacement('tests/TestCase.php', 'pear-config', '@php_dir@', 'php_dir');
$package->addMaintainer('lead', 'gauthierm', 'Mike Gauthier', '*****@*****.**');
$package->setPhpDep('5.1.0', false, array('5.2.2', '5.2.3', '5.2.4', '5.2.5', '5.2.6'));
$package->addExtensionDep('required', 'soap');
$package->setPearinstallerDep('1.4.0');
$package->generateContents();
if (isset($_GET['make']) || isset($_SERVER['argv']) && @$_SERVER['argv'][1] == 'make') {
    $package->writePackageFile();
} else {
    $package->debugPackageFile();
}
$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');
$pfm->addPackageDepWithChannel('required', 'Template', 'public.intraface.dk', '0.2.0');
$pfm->addPackageDepWithChannel('required', 'IntrafacePublic_Contact_XMLRPC', 'public.intraface.dk', '0.1.2');
示例#24
0
$packagexml->setChannel($ethna_channel);
$packagexml->setAPIVersion($version);
$packagexml->setReleaseVersion($version);
$packagexml->setReleaseStability($state);
$packagexml->setAPIStability($state);
$packagexml->setNotes('Ethna PHP Web Application Framework');
$packagexml->setPackageType('php');
$packagexml->addRole('*', 'php');
$packagexml->setPhpDep('5.2.0');
$packagexml->setPearinstallerDep('1.3.5');
$packagexml->addPackageDepWithChannel('optional', 'DB', 'pear.php.net');
$packagexml->addPackageDepWithChannel('optional', 'Smarty', $ethna_channel);
$packagexml->addPackageDepWithChannel('optional', 'simpletest', $ethna_channel);
$packagexml->addMaintainer('lead', 'sotarok', 'Sotaro Karasawa', '*****@*****.**');
$packagexml->setLicense('The BSD License', 'http://www.opensource.org/licenses/bsd-license.php');
$packagexml->addReplacement('bin/ethna.bat', 'pear-config', '@PEAR-DIR@', 'php_dir');
$packagexml->addReplacement('bin/ethna.bat', 'pear-config', '@PHP-BIN@', 'bin_dir');
$packagexml->addReplacement('bin/ethna.sh', 'pear-config', '@PHP-BINARY@', 'php_bin');
$packagexml->addReplacement('bin/ethna.sh', 'pear-config', '@PEAR-DIR@', 'php_dir');
$packagexml->addReplacement('bin/ethna.sh', 'pear-config', '@PHP-BIN@', 'bin_dir');
$packagexml->addRelease();
$packagexml->setOSInstallCondition('windows');
$packagexml->addInstallAs('bin/ethna.bat', 'ethna.bat');
$packagexml->addIgnoreToRelease('bin/ethna.sh');
$packagexml->addRelease();
$packagexml->addInstallAs('bin/ethna.sh', 'ethna');
$packagexml->addIgnoreToRelease('bin/ethna.bat');
$packagexml->generateContents();
if ($is_old_package) {
    if (method_exists($packagexml, 'exportCompatiblePackageFile1')) {
        $pkg =& $packagexml->exportCompatiblePackageFile1();
示例#25
0
$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();
$pack->writePackageFile();
echo 'Package file created: ' . $outputDir . 'package.xml' . "\n";
示例#26
0
EOT;
$package = new PEAR_PackageFileManager2();
$package->setOptions(array('filelistgenerator' => 'file', 'simpleoutput' => true, 'baseinstalldir' => '/', 'packagedirectory' => './', 'dir_roles' => array('Net' => 'php', 'Net/Notifier/' => 'php', 'Net/Notifier/Socket' => 'php', 'Net/Notifier/WebSocket' => 'php', 'tests' => 'test', 'data' => 'data'), 'exceptions' => array('scripts/net-notifier-server' => 'script', 'scripts/net-notifier-listener' => 'script', 'scripts/net-notifier-sender' => 'script', 'LICENSE' => 'doc', 'README.md' => 'doc'), 'ignore' => array('tests/config.php', 'package.php', 'package.xml', '*.tgz', '*.zip'), 'installexceptions' => array('scripts/net-notifier-server' => '/', 'scripts/net-notifier-listener' => '/', 'scripts/net-notifier-sender' => '/')));
$package->setPackage('Net_Notifier');
$package->setSummary('WebSocket relay notification system.');
$package->setDescription($description);
$package->setChannel('pear.silverorange.com');
$package->setPackageType('php');
$package->setLicense('LGPL', 'http://www.gnu.org/copyleft/lesser.html');
$package->setReleaseVersion($releaseVersion);
$package->setReleaseStability($releaseState);
$package->setAPIVersion($apiVersion);
$package->setAPIStability($apiState);
$package->setNotes($releaseNotes);
$package->addMaintainer('lead', 'gauthierm', 'Mike Gauthier', '*****@*****.**');
$package->addReplacement('Net/Notifier/ServerCLI.php', 'pear-config', '@data-dir@', 'data_dir');
$package->addReplacement('Net/Notifier/ListenerCLI.php', 'pear-config', '@data-dir@', 'data_dir');
$package->addReplacement('Net/Notifier/SenderCLI.php', 'pear-config', '@data-dir@', 'data_dir');
$package->addReplacement('Net/Notifier/ServerCLI.php', 'package-info', '@package-name@', 'name');
$package->addReplacement('Net/Notifier/ListenerCLI.php', 'package-info', '@package-name@', 'name');
$package->addReplacement('Net/Notifier/SenderCLI.php', 'package-info', '@package-name@', 'name');
$package->addReplacement('data/server-cli.xml', 'package-info', '@package-version@', 'version');
$package->addReplacement('data/listener-cli.xml', 'package-info', '@package-version@', 'version');
$package->addReplacement('data/sender-cli.xml', 'package-info', '@package-version@', 'version');
$package->setPhpDep('5.2.1');
$package->setPearinstallerDep('1.4.0');
$package->addExtensionDep('required', 'mbstring');
$package->addExtensionDep('optional', 'pcntl');
$package->addPackageDepWithChannel('required', 'Console_CommandLine', 'pear.php.net', '1.1.10');
$package->generateContents();
$package->addRelease();