| 1 |
<?php |
|---|
| 2 |
|
|---|
| 3 |
|
|---|
| 4 |
|
|---|
| 5 |
|
|---|
| 6 |
|
|---|
| 7 |
|
|---|
| 8 |
|
|---|
| 9 |
|
|---|
| 10 |
|
|---|
| 11 |
|
|---|
| 12 |
|
|---|
| 13 |
|
|---|
| 14 |
|
|---|
| 15 |
|
|---|
| 16 |
$baseVersion = '0.1.0'; |
|---|
| 17 |
|
|---|
| 18 |
|
|---|
| 19 |
|
|---|
| 20 |
|
|---|
| 21 |
require_once 'PEAR/PackageFileManager.php'; |
|---|
| 22 |
|
|---|
| 23 |
|
|---|
| 24 |
|
|---|
| 25 |
|
|---|
| 26 |
$version = $baseVersion . 'dev' . $argv[1]; |
|---|
| 27 |
$dir = dirname( __FILE__ ); |
|---|
| 28 |
|
|---|
| 29 |
|
|---|
| 30 |
|
|---|
| 31 |
|
|---|
| 32 |
$state = 'devel'; |
|---|
| 33 |
|
|---|
| 34 |
|
|---|
| 35 |
|
|---|
| 36 |
|
|---|
| 37 |
$notes = <<<EOT |
|---|
| 38 |
EOT; |
|---|
| 39 |
|
|---|
| 40 |
|
|---|
| 41 |
|
|---|
| 42 |
|
|---|
| 43 |
$description = <<<EOT |
|---|
| 44 |
patXMLPretty is a powerful XML syntax highlighter with a flexible rendering and |
|---|
| 45 |
configuration engine. It allows to define complete XML syntax definitions to |
|---|
| 46 |
bring the documentation of XML documents directly within the highlighted |
|---|
| 47 |
syntax. |
|---|
| 48 |
EOT; |
|---|
| 49 |
|
|---|
| 50 |
$package = new PEAR_PackageFileManager(); |
|---|
| 51 |
$options = array( |
|---|
| 52 |
'package' => 'patXMLPretty', |
|---|
| 53 |
'summary' => 'XML Syntax Highlighting package', |
|---|
| 54 |
'description' => $description, |
|---|
| 55 |
'version' => $version, |
|---|
| 56 |
'state' => $state, |
|---|
| 57 |
'license' => 'LGPL', |
|---|
| 58 |
'filelistgenerator' => 'file', |
|---|
| 59 |
'ignore' => array( 'package.php', 'autopackage.php', 'package.xml', '.cvsignore', '.svn', 'cache', 'rfcs' ), |
|---|
| 60 |
'notes' => $notes, |
|---|
| 61 |
'simpleoutput' => true, |
|---|
| 62 |
'baseinstalldir' => 'pat', |
|---|
| 63 |
'packagedirectory' => $dir, |
|---|
| 64 |
'dir_roles' => array( |
|---|
| 65 |
'docs' => 'doc', |
|---|
| 66 |
'examples' => 'doc', |
|---|
| 67 |
'tests' => 'test', |
|---|
| 68 |
) |
|---|
| 69 |
); |
|---|
| 70 |
|
|---|
| 71 |
$result = $package->setOptions( $options ); |
|---|
| 72 |
if( PEAR::isError( $result ) ) { |
|---|
| 73 |
echo $result->getMessage(); |
|---|
| 74 |
die(); |
|---|
| 75 |
} |
|---|
| 76 |
|
|---|
| 77 |
$package->detectDependencies(); |
|---|
| 78 |
|
|---|
| 79 |
$package->addMaintainer('argh', 'lead', 'Sebastian Mordziol', 'argh@php-tools.net'); |
|---|
| 80 |
$package->addMaintainer('schst', 'developer', 'Stephan Schmidt', 'schst@php-tools.net'); |
|---|
| 81 |
|
|---|
| 82 |
$package->addDependency('patError', '', 'has', 'pkg', false); |
|---|
| 83 |
$package->addDependency('php', '4.3.0', 'ge', 'php', false); |
|---|
| 84 |
|
|---|
| 85 |
$result = $package->writePackageFile(); |
|---|
| 86 |
|
|---|
| 87 |
if (PEAR::isError($result)) { |
|---|
| 88 |
echo $result->getMessage(); |
|---|
| 89 |
die(); |
|---|
| 90 |
} |
|---|
| 91 |
?> |
|---|