| 27 | | $packagefile = './package.xml'; |
|---|
| | 29 | $options = array( |
|---|
| | 30 | 'filelistgenerator' => 'svn', |
|---|
| | 31 | 'changelogoldtonew' => false, |
|---|
| | 32 | 'simpleoutput' => true, |
|---|
| | 33 | 'baseinstalldir' => '/', |
|---|
| | 34 | 'packagedirectory' => $path, |
|---|
| | 35 | 'packageFile' => $packageFile, |
|---|
| | 36 | 'clearcontents' => false, |
|---|
| | 37 | // What to ignore |
|---|
| | 38 | 'ignore' => array( |
|---|
| | 39 | $path . DIRECTORY_SEPARATOR . 'vendor/', |
|---|
| | 40 | $path . DIRECTORY_SEPARATOR . 'package*.*', |
|---|
| | 41 | $path . DIRECTORY_SEPARATOR . 'tests_old/', |
|---|
| | 42 | $path . DIRECTORY_SEPARATOR . 'tests/', |
|---|
| | 43 | $path . DIRECTORY_SEPARATOR . 'tools/' |
|---|
| | 44 | ), |
|---|
| | 45 | // What to include in package |
|---|
| | 46 | 'include' => array( |
|---|
| | 47 | $path . DIRECTORY_SEPARATOR . 'lib/', |
|---|
| | 48 | $path . DIRECTORY_SEPARATOR . 'manual/', |
|---|
| | 49 | $path . DIRECTORY_SEPARATOR . 'vendor/', |
|---|
| | 50 | $path . DIRECTORY_SEPARATOR . 'README', |
|---|
| | 51 | $path . DIRECTORY_SEPARATOR . 'CHANGELOG', |
|---|
| | 52 | $path . DIRECTORY_SEPARATOR . 'LICENSE', |
|---|
| | 53 | $path . DIRECTORY_SEPARATOR . 'COPYRIGHT' |
|---|
| | 54 | ), |
|---|
| | 55 | // Dir roles |
|---|
| | 56 | 'dir_roles' => array( |
|---|
| | 57 | 'lib' => 'php', |
|---|
| | 58 | 'manual' => 'doc', |
|---|
| | 59 | 'vendor' => 'php' |
|---|
| | 60 | ), |
|---|
| | 61 | // File roles |
|---|
| | 62 | 'exceptions' => array( |
|---|
| | 63 | 'README' => 'doc', |
|---|
| | 64 | 'CHANGELOG' => 'doc', |
|---|
| | 65 | 'LICENSE' => 'doc', |
|---|
| | 66 | 'COPYRIGHT' => 'doc' |
|---|
| | 67 | ) |
|---|
| | 68 | ); |
|---|
| 29 | | $options = array( |
|---|
| 30 | | 'filelistgenerator' => 'svn', |
|---|
| 31 | | 'changelogoldtonew' => false, |
|---|
| 32 | | 'simpleoutput' => true, |
|---|
| 33 | | 'baseinstalldir' => '/', |
|---|
| 34 | | 'packagedirectory' => './', |
|---|
| 35 | | 'packagefile' => $packagefile, |
|---|
| 36 | | 'clearcontents' => false, |
|---|
| 37 | | 'ignore' => array( |
|---|
| 38 | | 'vendor/', |
|---|
| 39 | | 'tools/', |
|---|
| 40 | | 'package*.php', |
|---|
| 41 | | 'package*.xml', |
|---|
| 42 | | ), |
|---|
| 43 | | 'dir_roles' => array( |
|---|
| 44 | | 'lib' => 'php', |
|---|
| 45 | | 'manual' => 'doc', |
|---|
| 46 | | 'models' => 'doc', |
|---|
| 47 | | 'tests' => 'test', |
|---|
| 48 | | ), |
|---|
| 49 | | 'exceptions' => array( |
|---|
| 50 | | 'README' => 'doc', |
|---|
| 51 | | 'CHANGELOG' => 'doc', |
|---|
| 52 | | 'LICENSE' => 'doc', |
|---|
| 53 | | 'COPYRIGHT' => 'doc' |
|---|
| 54 | | ) |
|---|
| 55 | | ); |
|---|
| | 70 | $package = &PEAR_packageFileManager2::importOptions($packageFile, $options); |
|---|
| | 71 | $package->setPackageType('php'); |
|---|
| 60 | | $package->clearDeps(); |
|---|
| 61 | | $package->setPhpDep('5.2.3'); |
|---|
| 62 | | $package->setPearInstallerDep('1.4.0b1'); |
|---|
| 63 | | $package->addPackageDepWithChannel('required', 'PEAR', 'pear.php.net', '1.3.6'); |
|---|
| | 78 | $package->addRelease(); |
|---|
| | 79 | $package->generateContents(); |
|---|
| | 80 | $package->setReleaseVersion($version); |
|---|
| | 81 | $package->setAPIVersion($version); |
|---|
| | 82 | $package->setReleaseStability($state); |
|---|
| | 83 | $package->setAPIStability($state); |
|---|
| | 84 | $package->setNotes($notes); |
|---|
| | 85 | $package->setSummary($summary); |
|---|
| | 86 | $package->setDescription($description); |
|---|
| | 87 | $package->addGlobalReplacement('package-info', '@package_version@', 'version'); |
|---|
| 65 | | $package->addRelease(); |
|---|
| 66 | | $package->generateContents(); |
|---|
| 67 | | $package->setReleaseVersion($version_release); |
|---|
| 68 | | $package->setAPIVersion($version_api); |
|---|
| 69 | | $package->setReleaseStability($state); |
|---|
| 70 | | $package->setAPIStability($state); |
|---|
| 71 | | $package->setNotes($notes); |
|---|
| 72 | | $package->setSummary($summary); |
|---|
| 73 | | $package->setDescription($description); |
|---|
| 74 | | $package->addGlobalReplacement('package-info', '@package_version@', 'version'); |
|---|
| 75 | | |
|---|
| 76 | | if (isset($_GET['make']) || (isset($_SERVER['argv']) && @$_SERVER['argv'][1] == 'make')) { |
|---|
| 77 | | $package->writePackageFile(); |
|---|
| 78 | | } else { |
|---|
| 79 | | $package->debugPackageFile(); |
|---|
| | 89 | if (isset($_GET['make']) || (isset($_SERVER['argv']) && @$_SERVER['argv'][1] == 'make')) { |
|---|
| | 90 | $package->writepackageFile(); |
|---|
| | 91 | } else { |
|---|
| | 92 | $package->debugpackageFile(); |
|---|
| | 93 | } |
|---|