<commit_before><?php
/**
 * This file creates a package.xml which describes the pear package to be built.
 * 
 * It provides the package.xml from which you can run pear package and create a 
 * distributable Package.tgz installable through the PEAR installer.
 * 
 * <code>
 * php makepackage.php make && pear package && pear install _______.tgz
 * </code>
 * 
 * PHP version 5
 * 
 * @category  Events 
 * @package   UNL_UCBCN_Frontend
 * @author    <NAME> <<EMAIL>>
 * @copyright 2007 Regents of the University of Nebraska
 * @license   http://www1.unl.edu/wdn/wiki/Software_License BSD License
 * @link      http://pear.unl.edu/
 */

ini_set('display_errors', true);
require_once 'PEAR/PackageFileManager2.php';
require_once 'PEAR/PackageFileManager/File.php';
require_once 'PEAR/Task/Postinstallscript/rw.php';
require_once 'PEAR/Config.php';
require_once 'PEAR/Frontend.php';

/**
 * @var PEAR_PackageFileManager
 */
PEAR::setErrorHandling(PEAR_ERROR_DIE);
chdir(dirname(__FILE__));
$pfm = PEAR_PackageFileManager2::importOptions('package.xml', array(
//$pfm = new PEAR_PackageFileManager2();
//$pfm->setOptions(array(
    'packagedirectory' => dirname(__FILE__),
    'baseinstalldir' => 'UNL/UCBCN',
    'filelistgenerator' => 'cvs',
    'ignore' => array(  'package.xml',
                        '.project',
                        '*.tgz',
                        '*.sh',
                        '*.svg',
                        'makepackage.php',
                        '*CVS/*',
                        '.cache',
                        'install.sh'),
    'simpleoutput' => true,
    'roles'=>array('php'=>'data'    ),
    'exceptions'=>array('UNL_UCBCN_Frontend_setup.php'=>'php',
                        'Frontend.php'=>'php',
                        'Frontend/Month.php'=>'php',
                        'Frontend/Day.php'=>'php',
                        'Frontend/MonthWidget.php'=>'php',
                        'Frontend/NoEvents.php'=>'php',
                        'Frontend/Year.php'=>'php',
                        'Frontend/Search.php'=>'php',
                        'Frontend/Upcoming.php'=>'php',
                        'Frontend/Week.php'=>'php')
));
$pfm->setPackage('UNL_UCBCN_Frontend');
$pfm->setPackageType('php'); // this is a PEAR-style php script package
$pfm->setSummary('A public frontend for a University Event Publishing system.');
$pfm->setDescription('This class extends the UNL UCBCN backend system to create
            a client frontend. It allows users to view the calendar in a list view, thirty
            day view.');
$pfm->setChannel('pear.unl.edu');
$pfm->setAPIStability('beta');
$pfm->setReleaseStability('beta');
$pfm->setAPIVersion('0.5.0');
$pfm->setReleaseVersion('0.5.6');
$pfm->setNotes('
* Javascript fixes for searching. (Alvin Woon)
* Separate Location out into new template file. (<NAME>)
* Fix event check for events starting on the last day of the month, was off by 1. (<NAME>)
* Minor CSS fixes. (Alvin Woon)
* Enhanced print stylesheet for month view. (Alvin Woon)
');

//$pfm->addMaintainer('lead','saltybeagle','<NAME>','<EMAIL>');
//$pfm->addMaintainer('developer','alvinwoon','<NAME>','<EMAIL>');
$pfm->setLicense('BSD License', 'http://www1.unl.edu/wdn/wiki/Software_License');
$pfm->clearDeps();
$pfm->setPhpDep('5.0.0');
$pfm->setPearinstallerDep('1.4.3');
$pfm->addPackageDepWithChannel('required', 'UNL_UCBCN', 'pear.unl.edu', '0.5.0');
$pfm->addPackageDepWithChannel('required', 'Calendar', 'pear.php.net', '0.5.3');
foreach (array('Frontend.php','UNL_UCBCN_Frontend_setup.php','index.php') as $file) {
    $pfm->addReplacement($file, 'pear-config', '@PHP_BIN@', 'php_bin');
    $pfm->addReplacement($file, 'pear-config', '@PHP_DIR@', 'php_dir');
    $pfm->addReplacement($file, 'pear-config', '@DATA_DIR@', 'data_dir');
    $pfm->addReplacement($file, 'pear-config', '@DOC_DIR@', 'doc_dir');
}

$config = PEAR_Config::singleton();
$log    = PEAR_Frontend::singleton();
$task   = new PEAR_Task_Postinstallscript_rw($pfm, $config, $log,
    array('name' => 'UNL_UCBCN_Frontend_setup.php', 'role' => 'php'));
$task->addParamGroup('questionCreate', array(
    $task->getParam('createtemplate', 'Create/Upgrade default templates?', 'string', 'yes'),
    $task->getParam('createindex', 'Create/Upgrade sample index page?', 'string', 'yes'),
    ));
$task->addParamGroup('fileSetup', array(
    $task->getParam('docroot', 'Path to root of webserver', 'string', '/Library/WebServer/Documents/events'),
    $task->getParam('template', 'Template style to use', 'string', 'default')
    ));

$pfm->addPostinstallTask($task, 'UNL_UCBCN_Frontend_setup.php');
$pfm->generateContents();
if (isset($_SERVER['argv']) && $_SERVER['argv'][1] == 'make') {
    $pfm->writePackageFile();
} else {
    $pfm->debugPackageFile();
}
?><commit_msg>Ignore tests - do not package these files.<commit_after><?php
/**
 * This file creates a package.xml which describes the pear package to be built.
 * 
 * It provides the package.xml from which you can run pear package and create a 
 * distributable Package.tgz installable through the PEAR installer.
 * 
 * <code>
 * php makepackage.php make && pear package && pear install _______.tgz
 * </code>
 * 
 * PHP version 5
 * 
 * @category  Events 
 * @package   UNL_UCBCN_Frontend
 * @author    <NAME> <<EMAIL>>
 * @copyright 2007 Regents of the University of Nebraska
 * @license   http://www1.unl.edu/wdn/wiki/Software_License BSD License
 * @link      http://pear.unl.edu/
 */

ini_set('display_errors', true);
require_once 'PEAR/PackageFileManager2.php';
require_once 'PEAR/PackageFileManager/File.php';
require_once 'PEAR/Task/Postinstallscript/rw.php';
require_once 'PEAR/Config.php';
require_once 'PEAR/Frontend.php';

/**
 * @var PEAR_PackageFileManager
 */
PEAR::setErrorHandling(PEAR_ERROR_DIE);
chdir(dirname(__FILE__));
$pfm = PEAR_PackageFileManager2::importOptions('package.xml', array(
//$pfm = new PEAR_PackageFileManager2();
//$pfm->setOptions(array(
    'packagedirectory' => dirname(__FILE__),
    'baseinstalldir' => 'UNL/UCBCN',
    'filelistgenerator' => 'cvs',
    'ignore' => array(  'package.xml',
                        '.project',
                        '*.tgz',
                        '*.sh',
                        '*.svg',
                        'makepackage.php',
                        '*CVS/*',
                        '.cache',
                        'install.sh',
                        '*tests*'),
    'simpleoutput' => true,
    'roles'=>array('php'=>'data'    ),
    'exceptions'=>array('UNL_UCBCN_Frontend_setup.php'=>'php',
                        'Frontend.php'=>'php',
                        'Frontend/Month.php'=>'php',
                        'Frontend/Day.php'=>'php',
                        'Frontend/MonthWidget.php'=>'php',
                        'Frontend/NoEvents.php'=>'php',
                        'Frontend/Year.php'=>'php',
                        'Frontend/Search.php'=>'php',
                        'Frontend/Upcoming.php'=>'php',
                        'Frontend/Week.php'=>'php')
));
$pfm->setPackage('UNL_UCBCN_Frontend');
$pfm->setPackageType('php'); // this is a PEAR-style php script package
$pfm->setSummary('A public frontend for a University Event Publishing system.');
$pfm->setDescription('This class extends the UNL UCBCN backend system to create
            a client frontend. It allows users to view the calendar in a list view, thirty
            day view.');
$pfm->setChannel('pear.unl.edu');
$pfm->setAPIStability('beta');
$pfm->setReleaseStability('beta');
$pfm->setAPIVersion('0.5.0');
$pfm->setReleaseVersion('0.5.6');
$pfm->setNotes('
* Javascript fixes for searching. (<NAME>)
* Separate Location out into new template file. (<NAME>)
* Fix event check for events starting on the last day of the month, was off by 1. (<NAME>)
* Minor CSS fixes. (Alvin Woon)
* Enhanced print stylesheet for month view. (Alvin Woon)
');

//$pfm->addMaintainer('lead','saltybeagle','<NAME>','<EMAIL>');
//$pfm->addMaintainer('developer','alvinwoon','<NAME>','<EMAIL>');
$pfm->setLicense('BSD License', 'http://www1.unl.edu/wdn/wiki/Software_License');
$pfm->clearDeps();
$pfm->setPhpDep('5.0.0');
$pfm->setPearinstallerDep('1.4.3');
$pfm->addPackageDepWithChannel('required', 'UNL_UCBCN', 'pear.unl.edu', '0.5.0');
$pfm->addPackageDepWithChannel('required', 'Calendar', 'pear.php.net', '0.5.3');
foreach (array('Frontend.php','UNL_UCBCN_Frontend_setup.php','index.php') as $file) {
    $pfm->addReplacement($file, 'pear-config', '@PHP_BIN@', 'php_bin');
    $pfm->addReplacement($file, 'pear-config', '@PHP_DIR@', 'php_dir');
    $pfm->addReplacement($file, 'pear-config', '@DATA_DIR@', 'data_dir');
    $pfm->addReplacement($file, 'pear-config', '@DOC_DIR@', 'doc_dir');
}

$config = PEAR_Config::singleton();
$log    = PEAR_Frontend::singleton();
$task   = new PEAR_Task_Postinstallscript_rw($pfm, $config, $log,
    array('name' => 'UNL_UCBCN_Frontend_setup.php', 'role' => 'php'));
$task->addParamGroup('questionCreate', array(
    $task->getParam('createtemplate', 'Create/Upgrade default templates?', 'string', 'yes'),
    $task->getParam('createindex', 'Create/Upgrade sample index page?', 'string', 'yes'),
    ));
$task->addParamGroup('fileSetup', array(
    $task->getParam('docroot', 'Path to root of webserver', 'string', '/Library/WebServer/Documents/events'),
    $task->getParam('template', 'Template style to use', 'string', 'default')
    ));

$pfm->addPostinstallTask($task, 'UNL_UCBCN_Frontend_setup.php');
$pfm->generateContents();
if (isset($_SERVER['argv']) && $_SERVER['argv'][1] == 'make') {
    $pfm->writePackageFile();
} else {
    $pfm->debugPackageFile();
}
?>
{'fraction_non_alphanumeric': 0.18050952775476387, 'fraction_numerical': 0.006213753106876553, 'mean_word_length': 3.373641304347826, 'pattern_counts': {'":': 0, '<': 28, '<?xml version=': 0, '>': 134, 'https://': 0, 'lorem ipsum': 0, 'www.': 4, 'xml': 8}, 'pii_count': 0, 'substrings_counts': 2, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5647704', 'n_tokens_mistral': 3228, 'n_tokens_neox': 3145, 'n_words': 624}