forked from Azure/azure-sdk-for-php
-
Notifications
You must be signed in to change notification settings - Fork 0
/
package.php
68 lines (64 loc) · 2.54 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
<?php
/**
* LICENSE: Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* PHP version 5
*
* @category Microsoft
* @package WindowsAzure
* @author Azure PHP SDK <[email protected]>
* @copyright 2012 Microsoft Corporation
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0
* @link https://github.com/windowsazure/azure-sdk-for-php
*/
require_once 'PEAR/PackageFileManager2.php';
require_once 'Defaults.php';
PEAR::setErrorHandling(PEAR_ERROR_DIE);
$p = &PEAR_PackageFileManager2::importOptions(
dirname(__FILE__) . DIRECTORY_SEPARATOR . 'package.xml',
array(
'packagefile' => 'package.xml',
'ignore' => $ignore,
'filelistgenerator' => 'file',
'packagedirectory' => dirname(__FILE__),
'changelogoldtonew' => false,
'simpleoutput' => false
));
$p->addInclude($include);
$p->setPackage(PACKAGE_NAME);
$p->setSummary(PACKAGE_SUMMARY);
$p->setDescription(PACKAGE_DESCRIPTION);
$p->setNotes(PACKAGE_RELEASE_NOTES);
$p->setPackageType('php');
$p->addRelease();
$p->clearDeps();
$p->setChannel(CHANNEL_NAME);
$p->setLicense(PACKAGE_LICENSE, PACKAGE_LICENSE_AGREEMENT);
$p->setReleaseVersion(PACKAGE_RELEASE_VERSION);
$p->setAPIVersion(PACKAGE_API_VERSION);
$p->setReleaseStability(PACKAGE_RELEASE_STATE);
$p->setAPIStability(PACKAGE_API_STATE);
$p->setPhpDep(PACKAGE_MIN_PHP_VERSION);
// If this run twice the lead entry will be duplicated. Make sure that it just run once.
//$p->addMaintainer('lead', 'AzurePHPSDK', 'Azure PHP SDK', '[email protected]');
$p->setPearinstallerDep(PACKAGE_MIN_PEAR_VERSION);
foreach($dependencies as $dependency) {
$p->addPackageDepWithChannel($dependency[0], $dependency[1], $dependency[2]);
}
// The replacement doesn't work check: https://github.com/WindowsAzure/azure-sdk-for-php/issues/413
// $p->addReplacement('WindowsAzure/*.php', 'package-info', '0.3.1_2011-08', 'version');
$p->generateContents();
if (isset($_GET['make']) || (isset($_SERVER['argv']) && @$_SERVER['argv'][1] == 'make')) {
$p->writePackageFile();
} else {
$p->debugPackageFile();
}