| 1 |
<?php |
|---|
| 2 |
|
|---|
| 3 |
require_once('PEAR/PackageFileManager2.php'); |
|---|
| 4 |
PEAR::setErrorHandling(PEAR_ERROR_DIE); |
|---|
| 5 |
|
|---|
| 6 |
$packagexml = new PEAR_PackageFileManager2; |
|---|
| 7 |
|
|---|
| 8 |
$version_release = '0.9'; |
|---|
| 9 |
$version_api = $version_release; |
|---|
| 10 |
$state = 'beta'; |
|---|
| 11 |
|
|---|
| 12 |
$notes = <<<EOT |
|---|
| 13 |
barfoo |
|---|
| 14 |
EOT; |
|---|
| 15 |
|
|---|
| 16 |
$summary = 'PHP5 Database ORM'; |
|---|
| 17 |
|
|---|
| 18 |
$description =<<<EOT |
|---|
| 19 |
Doctrine_ORM is an ORM (object relational mapper) for PHP 5.2.x+. One of its key |
|---|
| 20 |
features is the ability to optionally write database queries in an OO |
|---|
| 21 |
(object oriented) SQL-dialect called DQL inspired by Hibernates HQL. This |
|---|
| 22 |
provides developers with a powerful alternative to SQL that maintains a maximum |
|---|
| 23 |
of flexibility without requiring needless code duplication. |
|---|
| 24 |
EOT; |
|---|
| 25 |
|
|---|
| 26 |
$packagefile = './package_ORM.xml'; |
|---|
| 27 |
|
|---|
| 28 |
$options = array( |
|---|
| 29 |
'filelistgenerator' => 'svn', |
|---|
| 30 |
'changelogoldtonew' => false, |
|---|
| 31 |
'simpleoutput' => true, |
|---|
| 32 |
'baseinstalldir' => '/', |
|---|
| 33 |
'packagedirectory' => './', |
|---|
| 34 |
'packagefile' => $packagefile, |
|---|
| 35 |
'clearcontents' => false, |
|---|
| 36 |
'include' => array( |
|---|
| 37 |
'models/', |
|---|
| 38 |
'lib/Doctrine/Adapter/', |
|---|
| 39 |
'lib/Doctrine/Auditlog/', |
|---|
| 40 |
'lib/Doctrine/Cache/', |
|---|
| 41 |
'lib/Doctrine/Collection/', |
|---|
| 42 |
'lib/Doctrine/Hook/', |
|---|
| 43 |
'lib/Doctrine/Hydrator/', |
|---|
| 44 |
'lib/Doctrine/I18n/', |
|---|
| 45 |
'lib/Doctrine/Locking/', |
|---|
| 46 |
'lib/Doctrine/Mapper/', |
|---|
| 47 |
'lib/Doctrine/Migration/', |
|---|
| 48 |
'lib/Doctrine/Node/', |
|---|
| 49 |
'lib/Doctrine/Query/', |
|---|
| 50 |
'lib/Doctrine/RawSql/', |
|---|
| 51 |
'lib/Doctrine/Search/', |
|---|
| 52 |
'lib/Doctrine/Table/', |
|---|
| 53 |
'lib/Doctrine/Template/', |
|---|
| 54 |
'lib/Doctrine/Tree/', |
|---|
| 55 |
'lib/Doctrine/Validator/', |
|---|
| 56 |
'lib/Doctrine/View/', |
|---|
| 57 |
), |
|---|
| 58 |
'dir_roles' => array( |
|---|
| 59 |
'lib' => 'php', |
|---|
| 60 |
'models' => 'doc', |
|---|
| 61 |
), |
|---|
| 62 |
'exceptions' => array( |
|---|
| 63 |
) |
|---|
| 64 |
); |
|---|
| 65 |
|
|---|
| 66 |
$package = &PEAR_PackageFileManager2::importOptions($packagefile, $options); |
|---|
| 67 |
$package->setPackageType('php'); |
|---|
| 68 |
|
|---|
| 69 |
$package->clearDeps(); |
|---|
| 70 |
$package->setPhpDep('5.2.3'); |
|---|
| 71 |
$package->setPearInstallerDep('1.4.0b1'); |
|---|
| 72 |
$package->addPackageDepWithChannel('required', 'PEAR', 'pear.php.net', '1.3.6'); |
|---|
| 73 |
|
|---|
| 74 |
$package->addRelease(); |
|---|
| 75 |
$package->generateContents(); |
|---|
| 76 |
$package->setReleaseVersion($version_release); |
|---|
| 77 |
$package->setAPIVersion($version_api); |
|---|
| 78 |
$package->setReleaseStability($state); |
|---|
| 79 |
$package->setAPIStability($state); |
|---|
| 80 |
$package->setNotes($notes); |
|---|
| 81 |
$package->setSummary($summary); |
|---|
| 82 |
$package->setDescription($description); |
|---|
| 83 |
$package->addGlobalReplacement('package-info', '@package_version@', 'version'); |
|---|
| 84 |
|
|---|
| 85 |
if (isset($_GET['make']) || (isset($_SERVER['argv']) && @$_SERVER['argv'][1] == 'make')) { |
|---|
| 86 |
$package->writePackageFile(); |
|---|
| 87 |
} else { |
|---|
| 88 |
$package->debugPackageFile(); |
|---|
| 89 |
} |
|---|
| 90 |
|
|---|