-
Notifications
You must be signed in to change notification settings - Fork 5
/
package.php
64 lines (52 loc) · 2.38 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
<?php
require_once 'PEAR/PackageFileManager.php';
$version = '1.3.1';
$state = 'stable';
$notes = <<<EOT
- correct package.xml to reflect switch to BSD License
EOT;
$description = <<<EOT
This is an XML parser based on PHPs built-in xml extension.
It supports two basic modes of operation: "func" and "event". In "func" mode, it will look for a function named after each element (xmltag_ELEMENT for start tags and xmltag_ELEMENT_ for end tags), and in "event" mode it uses a set of generic callbacks.
Since version 1.2.0 there's a new XML_Parser_Simple class that makes parsing of most XML documents easier, by automatically providing a stack for the elements.
Furthermore its now possible to split the parser from the handler object, so you do not have to extend XML_Parser anymore in order to parse a document with it.
EOT;
$package = new PEAR_PackageFileManager();
$result = $package->setOptions(array(
'package' => 'XML_Parser',
'summary' => 'XML parsing class based on PHP\'s bundled expat',
'description' => $description,
'version' => $version,
'state' => $state,
'license' => 'BSD License',
'filelistgenerator' => 'cvs',
'ignore' => array('package.php', 'package.xml', 'package2.xml'),
'notes' => $notes,
'simpleoutput' => true,
'baseinstalldir' => 'XML',
'packagedirectory' => './',
'dir_roles' => array('docs' => 'doc',
'examples' => 'doc',
'tests' => 'test',
)
));
if (PEAR::isError($result)) {
echo $result->getMessage();
die();
}
$package->addMaintainer('schst', 'lead', 'Stephan Schmidt', 'schst@php-tools.net');
$package->addMaintainer('ssb', 'developer', 'Stig Sæther Bakken', 'stig@php.net');
$package->addMaintainer('cox', 'developer', 'Tomas V.V.Cox', 'cox@php.net');
$package->addMaintainer('ashnazg', 'lead', 'Chuck Burgess', 'ashnazg@php.net');
$package->addDependency('PEAR', '', 'has', 'pkg', false);
$package->addDependency('php', '4.2.0', 'ge', 'php', false);
if (isset($_GET['make']) || (isset($_SERVER['argv'][1]) && $_SERVER['argv'][1] == 'make')) {
$result = $package->writePackageFile();
} else {
$result = $package->debugPackageFile();
}
if (PEAR::isError($result)) {
echo $result->getMessage();
die();
}
?>