-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmakepackage.php
72 lines (63 loc) · 1.9 KB
/
makepackage.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
<?php
/**
* Make package xml for package
*
* PHP version 5
*
* @category Math
* @package Math_GeographicPoint
* @author Lars Olesen <[email protected]>
* @copyright 2007 The authors
* @license GPL http://www.opensource.org/licenses/gpl-license.php
* @version @package-version@
* @link http://public.intraface.dk
*/
$version = '0.0.1';
$stability = 'alpha';
$notes = 'x';
require_once 'PEAR/PackageFileManager2.php';
PEAR::setErrorHandling(PEAR_ERROR_DIE);
$pfm = new PEAR_PackageFileManager2();
$pfm->setOptions(
array(
'baseinstalldir' => 'Math',
'filelistgenerator' => 'file',
'packagedirectory' => dirname(__FILE__),
'packagefile' => 'package.xml',
'ignore' => array(
'generate_package_xml.php',
'*.tgz'
),
'dir_roles' => array(
),
'exceptions' => array(
),
'simpleoutput' => true,
)
);
$pfm->setPackage('Math_GeographicPoint');
$pfm->setSummary('xx');
$pfm->setDescription('xx');
$pfm->setUri('http://localhost/');
$pfm->setLicense('LGPL License', 'http://www.gnu.org/licenses/lgpl.html');
$pfm->addMaintainer('lead', 'lsolesen', 'Lars Olesen', '[email protected]');
$pfm->setPackageType('php');
$pfm->setAPIVersion($version);
$pfm->setReleaseVersion($version);
$pfm->setAPIStability($stability);
$pfm->setReleaseStability($stability);
$pfm->setNotes($notes);
$pfm->addRelease();
$pfm->addGlobalReplacement('package-info', '@package-version@', 'version');
$pfm->clearDeps();
$pfm->setPhpDep('4.3.0');
$pfm->setPearinstallerDep('1.5.0');
$pfm->generateContents();
if (isset($_GET['make']) || (isset($_SERVER['argv']) && @$_SERVER['argv'][1] == 'make')) {
if ($pfm->writePackageFile()) {
exit('package file written');
}
} else {
$pfm->debugPackageFile();
}
?>