/
package_mysqli.php
63 lines (53 loc) · 2 KB
/
package_mysqli.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
<?php
require_once 'PEAR/PackageFileManager.php';
$version = '1.0.3';
$notes = <<<EOT
- fixed unsigned handling and minor tweaks to type mapping in mapNativeDatatype()
- use emulated prepared statements on mysql 4.0 or lower
- added "emulate_prepared" option to force prepared statement emulation
EOT;
$package = new PEAR_PackageFileManager();
$result = $package->setOptions(
array(
'packagefile' => 'package_mysqli.xml',
'package' => 'MDB2_Driver_mysqli',
'summary' => 'mysqli MDB2 driver',
'description' => 'This is the MySQLi MDB2 driver.',
'version' => $version,
'state' => 'stable',
'license' => 'BSD License',
'filelistgenerator' => 'cvs',
'include' => array('*mysqli*'),
'ignore' => array('package_mysqli.php'),
'notes' => $notes,
'changelogoldtonew' => false,
'simpleoutput' => true,
'baseinstalldir' => '/',
'packagedirectory' => './',
'dir_roles' => array(
'docs' => 'doc',
'examples' => 'doc',
'tests' => 'test',
'tests/templates' => 'test',
),
)
);
if (PEAR::isError($result)) {
echo $result->getMessage();
die();
}
$package->addMaintainer('lsmith', 'lead', 'Lukas Kahwe Smith', 'smith@pooteeweet.org');
$package->addDependency('php', '5.0.0', 'ge', 'php', false);
$package->addDependency('PEAR', '1.0b1', 'ge', 'pkg', false);
$package->addDependency('MDB2', '2.0.3', 'ge', 'pkg', false);
$package->addDependency('mysqli', null, 'has', 'ext', false);
$package->addglobalreplacement('package-info', '@package_version@', 'version');
if (array_key_exists('make', $_GET) || (isset($_SERVER['argv'][1]) && $_SERVER['argv'][1] == 'make')) {
$result = $package->writePackageFile();
} else {
$result = $package->debugPackageFile();
}
if (PEAR::isError($result)) {
echo $result->getMessage();
die();
}