-
Notifications
You must be signed in to change notification settings - Fork 1.4k
/
package.php
75 lines (61 loc) · 1.71 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
<?php
require_once 'PEAR/PackageFileManager2.php';
PEAR::setErrorHandling(PEAR_ERROR_DIE);
$api_version = '0.0.0';
$api_state = 'alpha';
$release_version = '0.0.0';
$release_state = 'alpha';
$release_notes = "No release notes.";
$description = <<<DESC
A JWT encoder/decoder.
DESC;
$package = new PEAR_PackageFileManager2();
$package->setOptions(
array(
'filelistgenerator' => 'file',
'simpleoutput' => true,
'baseinstalldir' => '/',
'packagedirectory' => './',
'dir_roles' => array(
'tests' => 'test'
),
'ignore' => array(
'package.php',
'*.tgz'
)
)
);
$package->setPackage('JWT');
$package->setSummary('A JWT encoder/decoder.');
$package->setDescription($description);
$package->setChannel('pear.php.net');
$package->setPackageType('php');
$package->setLicense(
'MIT License',
'http://creativecommons.org/licenses/MIT/'
);
$package->setNotes($release_notes);
$package->setReleaseVersion($release_version);
$package->setReleaseStability($release_state);
$package->setAPIVersion($api_version);
$package->setAPIStability($api_state);
$package->addMaintainer(
'lead',
'lcfrs',
'Neuman Vong',
);
$package->addExtensionDep('required', 'json');
$package->addExtensionDep('required', 'hash');
$package->setPhpDep('5.1');
$package->setPearInstallerDep('1.7.0');
$package->generateContents();
$package->addRelease();
if ( isset($_GET['make'])
|| (isset($_SERVER['argv']) && @$_SERVER['argv'][1] == 'make')
) {
$package->writePackageFile();
} else {
$package->debugPackageFile();
}
?>