forked from pear/Net_FTP
-
Notifications
You must be signed in to change notification settings - Fork 0
/
generate_package_xml.php
130 lines (106 loc) · 3.71 KB
/
generate_package_xml.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
<?php
/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
/**
* File to generate a package.xml for a new Net_FTP release
*
* PHP versions 4 and 5
*
* LICENSE: This source file is subject to version 3.0 of the PHP license
* that is available through the world-wide-web at the following URI:
* http://www.php.net/license/3_0.txt. If you did not receive a copy of
* the PHP License and are unable to obtain it through the web, please
* send a note to [email protected] so we can mail you a copy immediately.
*
* @category Networking
* @package FTP
* @author Tobias Schlitt <[email protected]>
* @copyright 1997-2005 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
* @version CVS: $Id$
* @link http://pear.php.net/package/Net_FTP
* @since File available since Release 1.3.0
*/
require_once 'PEAR/PackageFileManager2.php';
/**
* Dump an error
*
* @param PEAR_Error $err The error object
*
* @return void
*/
function dumpError($err)
{
echo $err->getMessage();
exit;
}
$cvsdir = '/cvs/pear/';
$packagedir = $cvsdir . 'Net_FTP/';
$current_version = '1.4.0a3';
$current_stability = 'alpha';
$summary =
'Net_FTP provides an OO interface to the PHP FTP functions plus some additions';
$description =
'Net_FTP allows you to communicate with FTP servers in a more comfortable way
than the native FTP functions of PHP do. The class implements everything natively
supported by PHP and additionally features like recursive up- and downloading,
dircreation and chmodding. It also implements an observer pattern to allow
for example the view of a progress bar.';
$current_notes =
'* Fixed Bug #13946: Test Failed : testPutRecursive
* Fixed Bug #14513: Timestamp when using the LS function
* Implemented Request #14773: setPassive possible before connecting';
PEAR::setErrorHandling(PEAR_ERROR_CALLBACK, 'dumpError');
$p2 = new PEAR_PackageFileManager2();
$p2->setOptions(array(
'baseinstalldir' => '/',
'filelistgenerator' => 'cvs',
'packagedirectory' => dirname(__FILE__),
'include' => array(),
'ignore' => array(
'package.xml',
'package2.xml',
'*.tgz',
'generate*',
'doc*',
),
'dir_roles' => array(
'tests' => 'test',
'example' => 'doc'
),
'simpleoutput' => true,
));
$p2->setPackage('Net_FTP');
$p2->setSummary($summary);
$p2->setDescription($description);
$p2->setChannel('pear.php.net');
$p2->setPackageType('php');
$p2->addGlobalReplacement('package-info', '@package_version@', 'version');
$p2->generateContents();
$p2->setReleaseVersion($current_version);
$p2->setAPIVersion('1.4.0');
$p2->setReleaseStability($current_stability);
$p2->setAPIStability('stable');
$p2->setNotes($current_notes);
$p2->addGlobalReplacement('package-info', '@package_version@', 'version');
$p2->addInstallAs('tests/AllTests.php', 'AllTests.php');
$p2->addInstallAs('tests/Net_FTPTest.php', 'Net_FTPTest.php');
$p2->addInstallAs('tests/config.php.dist', 'config.php.dist');
$p2->addInstallAs('tests/testfile.dat', 'testfile.dat');
$p2->addInstallAs('tests/extensions.ini', 'extensions.ini');
$p2->addRelease();
$p2->addMaintainer('lead', 'jorrit', 'Jorrit Schippers', '[email protected]',
'yes');
$p2->addMaintainer('lead', 'toby', 'Tobias Schlitt', '[email protected]', 'no');
$p2->setPhpDep('4.3.0');
$p2->setPearinstallerDep('1.3.0');
$p2->setLicense('PHP License', 'http://www.php.net/license');
$p2->addExtensionDep('required', 'ftp');
if (isset($_GET['make']) ||
(isset($_SERVER['argv']) && @$_SERVER['argv'][1] == 'make')) {
echo "Writing package file\n";
$p2->writePackageFile();
} else {
echo "Debugging package file\n";
$p2->debugPackageFile();
}
?>