| 64 | | |
|---|
| | 67 | |
|---|
| | 68 | if ($this->packageFile !== null) { |
|---|
| | 69 | // create one w/ full path |
|---|
| | 70 | $f = new PhingFile($this->packageFile->getAbsolutePath()); |
|---|
| | 71 | $options['packagefile'] = $f->getName(); |
|---|
| | 72 | // must end in trailing slash |
|---|
| | 73 | $options['outputdirectory'] = $f->getParent() . DIRECTORY_SEPARATOR; |
|---|
| | 74 | $this->log("Creating package file: " . $f->getPath(), PROJECT_MSG_INFO); |
|---|
| | 75 | } else { |
|---|
| | 76 | $this->log("Creating [default] package.xml file in base directory.", PROJECT_MSG_INFO); |
|---|
| | 77 | } |
|---|
| | 78 | |
|---|
| 108 | | $package->setSummary(''); |
|---|
| 109 | | $package->setDescription(''); |
|---|
| 110 | | $package->setChannel('phing.info'); |
|---|
| | 120 | $package->setSummary('PHP5 project build system based on Apache Ant'); |
|---|
| | 121 | $package->setDescription('PHing Is Not GNU make; it\'s a project build system based on Apache Ant. |
|---|
| | 122 | You can do anything with it that you could do with a traditional build system like GNU make, and its use of |
|---|
| | 123 | simple XML build files and extensible PHP "task" classes make it an easy-to-use and highly flexible build framework. |
|---|
| | 124 | Features include file transformations (e.g. token replacement, XSLT transformation, Smarty template transformations, |
|---|
| | 125 | etc.), file system operations, interactive build support, SQL execution, and much more.'); |
|---|
| | 126 | $package->setChannel('pear.phing.info'); |
|---|
| 115 | | |
|---|
| | 133 | $package->setAPIStability($this->state); |
|---|
| | 134 | |
|---|
| | 135 | $package->setNotes($this->notes); |
|---|
| | 136 | |
|---|
| | 137 | $package->setLicense('LGPL', 'http://www.gnu.org/licenses/lgpl.html'); |
|---|
| | 138 | |
|---|
| | 139 | // Add package maintainers |
|---|
| | 140 | $package->addMaintainer('lead', 'hans', 'Hans Lellelid', 'hans@xmpl.org'); |
|---|
| | 141 | $package->addMaintainer('lead', 'mrook', 'Michiel Rook', 'michiel@trendserver.nl'); |
|---|
| | 142 | |
|---|
| | 143 | |
|---|
| | 144 | |
|---|
| 117 | | $package->addRelease(); |
|---|
| 118 | | $package->setOSInstallCondition('windows'); |
|---|
| 119 | | $package->addInstallAs('bin/pear-phing.bat', 'phing.bat'); |
|---|
| 120 | | $package->addIgnore('bin/pear-phing'); |
|---|
| 121 | | |
|---|
| 122 | | $package->addRelease(); |
|---|
| 123 | | $package->addInstallAs('bin/pear-phing', 'phing'); |
|---|
| 124 | | $package->addIgnore('pear-phpdoc.bat'); |
|---|
| 125 | | |
|---|
| 126 | | $package->addInstallAs('bin/phing.php', 'phing.php'); |
|---|
| 127 | | |
|---|
| 128 | | // dependencies |
|---|
| | 146 | // |
|---|
| | 147 | // note that the order of the method calls below is creating |
|---|
| | 148 | // sub-"release" sections which have specific rules. This replaces |
|---|
| | 149 | // the platformexceptions system in the older version of PEAR's package.xml |
|---|
| | 150 | // |
|---|
| | 151 | // Programmatically, I feel the need to re-iterate that this API for PEAR_PackageFileManager |
|---|
| | 152 | // seems really wrong. Sub-sections should be encapsulated in objects instead of having |
|---|
| | 153 | // a "flat" API that does not represent the structure being created.... |
|---|
| | 154 | |
|---|
| | 155 | |
|---|
| | 156 | // creating a sub-section for 'windows' |
|---|
| | 157 | $package->addRelease(); |
|---|
| | 158 | $package->setOSInstallCondition('windows'); |
|---|
| | 159 | $package->addInstallAs('bin/phing.php', 'phing.php'); |
|---|
| | 160 | $package->addInstallAs('bin/pear-phing.bat', 'phing.bat'); |
|---|
| | 161 | $package->addIgnoreToRelease('bin/pear-phing'); |
|---|
| | 162 | |
|---|
| | 163 | // creating a sub-section for non-windows |
|---|
| | 164 | $package->addRelease(); |
|---|
| | 165 | //$package->setOSInstallCondition('(*ix|*ux|darwin*|*BSD|SunOS*)'); |
|---|
| | 166 | $package->addInstallAs('bin/phing.php', 'phing.php'); |
|---|
| | 167 | $package->addInstallAs('bin/pear-phing', 'phing'); |
|---|
| | 168 | $package->addIgnoreToRelease('bin/pear-phing.bat'); |
|---|
| | 169 | |
|---|
| | 170 | |
|---|
| | 171 | // "core" dependencies |
|---|
| 131 | | |
|---|
| | 174 | |
|---|
| | 175 | // "package" dependencies |
|---|
| | 176 | $package->addPackageDepWithChannel( 'optional', 'VersionControl_SVN', 'pear.php.net', '0.3.0alpha1'); |
|---|
| | 177 | $package->addPackageDepWithChannel( 'optional', 'PHPUnit2', 'pear.php.net', '2.3.0'); |
|---|
| | 178 | $package->addPackageDepWithChannel( 'optional', 'PhpDocumentor', 'pear.php.net', '1.3.0RC3'); |
|---|
| | 179 | $package->addPackageDepWithChannel( 'optional', 'Xdebug', 'pear.php.net', '2.0.0beta2'); |
|---|
| | 180 | $package->addPackageDepWithChannel( 'optional', 'Archive_Tar', 'pear.php.net', '1.3.0'); |
|---|
| | 181 | $package->addPackageDepWithChannel( 'optional', 'PEAR_PackageFileManager', 'pear.php.net', '1.5.2'); |
|---|
| | 182 | |
|---|
| | 183 | // now add the replacements .... |
|---|
| | 184 | $package->addReplacement('Phing.php', 'pear-config', '@DATA-DIR@', 'data_dir'); |
|---|
| | 185 | $package->addReplacement('bin/pear-phing.bat', 'pear-config', '@PHP-BIN@', 'php_bin'); |
|---|
| | 186 | $package->addReplacement('bin/pear-phing.bat', 'pear-config', '@BIN-DIR@', 'bin_dir'); |
|---|
| | 187 | $package->addReplacement('bin/pear-phing.bat', 'pear-config', '@PEAR-DIR@', 'php_dir'); |
|---|
| | 188 | $package->addReplacement('bin/pear-phing', 'pear-config', '@PHP-BIN@', 'php_bin'); |
|---|
| | 189 | $package->addReplacement('bin/pear-phing', 'pear-config', '@BIN-DIR@', 'bin_dir'); |
|---|
| | 190 | $package->addReplacement('bin/pear-phing', 'pear-config', '@PEAR-DIR@', 'php_dir'); |
|---|
| | 191 | |
|---|
| | 192 | // now we run this weird generateContents() method that apparently |
|---|
| | 193 | // is necessary before we can add replacements ... ? |
|---|