php-src/ext/phar/package.php

76 lines
2.7 KiB
PHP
Raw Normal View History

2007-03-25 20:04:39 +00:00
<?php
$notes = '
2007-05-18 17:53:32 +00:00
* add Phar::getAlias() [Marcus]
* Made -a optional in pack subcommand of phar.phar [Marcus]
2007-05-21 16:46:19 +00:00
* Fix issue with apache module and extracted archives [Marcus]
* Send all error messages to stderr in phar.phar [Marcus]
* Added new subcommands add and delete to phar.phar [Marcus]
* Made Phar::loadPhar() and Phar::mapPhar() ignore extracted archives [Marcus]
2007-05-27 15:50:23 +00:00
* Fix issue with compressed entries and uncompressing entries [Marcus]
2007-05-27 16:58:23 +00:00
* Verify stubs before writing [Marcus]
* Always use longest stub end to avoid issues with length field [Marcus]
';
2007-03-25 20:04:39 +00:00
if (!class_exists("Phar") && !extension_loaded("Phar")) {
die("Extension phar not present");
}
require_once 'PEAR/PackageFileManager2.php';
PEAR::setErrorHandling(PEAR_ERROR_DIE);
$options = array(
'filelistgenerator' => 'CVS',
'changelogoldtonew' => false,
'simpleoutput' => true,
'baseinstalldir' => '/',
'packagedirectory' => dirname(__FILE__),
'packagefile' => 'package.xml',
'clearcontents' => true,
'ignore' => array('package*.php', 'package*.xml'),
'dir_roles' => array(
'docs' => 'doc',
'examples' => 'doc',
'tests' => 'test',
2007-05-10 20:55:28 +00:00
'phar' => 'src',
2007-03-25 20:04:39 +00:00
),
2007-03-25 20:36:19 +00:00
'exceptions' => array(
'CREDITS' => 'doc',
'EXPERIMENTAL' => 'doc',
'LICENSE' => 'doc',
'Makefile.frag' => 'src',
'phar_path_check.re' => 'src',
'TODO' => 'doc',
),
2007-03-25 20:04:39 +00:00
);
$package = PEAR_PackageFileManager2::importOptions(dirname(__FILE__) . '/package.xml', $options);
$package->clearDeps();
$package->setPhpDep('5.2.0');
$package->setPearInstallerDep('1.4.3');
$package->addPackageDepWithChannel('optional', 'bz2', 'pecl.php.net', false, false, false, false, 'bz2');
// all this false business sets the <providesextension> tag that allows us to have hash built
// in statically
$package->addPackageDepWithChannel('optional', 'hash', 'pecl.php.net', false, false, false, false, 'hash');
2007-03-25 20:04:39 +00:00
$package->addExtensionDep('optional', 'spl');
$package->addExtensionDep('optional', 'zlib');
2007-03-26 15:51:17 +00:00
$package->setPackageType('extsrc');
2007-03-25 20:04:39 +00:00
$package->addRelease();
$package->setReleaseVersion(phpversion('phar'));
$package->setAPIVersion(Phar::apiVersion());
2007-05-11 00:34:45 +00:00
$package->setReleaseStability('stable');
$package->setAPIStability('stable');
2007-03-25 20:14:35 +00:00
$package->setNotes("\n$notes\n");
//$package->addGlobalReplacement('package-info', '@package_version@', 'version');
2007-03-25 20:04:39 +00:00
$package->generateContents();
if (isset($_GET['make']) || (isset($_SERVER['argv']) && @$_SERVER['argv'][1] == 'make')) {
$package->writePackageFile();
} else {
$package->debugPackageFile();
}
?>