Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

file 96 lines (83 sloc) 3.016 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96
<?php
/**
* script to automate the generation of the
* package.xml file.
*
* $Id$
*
* @author Stephan Schmidt <schst@php-tools.net>
* @package Date_Holidays
* @subpackage Tools
*/

/**
* uses PackageFileManager
*/
require_once 'PEAR/PackageFileManager.php';

/**
* current version
*/
$version = '0.15.0';

/**
* current state
*/
$state = 'alpha';

/**
* release notes
*/
$notes = <<<EOT
- Implemented request #5764 : Methods to get installed drivers and filters (schst)
- Added driver for calculation of Swedish holidays, feature-request: #6350 (luckec)
EOT;

/**
* package description
*/
$description = <<<EOT
Date_Holidays helps you calculating the dates and titles of holidays and other special celebrations. The calculation is driver-based so it is easy to add new drivers that calculate a country's holidays. The methods of the class can be used to get a holiday's date and title in various languages.
EOT;

$package = new PEAR_PackageFileManager();

$result = $package->setOptions(array(
    'package' => 'Date_Holidays',
    'summary' => 'Driver based class to calculate holidays.',
    'description' => $description,
    'version' => $version,
    'state' => $state,
    'license' => 'PHP License',
    'filelistgenerator' => 'cvs',
    'ignore' => array(
            'mkSource.php', 'package.php', 'package.xml', 'package2.xml', 'test.php', 'docs/',
            'tests/test_missingLocale.php', 'tests/test_getHolidays.php',
            'tests/testHolidays2005stampsAndSavingsDay.php', '*.zargo', '*.pdf', '*.sh', 'data/',
            'util/', 'TODO', 'updatePear.php', 'changelog'),
    'notes' => $notes,
    'simpleoutput' => true,
    'baseinstalldir' => 'Date',
    'packagedirectory' => dirname(__FILE__),
    'dir_roles' => array(
                                 'examples' => 'doc',
                                 'tests' => 'test',
                                 'lang' => 'data'
                                 )
    ));

if (PEAR::isError($result)) {
    echo $result->getMessage();
    die();
}

$package->addMaintainer('luckec', 'lead', 'Carsten Lucke', 'luckec@php.net');
$package->addMaintainer('schst', 'contributor', 'Stephan Schmidt', 'schst@php.net');
$package->addMaintainer('wiesemann', 'contributor', 'Mark Wiesemann', 'wiesemann@php.net');

$package->addDependency('PEAR', '1.3.1', 'ge', 'pkg', false);
$package->addDependency('Date', '', 'has', 'pkg', false);
$package->addDependency('XML_Serializer', '', 'has', 'pkg', false);
$package->addDependency('Console_Getargs', '', 'has', 'pkg', true);

if (isset($_GET['make']) || (isset($_SERVER['argv'][1]) && $_SERVER['argv'][1] == 'make')) {
    $result = $package->writePackageFile();
} else {
    $result = $package->debugPackageFile();
}

if (PEAR::isError($result)) {
    echo 'ERROR: ';
    echo $result->getMessage();
    die();
}

echo '[INFO]: Date_Holidays-' . $version . '.tgz' . "\n";
?>
Something went wrong with that request. Please try again.