* @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 = <<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 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 (PEAR::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 (PEAR::isError($e)) { echo $e->getMessage(); } } ?>