<?php
/**
* Generation script for PEAR package.xml file.
* Generates a version 2 package.xml file using the package
* PEAR_PackageFileManager.
*
* @link http://pear.php.net/package/PEAR_PackageFileManager
*
* PHP versions 4 and 5
*
* LICENSE: This source file is subject to version 3.0 of the PHP license
* that is available through the world-wide-web at the following URI:
* http://www.php.net/license/3_0.txt. If you did not receive a copy of
* the PHP License and are unable to obtain it through the web, please
* send a note to license@php.net so we can mail you a copy immediately.
*
* @category Frameworks
* @package Seagull
* @subpackage Seagull_default
* @author Demian Turner <demian@phpkitchen.com>
* @copyright 1997-2005 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
* @link http://www.seagullproject.org
*/
/**
* Package file manager for package.xml 2.
*/
require_once 'PEAR/PackageFileManager2.php';
/**
* Some help functions.
*/
#require_once 'generate_package_xml_functions.php';
// Directory where the package files are located.
$path = (defined('SGL_PKG_TMP_BUILD_DIR'))
? SGL_PKG_TMP_BUILD_DIR.'/modules/default'
: dirname(__FILE__);
$default_packagedir = $path;
// Name of the channel, this package will be distributed through
$default_channel = 'pear.phpkitchen.com';
// Category and name of the package
$default_category = 'Seagull Modules';
$default_package = 'Seagull_default';
$default_version = '1.0';
// Summary description
$default_summary = <<<EOT
The default module provides basic framework maintenance functionality.
EOT;
// Longer description
$default_description = <<<EOT
There are a wide range of features.
EOT;
// License information
$default_license = 'BSD';
// Notes, function to grab them directly from S9Y in
// generate_package_xml_functions.php
$default_notes = <<<EOT
Publisher notes.
EOT;
// Instantiate package file manager
$default_pkg = new PEAR_PackageFileManager2();
// Setting options
$e = $default_pkg->setOptions(
array(
// Where are our package files.
'packagedirectory' => $default_packagedir,
// Where will package files be installed in
// the local PEAR repository?
'baseinstalldir' => 'Seagull/modules/default',
// Where should the package file be generated
'pathtopackagefile' => $default_packagedir,
// Just simple output, no MD5 sums and <provides> tags
#'simpleoutput' => true,
'packagefile' => 'package2.xml',
// Use standard file list generator, choose CVS, if you
// have your code in CVS
'filelistgenerator' => 'file',
// List of files to ignore and put not explicitly into the package
'ignore' =>
array(
'package2.xml',
'*tests*',
'*.svn',
),
// Global mapping of directories to file roles.
// @see http://pear.php.net/manual/en/guide.migrating.customroles.defining.php
'dir_roles' =>
array(
'docs' => 'doc',
'lib' => 'php',
'modules' => 'php',
'www' => 'web',
),
'roles' =>
array(
'php' => 'php',
'*' => 'php',
),
// Define exceptions of previously defined role mappings,
// this part uses real file names and no directories.
'exceptions' =>
array(
),
)
);
// PEAR error checking
if (SGL::isError($e)) {
die($e->getMessage());
}
// Set misc package information
$default_pkg->setPackage($default_package);
$default_pkg->setSummary($default_summary);
$default_pkg->setDescription($default_description);
$default_pkg->setChannel($default_channel);
$default_pkg->setReleaseStability('beta');
$default_pkg->setAPIStability('stable');
$default_pkg->setReleaseVersion($default_version);
$default_pkg->setAPIVersion($default_version);
$default_pkg->setLicense($default_license);
$default_pkg->setNotes($default_notes);
// Our package contains PHP files (not C extension files)
$default_pkg->setPackageType('php');
// Must be available in new package.xml format
$default_pkg->setPhpDep('4.3.0');
$default_pkg->setPearinstallerDep('1.4.6');
// Require PEAR_DB package for initializing the database in the post install script
#$default_pkg->addPackageDepWithChannel('required', 'XML_Util', 'pear.php.net', '1.1.1');
// Create the current release and add it to the package definition
$default_pkg->addRelease();
// Package release needs a maintainer
$default_pkg->addMaintainer('lead', 'demianturner', 'Demian Turner', 'demian@phpkitchen.com');
// Internally generate the XML for our package.xml (does not perform output!)
$test = $default_pkg->generateContents();
if (!defined('SGL_PKG_TMP_BUILD_DIR')) {
if (isset($_GET['make']) || (isset($_SERVER['argv'][1]) &&
$_SERVER['argv'][1] == 'make')) {
#$e = $pkg->writePackageFile();
$e = $default_pkg->writePackageFile();
#$e = $packagexml->writePackageFile();
} else {
#$e = $pkg->debugPackageFile();
$e = $default_pkg->debugPackageFile();
#$e = $packagexml->debugPackageFile();
}
if (SGL::isError($e)) {
echo $e->getMessage();
}
}
?>
Copyright 2K16 - 2K18 Indonesian Hacker Rulez