/
package.php
57 lines (47 loc) · 1.68 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
<?php
require_once 'PEAR/PackageFileManager.php';
$version = '0.2.0';
$notes = <<<EOT
- fixed bug #3031 (Cannot re-assign this)
- cosmetic fixes
- propagate PEAR errors to the user
EOT;
$description =<<<EOT
This package is a port of the core components of the RDF API for PHP (aka RAP):
http://www.wiwiss.fu-berlin.de/suhl/bizer/rdfapi/.
EOT;
$package =& new PEAR_PackageFileManager();
$result = $package->setOptions(array(
'package' => 'RDF',
'summary' => 'Port of the core RAP API',
'description' => $description,
'version' => $version,
'state' => 'alpha',
'license' => 'LGPL',
'filelistgenerator' => 'cvs',
'ignore' => array('package.php', 'package.xml'),
'notes' => $notes,
'changelogoldtonew' => false,
'simpleoutput' => true,
'baseinstalldir' => '/',
'packagedirectory' => './',
'dir_roles' => array('docs' => 'doc', 'examples' => 'doc', 'misc' => 'data')
));
if (PEAR::isError($result)) {
echo $result->getMessage();
die();
}
$package->addMaintainer('lsmith', 'lead', 'Lukas Kahwe Smith', 'smith@backendmedia.com');
$package->addMaintainer('davey', 'lead', 'Davey Shafik', 'davey@php.net');
$package->addDependency('php', '4.2.0', 'ge', 'php', false);
$package->addDependency('PEAR', '1.0b1', 'ge', 'pkg', false);
$package->addDependency('MDB', true, 'has', 'pkg', true);
if (isset($_GET['make']) || (isset($_SERVER['argv'][1]) && $_SERVER['argv'][1] == 'make')) {
$result = $package->writePackageFile();
} else {
$result = $package->debugPackageFile();
}
if (PEAR::isError($result)) {
echo $result->getMessage();
die();
}