$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'); $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');
$pkg->setPhpDep('4.3.0'); $pkg->setPearinstallerDep('1.4.2'); // Require custom file role for our web installation $pkg->addPackageDepWithChannel('required', 'Role_Web', 'pearified.com'); // Geeklog Required Packages. In a 'typcial' for non-core plugins this wouldn't happen and // instead the plugins would require a specific version of Geeklog. In fact, for non-core // plugins (e.g. Forum, File Manager, etc) that's exactly what should happen $pkg->addPackageDepWithChannel('required', 'Geeklog_FCKeditor', 'pear.geeklog.net', '2.3.1'); $pkg->addPackageDepWithChannel('required', 'Geeklog_Layout_Professional', 'pear.geeklog.net', $currentGeeklogVersion); $pkg->addPackageDepWithChannel('required', 'Geeklog_Plugin_Calendar', 'pear.geeklog.net', '1.0.2'); $pkg->addPackageDepWithChannel('required', 'Geeklog_Plugin_Links', 'pear.geeklog.net', '1.1.1'); $pkg->addPackageDepWithChannel('required', 'Geeklog_Plugin_Polls', 'pear.geeklog.net', '2.0.1'); $pkg->addPackageDepWithChannel('required', 'Geeklog_Plugin_Spamx', 'pear.geeklog.net', '1.1.1'); $pkg->addPackageDepWithChannel('required', 'Geeklog_Plugin_Staticpages', 'pear.geeklog.net', '1.4.4'); // Define that we will use our custom file role in this script $pkg->addUsesRole('web', 'Webfiles'); // Mapping misc roles to file name extensions $pkg->addRole('', 'web'); $pkg->addRole('png', 'web'); $pkg->addRole('gif', 'web'); $pkg->addRole('jpeg', 'web'); // Create the current release and add it to the package definition $pkg->addRelease(); // Package release needs a maintainer $pkg->addMaintainer('lead', 'tony', 'Tony Bibbs', '*****@*****.**'); // 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($argv[1]) and $argv[1] === 'make') { $pkg->writePackageFile();