| 1 |
lars |
1 |
<?php
|
|
|
2 |
set_time_limit(0);
|
|
|
3 |
require_once('PEAR/PackageFileManager.php');
|
|
|
4 |
require_once('PEAR/PackageFileManager2.php');
|
|
|
5 |
PEAR::setErrorHandling(PEAR_ERROR_DIE);
|
|
|
6 |
|
|
|
7 |
$packagedir = dirname(dirname(__FILE__));
|
|
|
8 |
$notes = '
|
|
|
9 |
Includes these PEAR items:
|
|
|
10 |
* Bug #11654: @static in DocBlock Template can cause PHP Notice [ashnazg|mvriel]
|
|
|
11 |
* Bug #11813: @link URL short description does'nt work [ashnazg]
|
|
|
12 |
* Bug #13800: Invalid tutorials tree generation [ashnazg|wrzasq]
|
|
|
13 |
* Bug #14191: earthli template contains bad HTML [ashnazg|jorrit]
|
|
|
14 |
* Bug #14472: Incorrect line numbers with heredoc [ashnazg|indigo]
|
|
|
15 |
* Bug #15517: Wrong table of contents in tutorials [ashnazg]
|
|
|
16 |
* Bug #16431: Warning: get_class() expects parameter 1 to be object, string given [ashnazg|aharvey]
|
|
|
17 |
* Bug #16441: Parse error when parsing <<foo>> [ashnazg|marcusson]
|
|
|
18 |
* Bug #16446: Use of split() causes E_DEPRECATED warnings [ashnazg|aharvey]
|
|
|
19 |
* Feature #13599: Third Gotcha on Bare Minimum Tutorial example [ashnazg]
|
|
|
20 |
* Feature #14312: @param tag with additional arguments doesn't work as expected [ashnazg]
|
|
|
21 |
* Feature #14461: Data Type Confusion for Some Tags [ashnazg]
|
|
|
22 |
|
|
|
23 |
|
|
|
24 |
Includes these Sourceforge items:
|
|
|
25 |
* [2692032] use of templatebase - missing information [ashnazg]
|
|
|
26 |
* [2669256] get_class() expects parameter 1 to be object, string given [ashnazg]
|
|
|
27 |
* [2669110] ereg / split is deprecated [ashnazg]
|
|
|
28 |
* [1940914] Tutorials tree is added to tutorials which have no children [ashnazg|wrzasq]
|
|
|
29 |
* [1929926] Default version number not updated [ashnazg]
|
|
|
30 |
* [1918851] @toc render is wrong in earthli tutorial_toc.tpl [ashnazg]
|
|
|
31 |
* [1903136] Constant Link not worked [ashnazg|scholesmafia]
|
|
|
32 |
* [1771553] @link URL short description does\'nt work [ashnazg]
|
|
|
33 |
|
|
|
34 |
';
|
|
|
35 |
$version = '1.4.3';
|
|
|
36 |
$release_stability = 'stable';
|
|
|
37 |
$api = '1.4.0';
|
|
|
38 |
$api_stability = 'stable';
|
|
|
39 |
$options = array(
|
|
|
40 |
'baseinstalldir' => 'PhpDocumentor',
|
|
|
41 |
'version' => $version,
|
|
|
42 |
'packagedirectory' => $packagedir,
|
|
|
43 |
'filelistgenerator' => 'cvs',
|
|
|
44 |
'notes' => $notes,
|
|
|
45 |
'package' => 'PhpDocumentor',
|
|
|
46 |
'dir_roles' => array(
|
|
|
47 |
'Documentation' => 'doc',
|
|
|
48 |
'docbuilder' => 'data',
|
|
|
49 |
'HTML_TreeMenu-1.1.2' => 'data',
|
|
|
50 |
'tutorials' => 'doc',
|
|
|
51 |
'tests' => 'test',
|
|
|
52 |
),
|
|
|
53 |
'simpleoutput' => true,
|
|
|
54 |
'exceptions' =>
|
|
|
55 |
array(
|
|
|
56 |
'index.html' => 'data',
|
|
|
57 |
'README' => 'doc',
|
|
|
58 |
'ChangeLog' => 'doc',
|
|
|
59 |
'LICENSE' => 'doc',
|
|
|
60 |
'poweredbyphpdoc.gif' => 'data',
|
|
|
61 |
'INSTALL' => 'doc',
|
|
|
62 |
'FAQ' => 'doc',
|
|
|
63 |
'Authors' => 'doc',
|
|
|
64 |
'Release-1.4.3' => 'doc',
|
|
|
65 |
'pear-phpdoc' => 'script',
|
|
|
66 |
'pear-phpdoc.bat' => 'script',
|
|
|
67 |
'HTML_TreeMenu-1.1.2/TreeMenu.php' => 'php',
|
|
|
68 |
'phpDocumentor/Smarty-2.6.0/libs/debug.tpl' => 'php',
|
|
|
69 |
'new_phpdoc.php' => 'data',
|
|
|
70 |
'phpdoc.php' => 'data',
|
|
|
71 |
'scripts/makedoc.sh' => 'php',
|
|
|
72 |
),
|
|
|
73 |
'ignore' =>
|
|
|
74 |
array('package.xml',
|
|
|
75 |
'*templates/PEAR/*',
|
|
|
76 |
),
|
|
|
77 |
'installexceptions' => array('pear-phpdoc' => '/', 'pear-phpdoc.bat' => '/'),
|
|
|
78 |
);
|
|
|
79 |
$pfm2 = PEAR_PackageFileManager2::importOptions(dirname(dirname(__FILE__))
|
|
|
80 |
. DIRECTORY_SEPARATOR . 'package.xml', array_merge($options, array('packagefile' => 'package.xml')));
|
|
|
81 |
$pfm2->setReleaseVersion($version);
|
|
|
82 |
$pfm2->setReleaseStability($release_stability);
|
|
|
83 |
$pfm2->setAPIVersion($api);
|
|
|
84 |
$pfm2->setAPIStability($api_stability);
|
|
|
85 |
$pfm2->setLicense('LGPL', 'http://www.opensource.org/licenses/lgpl-license.php');
|
|
|
86 |
$pfm2->setNotes($notes);
|
|
|
87 |
$pfm2->clearDeps();
|
|
|
88 |
$pfm2->setPhpDep('4.2.0');
|
|
|
89 |
$pfm2->setPearinstallerDep('1.4.6');
|
|
|
90 |
$pfm2->addPackageDepWithChannel('optional', 'XML_Beautifier', 'pear.php.net', '1.1');
|
|
|
91 |
$pfm2->addReplacement('pear-phpdoc', 'pear-config', '@PHP-BIN@', 'php_bin');
|
|
|
92 |
$pfm2->addReplacement('pear-phpdoc.bat', 'pear-config', '@PHP-BIN@', 'php_bin');
|
|
|
93 |
$pfm2->addReplacement('pear-phpdoc.bat', 'pear-config', '@BIN-DIR@', 'bin_dir');
|
|
|
94 |
$pfm2->addReplacement('pear-phpdoc.bat', 'pear-config', '@PEAR-DIR@', 'php_dir');
|
|
|
95 |
$pfm2->addReplacement('pear-phpdoc.bat', 'pear-config', '@DATA-DIR@', 'data_dir');
|
|
|
96 |
$pfm2->addReplacement('README', 'package-info', '@VER@', 'version');
|
|
|
97 |
$pfm2->addReplacement('README', 'package-info', '@STABILITY@', 'state');
|
|
|
98 |
$pfm2->addReplacement('docbuilder/includes/utilities.php', 'pear-config', '@DATA-DIR@', 'data_dir');
|
|
|
99 |
$pfm2->addReplacement('docbuilder/builder.php', 'pear-config', '@DATA-DIR@', 'data_dir');
|
|
|
100 |
$pfm2->addReplacement('docbuilder/file_dialog.php', 'pear-config', '@DATA-DIR@', 'data_dir');
|
|
|
101 |
$pfm2->addReplacement('docbuilder/file_dialog.php', 'pear-config', '@WEB-DIR@', 'data_dir');
|
|
|
102 |
$pfm2->addReplacement('docbuilder/actions.php', 'pear-config', '@WEB-DIR@', 'data_dir');
|
|
|
103 |
$pfm2->addReplacement('docbuilder/top.php', 'pear-config', '@DATA-DIR@', 'data_dir');
|
|
|
104 |
$pfm2->addReplacement('docbuilder/config.php', 'pear-config', '@DATA-DIR@', 'data_dir');
|
|
|
105 |
$pfm2->addReplacement('docbuilder/config.php', 'pear-config', '@WEB-DIR@', 'data_dir');
|
|
|
106 |
$pfm2->addReplacement('phpDocumentor/Setup.inc.php', 'pear-config', '@DATA-DIR@', 'data_dir');
|
|
|
107 |
$pfm2->addReplacement('phpDocumentor/Converter.inc', 'pear-config', '@DATA-DIR@', 'data_dir');
|
|
|
108 |
$pfm2->addReplacement('phpDocumentor/Classes.inc', 'package-info', '@VER@', 'version');
|
|
|
109 |
$pfm2->addReplacement('phpDocumentor/DescHTML.inc', 'package-info', '@VER@', 'version');
|
|
|
110 |
$pfm2->addReplacement('phpDocumentor/DocBlockTags.inc', 'package-info', '@VER@', 'version');
|
|
|
111 |
$pfm2->addReplacement('phpDocumentor/Errors.inc', 'package-info', '@VER@', 'version');
|
|
|
112 |
$pfm2->addReplacement('phpDocumentor/EventStack.inc', 'package-info', '@VER@', 'version');
|
|
|
113 |
$pfm2->addReplacement('phpDocumentor/common.inc.php', 'package-info', '@VER@', 'version');
|
|
|
114 |
$pfm2->addReplacement('phpDocumentor/common.inc.php', 'pear-config', '@PEAR-DIR@', 'php_dir');
|
|
|
115 |
$pfm2->addReplacement('phpDocumentor/HighlightParser.inc', 'package-info', '@VER@', 'version');
|
|
|
116 |
$pfm2->addReplacement('phpDocumentor/InlineTags.inc', 'package-info', '@VER@', 'version');
|
|
|
117 |
$pfm2->addReplacement('phpDocumentor/IntermediateParser.inc', 'package-info', '@VER@', 'version');
|
|
|
118 |
$pfm2->addReplacement('phpDocumentor/IntermediateParser.inc', 'pear-config', '@PEAR-DIR@', 'php_dir');
|
|
|
119 |
$pfm2->addReplacement('phpDocumentor/LinkClasses.inc', 'package-info', '@VER@', 'version');
|
|
|
120 |
$pfm2->addReplacement('phpDocumentor/PackagePageElements.inc', 'package-info', '@VER@', 'version');
|
|
|
121 |
$pfm2->addReplacement('phpDocumentor/ParserData.inc', 'package-info', '@VER@', 'version');
|
|
|
122 |
$pfm2->addReplacement('phpDocumentor/phpDocumentorTParser.inc', 'package-info', '@VER@', 'version');
|
|
|
123 |
$pfm2->addReplacement('phpDocumentor/phpDocumentorTWordParser.inc', 'package-info', '@VER@', 'version');
|
|
|
124 |
$pfm2->addReplacement('phpDocumentor/ProceduralPages.inc', 'package-info', '@VER@', 'version');
|
|
|
125 |
$pfm2->addReplacement('phpDocumentor/Publisher.inc', 'package-info', '@VER@', 'version');
|
|
|
126 |
$pfm2->addReplacement('phpDocumentor/TutorialHighlightParser.inc', 'package-info', '@VER@', 'version');
|
|
|
127 |
$pfm2->addReplacement('phpDocumentor/WordParser.inc', 'package-info', '@VER@', 'version');
|
|
|
128 |
$pfm2->addReplacement('phpDocumentor/XMLpackagePageParser.inc', 'package-info', '@VER@', 'version');
|
|
|
129 |
$pfm2->addReplacement('user/pear-makedocs.ini', 'pear-config', '@PEAR-DIR@', 'php_dir');
|
|
|
130 |
$pfm2->addReplacement('user/pear-makedocs.ini', 'pear-config', '@DOC-DIR@', 'doc_dir');
|
|
|
131 |
$pfm2->addReplacement('user/pear-makedocs.ini', 'package-info', '@VER@', 'version');
|
|
|
132 |
$pfm2->addRole('inc', 'php');
|
|
|
133 |
$pfm2->addRole('sh', 'script');
|
|
|
134 |
$pfm2->addUnixEol('pear-phpdoc');
|
|
|
135 |
$pfm2->addUnixEol('phpdoc');
|
|
|
136 |
$pfm2->addWindowsEol('pear-phpdoc.bat');
|
|
|
137 |
$pfm2->addWindowsEol('phpdoc.bat');
|
|
|
138 |
$pfm2->generateContents();
|
|
|
139 |
$pfm2->setPackageType('php');
|
|
|
140 |
$pfm2->addRelease();
|
|
|
141 |
$pfm2->setOsInstallCondition('windows');
|
|
|
142 |
// these next few files are only used if the archive is extracted as-is
|
|
|
143 |
// without installing via "pear install blah"
|
|
|
144 |
$pfm2->addIgnoreToRelease("phpdoc");
|
|
|
145 |
$pfm2->addIgnoreToRelease('phpdoc.bat');
|
|
|
146 |
$pfm2->addIgnoreToRelease('user/makedocs.ini');
|
|
|
147 |
$pfm2->addIgnoreToRelease('scripts/makedoc.sh');
|
|
|
148 |
$pfm2->addInstallAs('pear-phpdoc', 'phpdoc');
|
|
|
149 |
$pfm2->addInstallAs('pear-phpdoc.bat', 'phpdoc.bat');
|
|
|
150 |
$pfm2->addInstallAs('user/pear-makedocs.ini', 'user/makedocs.ini');
|
|
|
151 |
$pfm2->addRelease();
|
|
|
152 |
// these next two files are only used if the archive is extracted as-is
|
|
|
153 |
// without installing via "pear install blah"
|
|
|
154 |
$pfm2->addIgnoreToRelease("phpdoc");
|
|
|
155 |
$pfm2->addIgnoreToRelease('phpdoc.bat');
|
|
|
156 |
$pfm2->addIgnoreToRelease('user/makedocs.ini');
|
|
|
157 |
$pfm2->addIgnoreToRelease('pear-phpdoc.bat');
|
|
|
158 |
$pfm2->addInstallAs('pear-phpdoc', 'phpdoc');
|
|
|
159 |
$pfm2->addInstallAs('user/pear-makedocs.ini', 'user/makedocs.ini');
|
|
|
160 |
if (isset($_GET['make']) || (isset($_SERVER['argv'][1]) && $_SERVER['argv'][1] == 'make')) {
|
|
|
161 |
$pfm2->writePackageFile();
|
|
|
162 |
} else {
|
|
|
163 |
$pfm2->debugPackageFile();
|
|
|
164 |
}
|
|
|
165 |
if (!isset($_GET['make']) && !(isset($_SERVER['argv'][1]) && $_SERVER['argv'][1] == 'make')) {
|
|
|
166 |
echo '<a href="' . $_SERVER['PHP_SELF'] . '?make=1">Make this file</a>';
|
|
|
167 |
}
|
|
|
168 |
?>
|