root/trunk/autopackage.php

Revision 245 (checked in by schst, 4 years ago)

The Request_CLI class needs Console_Getargs 1.3.0 or higher (my patch has been added in this version)

  • Property 0 set to
  • Property 1 set to
Line 
1 <?php
2 /**
3  * package.xml generation file for patPortal
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$
10  *
11  * @author        Stephan Schmidt <schst@php-tools.net>
12  * @package        patPortal
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 This does not do anything yet!
39 EOT;
40
41 /**
42  * package description
43  */
44 $description = <<<EOT
45 patPortal is a framework built on MVC and other useful patterns, which
46 allows you create complex sites by plugin together several components.
47 EOT;
48
49 $package = new PEAR_PackageFileManager();
50
51 $result = $package->setOptions(array(
52     'package'           => 'patPortal',
53     'summary'           => 'MVC driven framework.',
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' ),
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 if (PEAR::isError($result)) {
72     echo $result->getMessage();
73     die();
74 }
75
76 $package->addMaintainer('schst', 'lead', 'Stephan Schmidt', 'schst@php-tools.net');
77 $package->addMaintainer('luckec', 'developer', 'Carsten Lucke', 'luckec@php.net');
78 $package->addMaintainer('wiegi', 'developer', 'Daniel Wiegand', 'wiegi@php-tools.net');
79 $package->addMaintainer('argh', 'contributor', 'Sebastian Mordziol', 'argh@php-tools.net');
80
81 // PHP Version required
82 $package->addDependency('php', '5.0.0', 'ge', 'php', false);
83
84 // needed by the core
85 $package->addDependency('patError', '1.0.0', 'ge', 'pkg', false);
86 $package->addDependency('patConfiguration', '2.0.0', 'ge', 'pkg', false);
87 $package->addDependency('Log', '', 'has', 'pkg', false);
88
89 // optional pat deps
90 $package->addDependency('patTemplate', '3.1.0a1', 'ge', 'pkg', true);
91
92 // optional PEAR deps
93 $package->addDependency('Text_Wiki', '', 'has', 'pkg', true);
94 $package->addDependency('DB', '', 'has', 'pkg', true);
95 $package->addDependency('HTML_Treemenu', '', 'has', 'pkg', true);
96 $package->addDependency('Console_Getargs', '1.3.0', 'has', 'pkg', true);
97
98 //  AppServer dependencies
99 $package->addDependency('Net_Server', '', 'has', 'pkg', true);
100 $package->addDependency('Net_Socket', '', 'has', 'pkg', true);
101
102 $result = $package->writePackageFile();
103
104 if (PEAR::isError($result)) {
105     echo $result->getMessage();
106     die();
107 }
108 ?>
Note: See TracBrowser for help on using the browser.