| 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 DBAL'; |
|---|
| 17 |
|
|---|
| 18 |
$description =<<<EOT |
|---|
| 19 |
Doctrine_DBAL is a DBAL (database abstraction layer) for PHP 5.2.x+ . |
|---|
| 20 |
EOT; |
|---|
| 21 |
|
|---|
| 22 |
$packagefile = './package_DBAL.xml'; |
|---|
| 23 |
|
|---|
| 24 |
$options = array( |
|---|
| 25 |
'filelistgenerator' => 'svn', |
|---|
| 26 |
'changelogoldtonew' => false, |
|---|
| 27 |
'simpleoutput' => true, |
|---|
| 28 |
'baseinstalldir' => '/', |
|---|
| 29 |
'packagedirectory' => './', |
|---|
| 30 |
'packagefile' => $packagefile, |
|---|
| 31 |
'clearcontents' => false, |
|---|
| 32 |
'include' => array( |
|---|
| 33 |
'lib/Doctrine/Connection/', |
|---|
| 34 |
'lib/Doctrine/DataDict/', |
|---|
| 35 |
'lib/Doctrine/Export/', |
|---|
| 36 |
'lib/Doctrine/Import/', |
|---|
| 37 |
'lib/Doctrine/Manager/', |
|---|
| 38 |
'lib/Doctrine/Sequences/', |
|---|
| 39 |
'lib/Doctrine/Transaction/', |
|---|
| 40 |
), |
|---|
| 41 |
'dir_roles' => array( |
|---|
| 42 |
'lib' => 'php', |
|---|
| 43 |
), |
|---|
| 44 |
'exceptions' => array( |
|---|
| 45 |
) |
|---|
| 46 |
); |
|---|
| 47 |
|
|---|
| 48 |
$package = &PEAR_PackageFileManager2::importOptions($packagefile, $options); |
|---|
| 49 |
$package->setPackageType('php'); |
|---|
| 50 |
|
|---|
| 51 |
$package->clearDeps(); |
|---|
| 52 |
$package->setPhpDep('5.2.3'); |
|---|
| 53 |
$package->setPearInstallerDep('1.4.0b1'); |
|---|
| 54 |
$package->addPackageDepWithChannel('required', 'PEAR', 'pear.php.net', '1.3.6'); |
|---|
| 55 |
|
|---|
| 56 |
$package->addRelease(); |
|---|
| 57 |
$package->generateContents(); |
|---|
| 58 |
$package->setReleaseVersion($version_release); |
|---|
| 59 |
$package->setAPIVersion($version_api); |
|---|
| 60 |
$package->setReleaseStability($state); |
|---|
| 61 |
$package->setAPIStability($state); |
|---|
| 62 |
$package->setNotes($notes); |
|---|
| 63 |
$package->setSummary($summary); |
|---|
| 64 |
$package->setDescription($description); |
|---|
| 65 |
$package->addGlobalReplacement('package-info', '@package_version@', 'version'); |
|---|
| 66 |
|
|---|
| 67 |
if (isset($_GET['make']) || (isset($_SERVER['argv']) && @$_SERVER['argv'][1] == 'make')) { |
|---|
| 68 |
$package->writePackageFile(); |
|---|
| 69 |
} else { |
|---|
| 70 |
$package->debugPackageFile(); |
|---|
| 71 |
} |
|---|
| 72 |
|
|---|