root/tags/RELEASE_0_2_0/package.php

Revision 106, 3.5 kB (checked in by mikey, 1 year ago)

added note about facade

Line 
1 <?php
2 /**
3  * script to automate the generation of the
4  * package.xml file.
5  *
6  * $Id: package.php 442 2006-08-20 13:21:58Z schst $
7  *
8  * @author      Stephan Schmidt <schst@php-tools.net>
9  * @package     XJConfForPHP
10  * @subpackage  Tools
11  */
12
13 /**
14  * uses PackageFileManager
15  */
16 require_once 'PEAR/PackageFileManager2.php';
17 require_once 'PEAR/PackageFileManager/Svn.php';
18
19 /**
20  * current version
21  */
22 $version = '0.2.0';
23
24 /**
25  * Current API version
26  */
27 $apiVersion = '0.2.0';
28
29 /**
30  * current state
31  */
32 $state = 'alpha';
33
34 /**
35  * current API stability
36  */
37 $apiStability = 'alpha';
38
39 /**
40  * release notes
41  */
42 $notes = <<<EOT
43 Feature additions:
44 - New feature to define abstract tags, which enables yo to define the concrete type in the tag instead of the definition (mikey)
45 - It is now possible to define an explicit setter method for character data inside a tag (schst)
46 - Added possibility to declare tags as static (schst)
47 - Added several unit tests (mikey)
48 - Added possibility to package XJConfForPHP as a STAR archive (mikey, schst)
49 - Added new value type "xjonf:auto-primitive" to guess the type of a scalar value (schst)
50 - Added implicit and explicit call to __set as well as possibility for setting public properties (mikey)
51 - Added XJConfFacade for a simplyfied usage of XJConf (mikey)
52 Bugfixes:
53 - Fixed bug #6: Enable factory methods without parameters in PHP 5.0.x (schst)
54 - Fixed bug #7: check, whether factory method can be called statically (schst)
55 - Fixed bug: prevent errors in case factory method does not return an instance of an object (mikey)
56 EOT;
57
58 /**
59  * package description
60  */
61 $description = <<<EOT
62 XJConfForPHP is a port of XJConf. It enables you to create complex data structures consisting of
63 objects, arrays and primitives from virtually any XML document. It provides a simple XML language
64 to define the XML-to-object mappings. It features namespace support and is easily extendible.
65 EOT;
66
67 $package = new PEAR_PackageFileManager2();
68
69 $result = $package->setOptions(array(
70     'filelistgenerator' => 'svn',
71     'ignore'            => array( 'package.php', 'package.xml', '.svn', 'rfcs' ),
72     'simpleoutput'      => true,
73     'baseinstalldir'    => '/',
74     'packagedirectory'  => './',
75     'dir_roles'         => array(
76                                  'docs' => 'doc',
77                                  'examples' => 'doc',
78                                  'tests' => 'test',
79                                  )
80     ));
81 if (PEAR::isError($result)) {
82     echo $result->getMessage();
83     die();
84 }
85
86 $package->setPackage('XJConfForPHP');
87 $package->setSummary('XML-to-object mapper.');
88 $package->setDescription($description);
89
90 $package->setChannel('pear.php-tools.net');
91 $package->setAPIVersion($apiVersion);
92 $package->setReleaseVersion($version);
93 $package->setReleaseStability($state);
94 $package->setAPIStability($apiStability);
95 $package->setNotes($notes);
96 $package->setPackageType('php');
97 $package->setLicense('LGPL', 'http://www.gnu.org/copyleft/lesser.txt');
98
99 $package->addMaintainer('lead', 'schst', 'Stephan Schmidt', 'schst@xjconf.net', 'yes');
100 $package->addMaintainer('lead', 'mikey', 'Frank Kleine', 'mikey@xjconf.net', 'yes');
101
102 $package->setPhpDep('5.0.0');
103 $package->setPearinstallerDep('1.4.0');
104
105 $package->addExtensionDep('required', 'xmlreader');
106
107 $package->generateContents();
108
109 if (isset($_GET['make']) || (isset($_SERVER['argv'][1]) && $_SERVER['argv'][1] == 'make')) {
110     $result = $package->writePackageFile();
111 } else {
112     $result = $package->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.