forked from pear/Log
-
Notifications
You must be signed in to change notification settings - Fork 0
/
package.php
63 lines (53 loc) · 2.13 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
<?php
require_once 'PEAR/PackageFileManager2.php';
PEAR::setErrorHandling(PEAR_ERROR_DIE);
$desc = <<<EOT
The Log package provides an abstracted logging framework. It includes output handlers for log files, databases, syslog, email, Firebug, and the console. It also provides composite and subject-observer logging mechanisms.
EOT;
$version = '1.12.8';
$notes = <<<EOT
- The syslog handler now emits PEAR_LOG_* priorities. (pear/Log#1)
EOT;
$package = new PEAR_PackageFileManager2();
$result = $package->setOptions(array(
'filelistgenerator' => 'svn',
'changelogoldtonew' => false,
'simpleoutput' => true,
'baseinstalldir' => '/',
'packagefile' => 'package.xml',
'packagedirectory' => '.'));
if (PEAR::isError($result)) {
echo $result->getMessage();
die();
}
$package->setPackage('Log');
$package->setPackageType('php');
$package->setSummary('Logging Framework');
$package->setDescription($desc);
$package->setChannel('pear.php.net');
$package->setLicense('MIT License', 'http://www.opensource.org/licenses/mit-license.php');
$package->setAPIVersion('1.0.0');
$package->setAPIStability('stable');
$package->setReleaseVersion($version);
$package->setReleaseStability('stable');
$package->setNotes($notes);
$package->setPhpDep('5.0.0');
$package->setPearinstallerDep('1.4.3');
$package->addMaintainer('lead', 'jon', 'Jon Parise', '[email protected]');
$package->addMaintainer('lead', 'chagenbu', 'Chuck Hagenbuch', '[email protected]');
$package->addMaintainer('lead', 'yunosh', 'Jan Schneider', '[email protected]');
$package->addIgnore(array('.gitignore', 'README.rst', 'package.php', 'phpdoc.sh', 'package.xml'));
$package->addPackageDepWithChannel('optional', 'DB', 'pear.php.net', '1.3');
$package->addPackageDepWithChannel('optional', 'MDB2', 'pear.php.net', '2.0.0RC1');
$package->addPackageDepWithChannel('optional', 'Mail', 'pear.php.net');
$package->addExtensionDep('optional', 'sqlite');
$package->generateContents();
if ($_SERVER['argv'][1] == 'commit') {
$result = $package->writePackageFile();
} else {
$result = $package->debugPackageFile();
}
if (PEAR::isError($result)) {
echo $result->getMessage();
die();
}