setOptions( array( // Where are our package files. 'packagedirectory' => $packagedir, // Where will package files be installed in // the local PEAR repository? 'baseinstalldir' => 'SimpleTest', // Where should the package file be generated 'pathtopackagefile' => $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( 'packages/', 'tutorials/', 'ui/', 'docs/', '*CVS*', 'TODO', ), // Global mapping of directories to file roles. // @see http://pear.php.net/manual/en/guide.migrating.customroles.defining.php 'dir_roles' => array( 'extensions' => 'php', 'test' => 'test', ), 'roles' => array( 'php' => 'php', 'html' => 'php', '*' => 'php', ), // Define exceptions of previously defined role mappings, // this part uses real file names and no directories. 'exceptions' => array( 'VERSION' => 'doc', 'HELP_MY_TESTS_DONT_WORK_ANYMORE' => 'doc', 'LICENSE' => 'doc', 'README' => 'doc', ), ) ); // PEAR error checking if (PEAR::isError($e)) { die($e->getMessage()); } // Set misc package information $pkg->setPackage($package); $pkg->setSummary($summary); $pkg->setDescription($description); $pkg->setChannel($channel); $pkg->setReleaseStability('alpha'); $pkg->setAPIStability('stable'); $pkg->setReleaseVersion($version); $pkg->setAPIVersion($version); $pkg->setLicense($license); $pkg->setNotes($notes); // Our package contains PHP files (not C extension files) $pkg->setPackageType('php'); // Must be available in new package.xml format $pkg->setPhpDep('4.3.0'); $pkg->setPearinstallerDep('1.4.6'); // Create the current release and add it to the package definition $pkg->addRelease(); // Package release needs a maintainer $pkg->addMaintainer('lead', 'lastcraft', 'Marcus Baker', 'marcus@lastcraft.com'); $pkg->addMaintainer('developer', 'tswicegood', 'Travis Swicegood', 'tswicegood@users.sourceforge.net'); $pkg->addMaintainer('helper', 'jsweat', 'Jason Sweat', 'jsweat_php@yahoo.com'); $pkg->addMaintainer('helper', 'pp11', 'Perrick Penet', 'perrick@noparking.net'); $pkg->addMaintainer('helper', 'shpikat', 'Constantine Shpikat', 'shpikat@users.sourceforge.net'); $pkg->addMaintainer('helper', 'demianturner', 'Demian Turner', 'demian@phpkitchen.com'); // Internally generate the XML for our package.xml (does not perform output!) $test = $pkg->generateContents(); // If called without "make" parameter, we just want to debug the generated // package.xml file and want to receive additional information on error. if (isset($_GET['make']) || (isset($_SERVER['argv'][1]) && $_SERVER['argv'][1] == 'make')) { $e = $pkg->writePackageFile(); #$e = $packagexml->writePackageFile(); } else { $e = $pkg->debugPackageFile(); #$e = $packagexml->writePackageFile(); } if (PEAR::isError($e)) { echo $e->getMessage(); } ?>