-
Notifications
You must be signed in to change notification settings - Fork 10
/
package.php
108 lines (95 loc) · 3.26 KB
/
package.php
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
97
98
99
100
101
102
103
104
105
106
107
108
<?php
/**
* script to automate the generation of the package.xml file.
*
* PHP Versions 4 and 5
*
* $Id$
*
* @category Date
* @package Date_Holidays
* @author Stephan Schmidt <[email protected]>
* @subpackage Tools
* @license http://www.php.net/license/3_01.txt PHP License 3.0.1
* @version CVS: $Id$
* @link http://pear.php.net/package/Date_Holidays
*/
/**
* uses PackageFileManager
*/
require_once 'PEAR/PackageFileManager.php';
/**
* current version
*/
$version = '0.17.2';
/**
* current state
*/
$state = 'alpha';
/**
* release notes
*/
$notes = <<<EOT
- Fixed bug #12807: incorrect holidays computation [kguest]
- Added new drivers and filters for Netherlands (contributed by Jos van der Woude) and Norway (contributed by Vegard Fiksdal)
EOT;
/**
* package description
*/
$description = "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.";
$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' => 'svn',
'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', '[email protected]');
$package->addMaintainer('schst', 'developer', 'Stephan Schmidt', '[email protected]');
$package->addMaintainer('wiesemann', 'contributor', 'Mark Wiesemann', '[email protected]');
$package->addMaintainer('kguest', 'lead', 'Ken Guest', '[email protected]');
$package->addDependency('PEAR', '1.5.6', 'ge', 'pkg', false);
$package->addDependency('Date', '', '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";
?>