forked from pear/Crypt_GPG
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpackage.php
200 lines (177 loc) · 5.78 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
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
<?php
/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
/**
* This is the package.xml generator for Crypt_GPG
*
* PHP version 5
*
* 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, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* @category Encryption
* @package Crypt_GPG
* @author Michael Gauthier <[email protected]>
* @author Nathan Fredrikson <[email protected]>
* @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.4.0';
$apiState = 'stable';
$releaseVersion = '1.4.0';
$releaseState = 'stable';
$releaseNotes =
"This release adds support for GnuPG 2.x, supporting the latest version " .
"of RHEL and derivatives. Additionally, the following bugs are fixed:\n" .
"\n" .
"Fix Bug #19914. PinEntry can't find Console_CommandLine.\n" .
"Fix Bug #20512. Debug should use htmlspecialchars().\n" .
"Fix Bug #20527. Composer: @package-name@ in PinEntry.php is not resolved.\n" .
"Fix Bug #20939. Retrieve info if encryption or signing keys have been added.\n" .
"Fix Bug #20940. Determine algorithm used in signature.\n" .
"Fix Bug #17838. Passphrase operations don't work on GnuPG 2.x.\n" .
"Fix Bug #17628. Version regular expression on MAMP.\n" .
"Fix Bug #19883. Better exception on unwriteable or unexecutable homedir.\n" .
"Fix possible fread/fwrite to strings when the string values passed to " .
"Crypt_GPG are loosly equal to a stream resource handle.\n" .
"\n" .
"A workaround for PHP Bug #39598 is also provided in the event that " .
"GnuPG ends unexpectedly. This prevents infinite loops.\n" .
"\n" .
"This release makes the mbstring extension a required dependency as the " .
"assuan protocol used in GnuPG 2.x uses UTF-8.\n";
$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.2.1 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',
'tools/',
'package.php',
'composer.json',
'*.tgz'
),
'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',
);
$package->addMaintainer(
'lead',
'nrf',
'Nathan Fredrickson',
);
$package->addMaintainer(
'lead',
'alec',
'Aleksander Machniak',
);
$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.2.1');
$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();
}
?>