-
Notifications
You must be signed in to change notification settings - Fork 30
/
package.php
182 lines (160 loc) · 4.75 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
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
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
<?php
/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
/**
* This is the package.xml generator for Crypt_GPG
*
* LICENSE:
*
* This library is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation; either version 2.1 of the
* License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, see
* <http://www.gnu.org/licenses/>
*
* @category Encryption
* @package Crypt_GPG
* @author Michael Gauthier <mike@silverorange.com>
* @author Nathan Fredrikson <nathan@silverorange.com>
* @copyright 2005-2013 silverorange
* @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1
* @link http://pear.php.net/package/Crypt_GPG
*/
require_once 'PEAR/PackageFileManager2.php';
PEAR::setErrorHandling(PEAR_ERROR_DIE);
$apiVersion = '1.6.8';
$apiState = 'stable';
$releaseVersion = '1.6.9';
$releaseState = 'stable';
$releaseNotes = "Fix numerous PHPDoc and code issues found by static code analyzer [alec].";
$description = "This package provides an object oriented interface to GNU Privacy " .
"Guard (GnuPG). It requires the GnuPG executable to be on the system.\n\n" .
"Though GnuPG can support symmetric-key cryptography, this package is " .
"intended only to facilitate public-key cryptography.\n\n" .
"This package requires PHP version 5.4.8 or greater.";
$package = new PEAR_PackageFileManager2();
$package->setOptions(
array(
'filelistgenerator' => 'file',
'simpleoutput' => true,
'baseinstalldir' => '/',
'packagedirectory' => './',
'dir_roles' => array(
'Crypt' => 'php',
'Crypt/GPG' => 'php',
'tests' => 'test',
'data' => 'data'
),
'exceptions' => array(
'LICENSE' => 'doc',
'README.md' => 'doc',
'scripts/crypt-gpg-pinentry' => 'script'
),
'ignore' => array(
'tests/config.php',
'tests/debug.log',
'tests/.phpunit.result.cache',
'tools/',
'package.php',
'phpstan',
'phpstan.neon',
'composer.json',
'composer.lock',
'*.tgz',
'vendor/'
),
'installexceptions' => array(
'scripts/crypt-gpg-pinentry' => '/'
)
)
);
$package->setPackage('Crypt_GPG');
$package->setSummary('GNU Privacy Guard (GnuPG)');
$package->setDescription($description);
$package->setChannel('pear.php.net');
$package->setPackageType('php');
$package->setLicense('LGPL', 'http://www.gnu.org/copyleft/lesser.html');
$package->setNotes($releaseNotes);
$package->setReleaseVersion($releaseVersion);
$package->setReleaseStability($releaseState);
$package->setAPIVersion($apiVersion);
$package->setAPIStability($apiState);
$package->addMaintainer(
'lead',
'gauthierm',
'Mike Gauthier',
'mike@silverorange.com'
);
$package->addMaintainer(
'lead',
'nrf',
'Nathan Fredrickson',
'nathan@silverorange.com'
);
$package->addMaintainer(
'lead',
'alec',
'Aleksander Machniak',
'alec@alec.pl'
);
$package->addReplacement(
'data/pinentry-cli.xml',
'package-info',
'@package-version@',
'version'
);
$package->addReplacement(
'Crypt/GPG/PinEntry.php',
'package-info',
'@package-name@',
'name'
);
$package->addReplacement(
'Crypt/GPG/PinEntry.php',
'pear-config',
'@data-dir@',
'data_dir'
);
$package->addReplacement(
'Crypt/GPG/Engine.php',
'pear-config',
'@bin-dir@',
'bin_dir'
);
$package->addReplacement(
'scripts/crypt-gpg-pinentry',
'pear-config',
'@php-dir@',
'php_dir'
);
$package->setPhpDep('5.4.8');
$package->addExtensionDep('optional', 'posix');
$package->addExtensionDep('required', 'mbstring');
$package->addOsDep('windows', true);
$package->setPearinstallerDep('1.4.0');
$package->addPackageDepWithChannel(
'required',
'Console_CommandLine',
'pear.php.net',
'1.1.10'
);
$package->generateContents();
$package->addRelease();
$package->addInstallAs(
'scripts/crypt-gpg-pinentry',
'crypt-gpg-pinentry'
);
if (isset($_GET['make'])
|| (isset($_SERVER['argv']) && @$_SERVER['argv'][1] == 'make')
) {
$package->writePackageFile();
} else {
$package->debugPackageFile();
}