root/trunk/package.php

Revision 2, 3.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: package.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 /**
17  * uses PackageFileManager
18  */
19 require_once 'PEAR/PackageFileManager2.php';
20 require_once 'PEAR/PackageFileManager/Svn.php';
21
22 /**
23  * current version
24  */
25 $version = '0.1.0';
26
27 /**
28  * Current API version
29  */
30 $apiVersion = '0.1.0';
31
32 /**
33  * current state
34  */
35 $state = 'alpha';
36
37 /**
38  * current API stability
39  */
40 $apiStability = 'alpha';
41
42 /**
43  * release notes
44  */
45 $notes = <<<EOT
46 EOT;
47
48 /**
49  * package description
50  */
51 $description = <<<EOT
52 patXMLPretty is a powerful XML syntax highlighter with a flexible rendering and
53 configuration engine. It allows to define complete XML syntax definitions to
54 bring the documentation of XML documents directly within the highlighted
55 syntax.
56 EOT;
57
58 $package = new PEAR_PackageFileManager2();
59 $options = array(
60     'license'           => 'LGPL',
61     'filelistgenerator' => 'svn',
62     'ignore'            => array( 'package.php', 'autopackage.php', 'package.xml', 'package2.xml', '.cvsignore', '.svn', 'examples/cache', 'rfcs' ),
63     'simpleoutput'      => true,
64     'baseinstalldir'    => 'pat',
65     'packagedirectory'  => './',
66     'dir_roles'         => array(
67         'docs' => 'doc',
68         'examples' => 'doc',
69         'tests' => 'test',
70     )
71 );
72
73 $result = $package->setOptions( $options );
74 if (PEAR::isError($result)) {
75     echo $result->getMessage();
76     die();
77 }
78     
79 $package->setPackage('patXMLPretty');
80 $package->setSummary('XML Syntax Highlighting package');
81 $package->setDescription($description);
82
83 $package->setChannel('pear.php-tools.net');
84 $package->setAPIVersion($apiVersion);
85 $package->setReleaseVersion($version);
86 $package->setReleaseStability($state);
87 $package->setAPIStability($apiStability);
88 $package->setNotes($notes);
89 $package->setPackageType('php'); // this is a PEAR-style php script package
90 $package->setLicense('LGPL', 'http://www.gnu.org/copyleft/lesser.txt');
91
92 $package->addMaintainer('lead', 'argh', 'Sebastian Mordziol', 'argh@php-tools.net', 'yes');
93 $package->addMaintainer('developer', 'schst', 'Stephan Schmidt', 'schst@php-tools.net', 'yes');
94
95 $package->setPhpDep('4.3.0');
96 $package->setPearinstallerDep('1.4.0a12');
97
98 $package->addPackageDepWithChannel('required', 'patError', 'pear.php-tools.net', '1.1.0');
99
100 $package->addDependencyGroup('pattemplate', 'Render your forms with patTemplate.');
101 $package->addGroupPackageDepWithChannel('package', 'rendererpattemplate', 'patTemplate', 'pear.php-tools.net', '3.0.0');
102
103 $package->generateContents();
104
105 $pkg = &$package->exportCompatiblePackageFile1();
106
107 if (isset($_GET['make']) || (isset($_SERVER['argv'][1]) && $_SERVER['argv'][1] == 'make')) {
108     $result = $package->writePackageFile();
109     $pkg->writePackageFile();
110 } else {
111     $result = $package->debugPackageFile();
112     $pkg->debugPackageFile();
113 }
114
115 if (PEAR::isError($result)) {
116     echo $result->getMessage();
117     die();
118 }
119 ?>
Note: See TracBrowser for help on using the browser.