root/trunk/autopackage.php

Revision 2, 2.2 kB (checked in by argh, 3 years ago)

Initial project checkin.

Line 
1 <?php
2 /**
3  * package.xml generation file for patTemplate
4  *
5  * This file is executed by createSnaps.php to
6  * automatically create a package that can be
7  * installed via the PEAR installer.
8  *
9  * $Id: autopackage.php 345 2005-10-08 12:00:48Z argh $
10  *
11  * @author        Stephan Schmidt <schst@php-tools.net>
12  * @package        patForms
13  * @subpackage    Tools
14  */
15
16 $baseVersion = '0.1.0';
17
18 /**
19  * uses PackageFileManager
20  */
21 require_once 'PEAR/PackageFileManager.php';
22
23 /**
24  * current version
25  */
26 $version    = $baseVersion . 'dev' . $argv[1];
27 $dir        = dirname( __FILE__ );
28
29 /**
30  * current state
31  */
32 $state = 'devel';
33
34 /**
35  * release notes
36  */
37 $notes = <<<EOT
38 EOT;
39
40 /**
41  * package description
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 ?>
Note: See TracBrowser for help on using the browser.