forked from pear/pearweb
/
package.php
146 lines (140 loc) · 6.55 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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
<?php
require_once 'PEAR/PackageFileManager2.php';
$dir = dirname(__FILE__);
PEAR::setErrorHandling(PEAR_ERROR_DIE);
$a = PEAR_PackageFileManager2::importOptions(
$dir . '/package.xml',
array(
'baseinstalldir' => '/pear.php.net/',
'filelistgenerator' => 'svn',
'roles' => array('*' => 'www'),
'exceptions' => array(
'pearweb.php' => 'php',
),
'simpleoutput' => true,
'ignore' => array(
'*.phar',
'package-*.xml',
'package.php',
'package_*.php',
'tests/',
'weeklynews/',
'scripts/'
),
)
);
$a->setReleaseVersion('1.24.3');
$a->setReleaseStability('stable');
$a->setAPIStability('stable');
$a->setNotes('
Channel list now stored in database (please DROP TABLE channels; and import channels.sql on deployment)
Added ability to activate/deactivate channels
Added application/xbel+xml output of channel list
Upgraded some forms to HTML_QuickForm2, HTML5 controls
Bug #17717 package.xml XSD does not support __uri channels
Bug #18284 Can\'t change password
Bug #18294 Forgot password says: Unknown user "hm2k"
');
$a->resetUsesrole();
$a->clearDeps();
$a->setPhpDep('5.2.3');
$a->setPearInstallerDep('1.8.1');
$a->addPackageDepWithChannel('required', 'PEAR', 'pear.php.net', '1.8.1');
$a->addPackageDepWithChannel('required', 'Archive_Tar', 'pear.php.net', '1.3.2');
$a->addPackageDepWithChannel('required', 'HTTP_Request2', 'pear.php.net');
$a->addPackageDepWithChannel('required', 'Date', 'pear.php.net');
$a->addPackageDepWithChannel('required', 'XML_Feed_Parser', 'pear.php.net');
$a->addPackageDepWithChannel('required', 'Services_Twitter', 'pear.php.net');
$a->addPackageDepWithChannel('required', 'Cache_Lite', 'pear.php.net');
$a->addPackageDepWithChannel('required', 'HTTP', 'pear.php.net', '1.4.0');
$a->addPackageDepWithChannel('required', 'Text_CAPTCHA_Numeral', 'pear.php.net', '1.1.0');
$a->addPackageDepWithChannel('required', 'Services_ProjectHoneyPot', 'pear.php.net', '0.6.0');
// used only in cron jobs
$a->addPackageDepWithChannel('required', 'DB', 'pear.php.net', '1.6.5');
$a->addPackageDepWithChannel('required', 'DB_DataObject', 'pear.php.net', '1.8.5');
$a->addPackageDepWithChannel('required', 'Savant3', 'phpsavant.com', '3.0.0');
$a->addPackageDepWithChannel('required', 'HTML_BBCodeParser', 'pear.php.net', '1.2.1');
$a->addPackageDepWithChannel('required', 'HTML_TagCloud', 'pear.php.net');
$a->addPackageDepWithChannel('required', 'HTML_Table', 'pear.php.net', '1.5');
$a->addPackageDepWithChannel('required', 'HTML_Menu', 'pear.php.net', '2.1.4');
$a->addPackageDepWithChannel('required', 'Pager', 'pear.php.net', '2.2.0');
$a->addPackageDepWithChannel('required', 'PEAR_PackageUpdate', 'pear.php.net', '1.1.0RC1');
//$a->addPackageDepWithChannel('required', 'PEAR_PackageFileManager', 'pear.php.net', '1.6.0');
$a->addPackageDepWithChannel('required', 'Net_URL2', 'pear.php.net', '0.1.0');
$a->addPackageDepWithChannel('required', 'Text_Diff', 'pear.php.net');
$a->addPackageDepWithChannel('required', 'HTTP_Upload', 'pear.php.net', '0.8.1');
$a->addPackageDepWithChannel('required', 'MDB2_Schema', 'pear.php.net', '0.6.0');
$a->addPackageDepWithChannel('required', 'Log', 'pear.php.net', '1.8.4');
$a->addPackageDepWithChannel('required', 'Mail', 'pear.php.net', '1.1.13');
$a->addPackageDepWithChannel('required', 'Services_Trackback', 'pear.php.net', '0.4.0');
$a->addPackageDepWithChannel('required', 'HTML_QuickForm', 'pear.php.net', '3.2.3');
$a->addPackageDepWithChannel('required', 'HTML_QuickForm2', 'pear.php.net', '0.5.0');
// This is used in the admin menu for category
$a->addPackageDepWithChannel('required', 'HTML_TreeMenu', 'pear.php.net', '1.2.0');
$a->addPackageDepWithChannel('required', 'MDB2_Driver_mysqli', 'pear.php.net');
$a->addExtensionDep('required', 'pcre');
$a->addExtensionDep('required', 'mysqli');
$a->addExtensionDep('required', 'fileinfo');
$a->addPackageDepWithChannel('required', 'Graph', 'components.ez.no');
include_once 'PEAR/Config.php';
include_once 'PEAR/PackageFile.php';
$config = &PEAR_Config::singleton();
$p = &new PEAR_PackageFile($config);
// Specify subpackages
$e = $p->fromPackageFile($dir . '/package-channel.xml', PEAR_VALIDATE_NORMAL);
$a->specifySubpackage($e, false);
$b = $p->fromPackageFile($dir . '/package-election.xml', PEAR_VALIDATE_NORMAL);
$a->specifySubpackage($b, false);
$f = $p->fromPackageFile($dir . '/package-gopear.xml', PEAR_VALIDATE_NORMAL);
$a->specifySubpackage($f, false);
$d = $p->fromPackageFile($dir . '/package-index.xml', PEAR_VALIDATE_NORMAL);
$a->specifySubpackage($d, false);
$h = $p->fromPackageFile($dir . '/package-manual.xml', PEAR_VALIDATE_NORMAL);
$a->specifySubpackage($h, false);
$c = $p->fromPackageFile($dir . '/package-pepr.xml', PEAR_VALIDATE_NORMAL);
$a->specifySubpackage($c, false);
$g = $p->fromPackageFile($dir . '/package-qa.xml', PEAR_VALIDATE_NORMAL);
$a->specifySubpackage($g, false);
$script = &$a->initPostinstallScript('pearweb.php');
$script->addParamGroup(
'askdb',
array(
$script->getParam('yesno', 'Update pearweb database?', 'yesno', 'y'),
)
);
$script->addParamGroup(
'init',
array(
$script->getParam('driver', 'Database driver', 'string', 'mysqli'),
$script->getParam('user', 'Database User name', 'string', 'pear'),
$script->getParam('password', 'Database password', 'password', 'pear'),
$script->getParam('host', 'Database host', 'string', 'localhost'),
$script->getParam('database', 'Database name', 'string', 'pear'),
)
);
$script->addParamGroup(
'askhttpd',
array(
$script->getParam('yesno', 'Update httpd.conf to add pearweb? (y/n)', 'yesno', 'y'),
)
);
$script->addParamGroup(
'httpdconf',
array(
$script->getParam('path', 'Full path to httpd.conf', 'string'),
$script->getParam('addnamev', 'Add NameVirtualHost directive? (yes/no)', 'string', 'yes'),
$script->getParam('namehost', 'Virtual Host IP address', 'string', '*'),
$script->getParam('pear', 'PEAR subdomain name', 'string', 'localhost'),
)
);
$a->addPostinstallTask($script, 'pearweb.php');
$a->addReplacement('pearweb.php', 'pear-config', '@www-dir@', 'www_dir');
$a->addReplacement('pearweb.php', 'pear-config', '@php-dir@', 'php_dir');
$a->addReplacement('pearweb.php', 'package-info', '@version@', 'version');
$a->addReplacement('cron/bug-update-php-version.php', 'pear-config', '@www-dir@', 'www_dir');
$a->generateContents();
if (isset($_SERVER['argv']) && @$_SERVER['argv'][1] == 'make') {
$a->writePackageFile();
} else {
$a->debugPackageFile();
}