コード例 #1
0
 * @since    0.1.0
 * @version  @package-version@
 */
require_once 'PEAR/PackageFileManager2.php';
$version = '1.0.2';
$notes = '* initial release as PEAR';
$web_dir = 'www';
$ignore = array('makepackage.php', '*.tgz', 'tests/', '.svn/', 'build.xml', 'config.elevforeningen.php');
$postinstall_file = 'elevforeningen.php';
PEAR::setErrorHandling(PEAR_ERROR_DIE);
$pfm = new PEAR_PackageFileManager2();
$pfm->setOptions(array('baseinstalldir' => '/', 'filelistgenerator' => 'file', 'packagedirectory' => dirname(__FILE__) . '/src', 'packagefile' => 'package.xml', 'ignore' => $ignore, 'dir_roles' => array('www' => 'web'), 'simpleoutput' => true, 'addhiddenfiles' => true));
$pfm->setPackage('VIH_Elevforeningen');
$pfm->setSummary('VIH');
$pfm->setDescription('VIH');
$pfm->setUri('http://localhost/');
$pfm->setLicense('LGPL License', 'http://www.gnu.org/licenses/lgpl.html');
$pfm->addMaintainer('lead', 'lsolesen', 'Lars Olesen', '*****@*****.**');
$pfm->setPackageType('php');
$pfm->setAPIVersion($version);
$pfm->setReleaseVersion($version);
$pfm->setAPIStability('beta');
$pfm->setReleaseStability('stable');
$pfm->setNotes($notes);
$pfm->addRelease();
$pfm->resetUsesRole();
$pfm->addUsesRole('web', 'Role_Web', 'pearified.com');
$pfm->addPackageDepWithChannel('required', 'Role_Web', 'pearified.com', '1.1.1');
// $pfm->addGlobalReplacement('package-info', '@package-version@', 'version');
$pfm->addReplacement($postinstall_file, 'pear-config', '@php-dir@', 'php_dir');
$pfm->addReplacement($postinstall_file, 'pear-config', '@web-dir@', 'web_dir');
コード例 #2
0
ファイル: makepackagexml.php プロジェクト: ni-c/pel
 * @license http://www.gnu.org/licenses/gpl.html GNU General Public
 */
require_once 'PEAR/PackageFileManager2.php';
$version = '0.9.2';
$stability = 'beta';
$notes = '* initial release as a PEAR package';
$url = 'http://downloads.sf.net/pel/PEL-' . $version . '.tgz';
PEAR::setErrorHandling(PEAR_ERROR_DIE);
$pfm = new PEAR_PackageFileManager2();
$pfm->setOptions(array('baseinstalldir' => 'PEL', 'filelistgenerator' => 'file', 'packagedirectory' => dirname(__FILE__), 'packagefile' => 'package.xml', 'ignore' => array('makepackagexml.php', '*.tgz', '*.sh', 'test/', 'tutorials/', 'authors.xml'), 'dir_roles' => array('doc' => 'doc', 'examples' => 'doc', 'test' => 'test'), 'exceptions' => array('README' => 'doc', 'AUTHORS' => 'doc', 'COPYING' => 'doc', 'INSTALL' => 'doc', 'NEWS' => 'doc', 'TODO' => 'doc'), 'simpleoutput' => true));
$pfm->setPackage('PEL');
$pfm->setSummary('The PHP Exif Library (PEL) lets you fully manipulate Exif (Exchangeable Image File Format) data.');
$pfm->setDescription('The PHP Exif Library (PEL) lets you fully manipulate Exif (Exchangeable Image File Format) data. This is the data that digital cameras place in their images, such as the date and time, shutter speed, ISO value and so on.

Using PEL, one can fully modify the Exif data, meaning that it can be both read and written. Completely new Exif data can also be added to images. PEL is written completely in PHP and depends on nothing except a standard installation of PHP, version 5. PEL is hosted on SourceForge.');
$pfm->setUri($url);
$pfm->setLicense('GPL License', 'http://www.gnu.org/licenses/gpl.html');
$pfm->addMaintainer('lead', 'mgeisler', 'Martin Geisler', '*****@*****.**');
$pfm->addMaintainer('helper', 'lsolesen', 'Lars Olesen', '*****@*****.**');
$pfm->setPackageType('php');
$pfm->setAPIVersion($version);
$pfm->setReleaseVersion($version);
$pfm->setAPIStability($stability);
$pfm->setReleaseStability($stability);
$pfm->setNotes($notes);
$pfm->addRelease();
$pfm->clearDeps();
$pfm->setPhpDep('5.0.0');
$pfm->setPearinstallerDep('1.5.0');
$pfm->generateContents();
if (isset($_GET['make']) || isset($_SERVER['argv']) && @$_SERVER['argv'][1] == 'make') {
コード例 #3
0
    echo "  \$ sudo pear upgrade PEAR\n";
    echo "  \$ sudo pear install XML_Serializer-0.19.2\n";
    echo "  \$ sudo pear install --alldeps PEAR_PackageFileManager2\n\n";
    exit(0);
}
$version = '2.1.1';
$stability = 'stable';
$notes = 'Mostly bug fixes.';
PEAR::setErrorHandling(PEAR_ERROR_DIE);
$pfm = new PEAR_PackageFileManager2();
$pfm->setOptions(array('baseinstalldir' => '/', 'filelistgenerator' => 'file', 'packagedirectory' => dirname(__FILE__) . '/../', 'packagefile' => 'package.xml', 'addhiddenfiles' => true, 'ignore' => array('*script*', '*.svn*', '*.tgz'), 'dir_roles' => array('test' => 'test', 'examples' => 'doc', 'docs' => 'doc', 'lib' => 'php'), 'exceptions' => array(), 'simpleoutput' => true));
$pfm->setPackage('konstrukt');
$pfm->setSummary('A HTTP-friendly framework of controllers for PHP5.');
$pfm->setDescription('
Konstrukt is a minimalistic framework which provides a foundation on which to build rather than a boxed solution to all problems. It focuses on the controller layer, and tries to encourage the developer to deal directly with the HTTP protocol instead of abstracting it away. Konstrukt uses a hierarchical controller pattern, which provides a greater level of flexibility than the popular routed front controller frameworks.');
$pfm->setUri('http://www.konstrukt.dk/');
$pfm->setLicense('LGPL License', 'http://www.gnu.org/licenses/lgpl.html');
$pfm->addMaintainer('lead', 'troelskn', 'Troels Knak-Nielsen', '*****@*****.**');
$pfm->addMaintainer('helper', 'anders.ekdahl', 'Anders Ekdahl', '');
$pfm->addMaintainer('helper', 'lsolesen', 'Lars Olesen', '*****@*****.**');
$pfm->setPackageType('php');
$pfm->setAPIVersion($version);
$pfm->setReleaseVersion($version);
$pfm->setAPIStability($stability);
$pfm->setReleaseStability($stability);
$pfm->setNotes($notes);
$pfm->addRelease();
$pfm->clearDeps();
$pfm->setPhpDep('5.2.0');
$pfm->setPearinstallerDep('1.5.0');
$lib_files = array('konstrukt/adapter.inc.php', 'konstrukt/charset.inc.php', 'konstrukt/konstrukt.inc.php', 'konstrukt/template.inc.php', 'konstrukt/logging.inc.php', 'konstrukt/response.inc.php', 'konstrukt/virtualbrowser.inc.php');
コード例 #4
0
<?php

/**
 * Creates the package.xml file needed for distribution.
 * 
 * Use php PackageManager.php to test output on cli, 
 * php PackageManager.php make to really generate package.xml
 */
require_once 'PEAR/PackageFileManager2.php';
PEAR::setErrorHandling(PEAR_ERROR_DIE);
$packagexml = new PEAR_PackageFileManager2();
$e = $packagexml->setOptions(array('clearcontents' => true, 'baseinstalldir' => 'SQLI', 'packagedirectory' => '.', 'dir_roles' => array('scripts' => 'script', 'tests' => 'test', 'CodeSniffer/Standards/Generic/Reports' => 'php', 'CodeSniffer/Standards/GN/Reports' => 'php', 'CodeSniffer/Standards/GNNew/Reports' => 'php', 'CodeSniffer/Standards/ZF/Reports' => 'php', 'CodeSniffer/Standards/Symfony/Reports' => 'php', 'CodeSniffer/Standards/Generic/Tests' => 'test', 'CodeSniffer/Standards/GN/Tests' => 'test', 'CodeSniffer/Standards/GNNew/Tests' => 'test', 'CodeSniffer/Standards/ZF/Tests' => 'test', 'CodeSniffer/Standards/Symfony/Tests' => 'test'), 'installexceptions' => array('scripts/sqlics.dist' => '/', 'scripts/sqlics.bat.dist' => '/')));
$packagexml->setPackage('SQLI_CodeSniffer');
$packagexml->setSummary('SQLI extension to PHP_CodeSniffer');
$packagexml->setDescription('SQLI_CodeSniffer extends PHP_CodeSniffer to add violation codes and configurable severities and messages');
$packagexml->setUri('http://www.assembla.com/spaces/sqlics/documents');
$packagexml->setAPIVersion('0.4.0dev1');
$packagexml->setReleaseVersion('0.4.0dev1');
$packagexml->setReleaseStability('devel');
$packagexml->setAPIStability('devel');
$packagexml->setNotes("This version adds/recovers some compatibility with PHP_CodeSniffer : sniffers' interface, tests.");
$packagexml->setPackageType('php');
// this is a PEAR-style php script package
$packagexml->setPhpDep('5.1.2');
$packagexml->setPearinstallerDep('1.4.0b1');
$packagexml->addPackageDepWithChannel('package', 'PHP_CodeSniffer', 'pear.php.net', '1.2.0RC1');
$packagexml->addMaintainer('lead', 'blacksun', 'Gabriele Santini', '*****@*****.**');
$packagexml->setLicense('New BSD License', 'http://www.opensource.org/licenses/bsd-license.php');
$packagexml->addRelease();
// set up a release section
$packagexml->setOSInstallCondition('windows');
コード例 #5
0
ファイル: make_package.php プロジェクト: ryo88c/BEAR.Saturday
if (!isset($_SERVER['argv'][1])) {
    print "Usage: php{$_SERVER['argv'][0]} package_uri uri|channel [make]\n";
    print "ex)\n1) php {$_SERVER['argv'][0]} pear.example.co.jp channel \n";
    print "2) php {$_SERVER['argv'][0]} pear.example.co.jp channel make\n";
    print "3) cd ../../\n";
    print "4) pear package-validate\n";
    print "5) pear package\n";
    exit;
} else {
    $uri = $_SERVER['argv'][1];
}
/**
 * network install package or local package
 */
if ($_SERVER['argv'][2] == 'uri') {
    $packagexml->setUri($uri);
} else {
    $packagexml->setChannel($uri);
}
/**
 * this makes local install package
 */
$packagexml->generateContents();
// note use of debugPackageFile() - this is VERY important
if ($_SERVER['argv'][3] != 'debug') {
    _debugPrint("writePackageFile\n");
    $result = $packagexml->writePackageFile();
} else {
    $result = $packagexml->debugPackageFile();
    _debugPrint("debugPackageFile\n");
}