update to 1.8.1
This commit is contained in:
parent
5bc3a2e8de
commit
3c2619daa5
@ -1,5 +1,6 @@
|
||||
PEAR-1.7.2.tgz
|
||||
Archive_Tar-1.3.2.tgz
|
||||
Archive_Tar-1.3.3.tgz
|
||||
Console_Getopt-1.2.3.tgz
|
||||
PEAR-1.8.1.tgz
|
||||
Structures_Graph-1.0.2.tgz
|
||||
XML_RPC-1.5.1.tgz
|
||||
XML_Util-1.2.1.tgz
|
||||
|
520
install-pear.php
520
install-pear.php
@ -1,224 +1,296 @@
|
||||
<?php
|
||||
|
||||
/* $Id: install-pear.php,v 1.31 2008/03/11 22:04:32 timj Exp $ */
|
||||
|
||||
error_reporting(E_ALL);
|
||||
$pear_dir = dirname(__FILE__);
|
||||
ini_set('include_path', '');
|
||||
if (function_exists('mb_internal_encoding')) {
|
||||
mb_internal_encoding('ASCII');
|
||||
}
|
||||
set_time_limit(0);
|
||||
include_once 'PEAR.php';
|
||||
include_once 'PEAR/Installer.php';
|
||||
include_once 'PEAR/Registry.php';
|
||||
include_once 'PEAR/PackageFile.php';
|
||||
include_once 'PEAR/Downloader/Package.php';
|
||||
include_once 'PEAR/Frontend.php';
|
||||
$a = true;
|
||||
if (!PEAR::loadExtension('xml')) {
|
||||
$a = false;
|
||||
echo "[PEAR] xml extension is required\n";
|
||||
}
|
||||
if (!PEAR::loadExtension('pcre')) {
|
||||
$a = false;
|
||||
echo "[PEAR] pcre extension is required\n";
|
||||
}
|
||||
if (!$a) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
$force = false;
|
||||
$install_files = array();
|
||||
array_shift($argv);
|
||||
$debug = false;
|
||||
for ($i = 0; $i < sizeof($argv); $i++) {
|
||||
$arg = $argv[$i];
|
||||
$bn = basename($arg);
|
||||
if (ereg('package-(.*)\.xml$', $bn, $matches) ||
|
||||
ereg('([A-Za-z0-9_:]+)-.*\.(tar|tgz)$', $bn, $matches)) {
|
||||
$install_files[$matches[1]] = $arg;
|
||||
} elseif ($arg == '--force') {
|
||||
$force = true;
|
||||
} elseif ($arg == '-d') {
|
||||
$with_dir = $argv[$i+1];
|
||||
$i++;
|
||||
} elseif ($arg == '-b') {
|
||||
$bin_dir = $argv[$i+1];
|
||||
$i++;
|
||||
} elseif ($arg == '-c') {
|
||||
$cfg_dir = $argv[$i+1];
|
||||
$i++;
|
||||
} elseif ($arg == '-p') {
|
||||
$php_bin = $argv[$i+1];
|
||||
$i++;
|
||||
} elseif ($arg == '--debug') {
|
||||
$debug = 1;
|
||||
} elseif ($arg == '--extremedebug') {
|
||||
$debug = 2;
|
||||
}
|
||||
}
|
||||
|
||||
$config = PEAR_Config::singleton();
|
||||
|
||||
if (PEAR::isError($config)) {
|
||||
$locs = PEAR_Config::getDefaultConfigFiles();
|
||||
die("ERROR: One of $locs[user] or $locs[system] is corrupt, please remove them and try again");
|
||||
}
|
||||
|
||||
// make sure we use only default values
|
||||
$config_layers = $config->getLayers();
|
||||
foreach ($config_layers as $layer) {
|
||||
if ($layer == 'default') continue;
|
||||
$config->removeLayer($layer);
|
||||
}
|
||||
$keys = $config->getKeys();
|
||||
if ($debug) {
|
||||
$config->set('verbose', 5, 'default');
|
||||
} else {
|
||||
$config->set('verbose', 0, 'default');
|
||||
}
|
||||
// PEAR executables
|
||||
if (!empty($bin_dir)) {
|
||||
$config->set('bin_dir', $bin_dir, 'default');
|
||||
}
|
||||
|
||||
// Config files
|
||||
if (!empty($cfg_dir)) {
|
||||
$config->set('cfg_dir', $cfg_dir, 'default');
|
||||
}
|
||||
|
||||
// User supplied a dir prefix
|
||||
if (!empty($with_dir)) {
|
||||
$ds = DIRECTORY_SEPARATOR;
|
||||
$config->set('php_dir', $with_dir, 'default');
|
||||
$config->set('doc_dir', $with_dir . $ds . 'doc', 'default');
|
||||
$config->set('data_dir', $with_dir . $ds . 'data', 'default');
|
||||
$config->set('test_dir', $with_dir . $ds . 'test', 'default');
|
||||
if (!is_writable($config->get('cache_dir'))) {
|
||||
include_once 'System.php';
|
||||
$cdir = System::mktemp(array('-d', 'pear'));
|
||||
if (PEAR::isError($cdir)) {
|
||||
$ui->outputData("[PEAR] cannot make new temporary directory: " . $cdir);
|
||||
die(1);
|
||||
}
|
||||
$oldcachedir = $config->get('cache_dir');
|
||||
$config->set('cache_dir', $cdir);
|
||||
}
|
||||
}
|
||||
if (!empty($php_bin)) {
|
||||
$config->set('php_bin', $php_bin);
|
||||
}
|
||||
/* Print PEAR Conf (useful for debuging do NOT REMOVE) */
|
||||
if ($debug) {
|
||||
sort($keys);
|
||||
foreach ($keys as $key) {
|
||||
echo $key . ' ' .
|
||||
$config->getPrompt($key) . ": " . $config->get($key, null, 'default') . "\n";
|
||||
}
|
||||
if ($debug == 2) { // extreme debugging
|
||||
exit;
|
||||
}
|
||||
}
|
||||
// end print
|
||||
|
||||
$php_dir = $config->get('php_dir');
|
||||
$options = array();
|
||||
$options['upgrade'] = true;
|
||||
$install_root = getenv('INSTALL_ROOT');
|
||||
if (!empty($install_root)) {
|
||||
$options['packagingroot'] = $install_root;
|
||||
$reg = &new PEAR_Registry($options['packagingroot']);
|
||||
} else {
|
||||
$reg = $config->getRegistry('default');
|
||||
}
|
||||
|
||||
$ui = PEAR_Frontend::singleton('PEAR_Frontend_CLI');
|
||||
if (PEAR::isError($ui)) {
|
||||
die($ui->getMessage());
|
||||
}
|
||||
$installer = new PEAR_Installer($ui);
|
||||
$pkg = new PEAR_PackageFile($config, $debug);
|
||||
|
||||
foreach ($install_files as $package => $instfile) {
|
||||
$info = $pkg->fromAnyFile($instfile, PEAR_VALIDATE_INSTALLING);
|
||||
if (PEAR::isError($info)) {
|
||||
if (is_array($info->getUserInfo())) {
|
||||
foreach ($info->getUserInfo() as $err) {
|
||||
$ui->outputData(sprintf("[PEAR] %s: %s", $package, $err['message']));
|
||||
}
|
||||
}
|
||||
$ui->outputData(sprintf("[PEAR] %s: %s", $package, $info->getMessage()));
|
||||
continue;
|
||||
}
|
||||
$new_ver = $info->getVersion();
|
||||
$downloaderpackage = new PEAR_Downloader_Package($installer);
|
||||
$err = $downloaderpackage->initialize($instfile);
|
||||
if (PEAR::isError($err)) {
|
||||
$ui->outputData(sprintf("[PEAR] %s: %s", $package, $err->getMessage()));
|
||||
continue;
|
||||
}
|
||||
if ($reg->packageExists($package)) {
|
||||
$old_ver = $reg->packageInfo($package, 'version');
|
||||
if (version_compare($new_ver, $old_ver, 'gt')) {
|
||||
$installer->setOptions($options);
|
||||
$dp = array($downloaderpackage);
|
||||
$installer->setDownloadedPackages($dp);
|
||||
$err = $installer->install($downloaderpackage, $options);
|
||||
if (PEAR::isError($err)) {
|
||||
$ui->outputData(sprintf("[PEAR] %s: %s", $package, $err->getMessage()));
|
||||
continue;
|
||||
}
|
||||
$ui->outputData(sprintf("[PEAR] %-15s- upgraded: %s", $package, $new_ver));
|
||||
} else {
|
||||
if ($force) {
|
||||
$options['force'] = true;
|
||||
$installer->setOptions($options);
|
||||
$dp = array($downloaderpackage);
|
||||
$installer->setDownloadedPackages($dp);
|
||||
$err = $installer->install($downloaderpackage, $options);
|
||||
if (PEAR::isError($err)) {
|
||||
$ui->outputData(sprintf("[PEAR] %s: %s", $package, $err->getMessage()));
|
||||
continue;
|
||||
}
|
||||
$ui->outputData(sprintf("[PEAR] %-15s- installed: %s", $package, $new_ver));
|
||||
} else {
|
||||
$ui->outputData(sprintf("[PEAR] %-15s- already installed: %s", $package, $old_ver));
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$options['nodeps'] = true;
|
||||
$installer->setOptions($options);
|
||||
$dp = array($downloaderpackage);
|
||||
$installer->setDownloadedPackages($dp);
|
||||
$err = $installer->install($downloaderpackage, $options);
|
||||
if (PEAR::isError($err)) {
|
||||
$ui->outputData(sprintf("[PEAR] %s: %s", $package, $err->getMessage()));
|
||||
continue;
|
||||
}
|
||||
$ui->outputData(sprintf("[PEAR] %-15s- installed: %s", $package, $new_ver));
|
||||
}
|
||||
if ($package == 'PEAR') {
|
||||
if (is_file($ufile = $config->getConfFile('user'))) {
|
||||
$ui->outputData('Warning! a PEAR user config file already exists from ' .
|
||||
'a previous PEAR installation at ' .
|
||||
"'$ufile'. You may probably want to remove it.");
|
||||
}
|
||||
$config->set('verbose', 1, 'default');
|
||||
if (isset($oldcachedir)) {
|
||||
$config->set('cache_dir', $oldcachedir);
|
||||
}
|
||||
$data = array();
|
||||
foreach ($config->getKeys() as $key) {
|
||||
$data[$key] = $config->get($key);
|
||||
}
|
||||
$cnf_file = $config->getConfFile('system');
|
||||
if (!empty($install_root)) {
|
||||
$cnf_file = $install_root . DIRECTORY_SEPARATOR . $cnf_file;
|
||||
}
|
||||
$config->writeConfigFile($cnf_file, 'system', $data);
|
||||
$ui->outputData('Wrote PEAR system config file at: ' . $cnf_file);
|
||||
$ui->outputData('You may want to add: ' . $config->get('php_dir') . ' to your php.ini include_path');
|
||||
}
|
||||
}
|
||||
?>
|
||||
<?php
|
||||
|
||||
/* $Id: install-pear.php,v 1.38 2009/04/20 04:32:22 cellog Exp $ */
|
||||
|
||||
error_reporting(1803);
|
||||
|
||||
if (ini_get('date.timezone') === '' && function_exists('date_default_timezone_set')) {
|
||||
date_default_timezone_set('UTC');
|
||||
}
|
||||
|
||||
$pear_dir = dirname(__FILE__);
|
||||
ini_set('include_path', '');
|
||||
if (function_exists('mb_internal_encoding')) {
|
||||
mb_internal_encoding('ASCII');
|
||||
}
|
||||
set_time_limit(0);
|
||||
include_once 'PEAR.php';
|
||||
include_once 'PEAR/Installer.php';
|
||||
include_once 'PEAR/Registry.php';
|
||||
include_once 'PEAR/PackageFile.php';
|
||||
include_once 'PEAR/Downloader/Package.php';
|
||||
include_once 'PEAR/Frontend.php';
|
||||
$a = true;
|
||||
if (!PEAR::loadExtension('xml')) {
|
||||
$a = false;
|
||||
echo "[PEAR] xml extension is required\n";
|
||||
}
|
||||
if (!PEAR::loadExtension('pcre')) {
|
||||
$a = false;
|
||||
echo "[PEAR] pcre extension is required\n";
|
||||
}
|
||||
if (!$a) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
$force = false;
|
||||
$install_files = array();
|
||||
array_shift($argv);
|
||||
$debug = false;
|
||||
for ($i = 0; $i < sizeof($argv); $i++) {
|
||||
$arg = $argv[$i];
|
||||
$bn = basename($arg);
|
||||
if (ereg('package-(.*)\.xml$', $bn, $matches) ||
|
||||
ereg('([A-Za-z0-9_:]+)-.*\.(tar|tgz)$', $bn, $matches)) {
|
||||
$install_files[$matches[1]] = $arg;
|
||||
} elseif ($arg == '-a') {
|
||||
$cache_dir = $argv[$i+1];
|
||||
$i++;
|
||||
} elseif ($arg == '--force') {
|
||||
$force = true;
|
||||
} elseif ($arg == '-dp') {
|
||||
$prefix = $argv[$i+1];
|
||||
$i++;
|
||||
} elseif ($arg == '-ds') {
|
||||
$suffix = $argv[$i+1];
|
||||
$i++;
|
||||
} elseif ($arg == '-d') {
|
||||
$with_dir = $argv[$i+1];
|
||||
$i++;
|
||||
} elseif ($arg == '-b') {
|
||||
$bin_dir = $argv[$i+1];
|
||||
$i++;
|
||||
} elseif ($arg == '-c') {
|
||||
$cfg_dir = $argv[$i+1];
|
||||
$i++;
|
||||
} elseif ($arg == '-w') {
|
||||
$www_dir = $argv[$i+1];
|
||||
$i++;
|
||||
} elseif ($arg == '-p') {
|
||||
$php_bin = $argv[$i+1];
|
||||
$i++;
|
||||
} elseif ($arg == '-o') {
|
||||
$download_dir = $argv[$i+1];
|
||||
$i++;
|
||||
} elseif ($arg == '-t') {
|
||||
$temp_dir = $argv[$i+1];
|
||||
$i++;
|
||||
} elseif ($arg == '--debug') {
|
||||
$debug = 1;
|
||||
} elseif ($arg == '--extremedebug') {
|
||||
$debug = 2;
|
||||
}
|
||||
}
|
||||
|
||||
$config = PEAR_Config::singleton();
|
||||
|
||||
if (PEAR::isError($config)) {
|
||||
$locs = PEAR_Config::getDefaultConfigFiles();
|
||||
die("ERROR: One of $locs[user] or $locs[system] is corrupt, please remove them and try again");
|
||||
}
|
||||
|
||||
// make sure we use only default values
|
||||
$config_layers = $config->getLayers();
|
||||
foreach ($config_layers as $layer) {
|
||||
if ($layer == 'default') continue;
|
||||
$config->removeLayer($layer);
|
||||
}
|
||||
$keys = $config->getKeys();
|
||||
if ($debug) {
|
||||
$config->set('verbose', 5, 'default');
|
||||
} else {
|
||||
$config->set('verbose', 0, 'default');
|
||||
}
|
||||
// PEAR executables
|
||||
if (!empty($bin_dir)) {
|
||||
$config->set('bin_dir', $bin_dir, 'default');
|
||||
}
|
||||
|
||||
// Cache files
|
||||
if (!empty($cache_dir)) {
|
||||
$config->set('cache_dir', $cache_dir, 'default');
|
||||
}
|
||||
|
||||
// Config files
|
||||
if (!empty($cfg_dir)) {
|
||||
$config->set('cfg_dir', $cfg_dir, 'default');
|
||||
}
|
||||
|
||||
// Web files
|
||||
if (!empty($www_dir)) {
|
||||
$config->set('www_dir', $www_dir, 'default');
|
||||
}
|
||||
|
||||
// Downloaded files
|
||||
if (!empty($download_dir)) {
|
||||
$config->set('download_dir', $download_dir, 'default');
|
||||
}
|
||||
|
||||
// Temporary files
|
||||
if (!empty($temp_dir)) {
|
||||
$config->set('temp_dir', $temp_dir, 'default');
|
||||
}
|
||||
|
||||
// User supplied a dir prefix
|
||||
if (!empty($with_dir)) {
|
||||
$ds = DIRECTORY_SEPARATOR;
|
||||
$config->set('php_dir', $with_dir, 'default');
|
||||
$config->set('doc_dir', $with_dir . $ds . 'doc', 'default');
|
||||
$config->set('data_dir', $with_dir . $ds . 'data', 'default');
|
||||
$config->set('test_dir', $with_dir . $ds . 'test', 'default');
|
||||
if (empty($www_dir)) {
|
||||
$config->set('www_dir', $with_dir . $ds . 'htdocs', 'default');
|
||||
}
|
||||
if (empty($cfg_dir)) {
|
||||
$config->set('cfg_dir', $with_dir . $ds . 'cfg', 'default');
|
||||
}
|
||||
if (!is_writable($config->get('cache_dir'))) {
|
||||
include_once 'System.php';
|
||||
$cdir = System::mktemp(array('-d', 'pear'));
|
||||
if (PEAR::isError($cdir)) {
|
||||
$ui->outputData("[PEAR] cannot make new temporary directory: " . $cdir);
|
||||
die(1);
|
||||
}
|
||||
$oldcachedir = $config->get('cache_dir');
|
||||
$config->set('cache_dir', $cdir);
|
||||
}
|
||||
}
|
||||
|
||||
// PHP executable
|
||||
if (!empty($php_bin)) {
|
||||
$config->set('php_bin', $php_bin);
|
||||
}
|
||||
|
||||
// PHP prefix
|
||||
if (isset($prefix)) {
|
||||
if ($prefix != 'a') {
|
||||
if ($prefix[0] == 'a') {
|
||||
$prefix = substr($prefix, 1);
|
||||
}
|
||||
$config->set('php_prefix', $prefix, 'system');
|
||||
}
|
||||
}
|
||||
|
||||
// PHP suffix
|
||||
if (isset($suffix)) {
|
||||
if ($suffix != 'a') {
|
||||
if ($suffix[0] == 'a') {
|
||||
$suffix = substr($suffix, 1);
|
||||
}
|
||||
$config->set('php_suffix', $suffix, 'system');
|
||||
}
|
||||
}
|
||||
|
||||
/* Print PEAR Conf (useful for debuging do NOT REMOVE) */
|
||||
if ($debug) {
|
||||
sort($keys);
|
||||
foreach ($keys as $key) {
|
||||
echo $key . ' ' .
|
||||
$config->getPrompt($key) . ": " . $config->get($key, null, 'default') . "\n";
|
||||
}
|
||||
if ($debug == 2) { // extreme debugging
|
||||
exit;
|
||||
}
|
||||
}
|
||||
// end print
|
||||
|
||||
$php_dir = $config->get('php_dir');
|
||||
$options = array();
|
||||
$options['upgrade'] = true;
|
||||
$install_root = getenv('INSTALL_ROOT');
|
||||
if (!empty($install_root)) {
|
||||
$options['packagingroot'] = $install_root;
|
||||
$reg = &new PEAR_Registry($options['packagingroot']);
|
||||
} else {
|
||||
$reg = $config->getRegistry('default');
|
||||
}
|
||||
|
||||
$ui = PEAR_Frontend::singleton('PEAR_Frontend_CLI');
|
||||
if (PEAR::isError($ui)) {
|
||||
die($ui->getMessage());
|
||||
}
|
||||
$installer = new PEAR_Installer($ui);
|
||||
$pkg = new PEAR_PackageFile($config, $debug);
|
||||
|
||||
foreach ($install_files as $package => $instfile) {
|
||||
$info = $pkg->fromAnyFile($instfile, PEAR_VALIDATE_INSTALLING);
|
||||
if (PEAR::isError($info)) {
|
||||
if (is_array($info->getUserInfo())) {
|
||||
foreach ($info->getUserInfo() as $err) {
|
||||
$ui->outputData(sprintf("[PEAR] %s: %s", $package, $err['message']));
|
||||
}
|
||||
}
|
||||
$ui->outputData(sprintf("[PEAR] %s: %s", $package, $info->getMessage()));
|
||||
continue;
|
||||
}
|
||||
$new_ver = $info->getVersion();
|
||||
$downloaderpackage = new PEAR_Downloader_Package($installer);
|
||||
$err = $downloaderpackage->initialize($instfile);
|
||||
if (PEAR::isError($err)) {
|
||||
$ui->outputData(sprintf("[PEAR] %s: %s", $package, $err->getMessage()));
|
||||
continue;
|
||||
}
|
||||
if ($reg->packageExists($package)) {
|
||||
$old_ver = $reg->packageInfo($package, 'version');
|
||||
if (version_compare($new_ver, $old_ver, 'gt')) {
|
||||
$installer->setOptions($options);
|
||||
$dp = array($downloaderpackage);
|
||||
$installer->setDownloadedPackages($dp);
|
||||
$err = $installer->install($downloaderpackage, $options);
|
||||
if (PEAR::isError($err)) {
|
||||
$ui->outputData(sprintf("[PEAR] %s: %s", $package, $err->getMessage()));
|
||||
continue;
|
||||
}
|
||||
$ui->outputData(sprintf("[PEAR] %-15s- upgraded: %s", $package, $new_ver));
|
||||
} else {
|
||||
if ($force) {
|
||||
$options['force'] = true;
|
||||
$installer->setOptions($options);
|
||||
$dp = array($downloaderpackage);
|
||||
$installer->setDownloadedPackages($dp);
|
||||
$err = $installer->install($downloaderpackage, $options);
|
||||
if (PEAR::isError($err)) {
|
||||
$ui->outputData(sprintf("[PEAR] %s: %s", $package, $err->getMessage()));
|
||||
continue;
|
||||
}
|
||||
$ui->outputData(sprintf("[PEAR] %-15s- installed: %s", $package, $new_ver));
|
||||
} else {
|
||||
$ui->outputData(sprintf("[PEAR] %-15s- already installed: %s", $package, $old_ver));
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$options['nodeps'] = true;
|
||||
$installer->setOptions($options);
|
||||
$dp = array($downloaderpackage);
|
||||
$installer->setDownloadedPackages($dp);
|
||||
$err = $installer->install($downloaderpackage, $options);
|
||||
if (PEAR::isError($err)) {
|
||||
$ui->outputData(sprintf("[PEAR] %s: %s", $package, $err->getMessage()));
|
||||
continue;
|
||||
}
|
||||
$ui->outputData(sprintf("[PEAR] %-15s- installed: %s", $package, $new_ver));
|
||||
}
|
||||
if ($package == 'PEAR') {
|
||||
if (is_file($ufile = $config->getConfFile('user'))) {
|
||||
$ui->outputData('Warning! a PEAR user config file already exists from ' .
|
||||
'a previous PEAR installation at ' .
|
||||
"'$ufile'. You may probably want to remove it.");
|
||||
}
|
||||
$config->set('verbose', 1, 'default');
|
||||
if (isset($oldcachedir)) {
|
||||
$config->set('cache_dir', $oldcachedir);
|
||||
}
|
||||
$data = array();
|
||||
foreach ($config->getKeys() as $key) {
|
||||
$data[$key] = $config->get($key);
|
||||
}
|
||||
$cnf_file = $config->getConfFile('system');
|
||||
if (!empty($install_root)) {
|
||||
$cnf_file = $install_root . DIRECTORY_SEPARATOR . $cnf_file;
|
||||
}
|
||||
$config->writeConfigFile($cnf_file, 'system', $data);
|
||||
$ui->outputData('Wrote PEAR system config file at: ' . $cnf_file);
|
||||
$ui->outputData('You may want to add: ' . $config->get('php_dir') . ' to your php.ini include_path');
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
@ -1,21 +1,22 @@
|
||||
|
||||
%define peardir %{_datadir}/pear
|
||||
%global peardir %{_datadir}/pear
|
||||
|
||||
%define xmlrpcver 1.5.1
|
||||
%define getoptver 1.2.3
|
||||
%define arctarver 1.3.2
|
||||
%define structver 1.0.2
|
||||
%global xmlrpcver 1.5.1
|
||||
%global getoptver 1.2.3
|
||||
%global arctarver 1.3.3
|
||||
%global structver 1.0.2
|
||||
%global xmlutil 1.2.1
|
||||
|
||||
Summary: PHP Extension and Application Repository framework
|
||||
Name: php-pear
|
||||
Version: 1.7.2
|
||||
Release: 3%{?dist}
|
||||
Version: 1.8.1
|
||||
Release: 1%{?dist}
|
||||
Epoch: 1
|
||||
License: PHP
|
||||
Group: Development/Languages
|
||||
URL: http://pear.php.net/package/PEAR
|
||||
Source0: http://download.pear.php.net/package/PEAR-%{version}.tgz
|
||||
# wget http://cvs.php.net/viewvc.cgi/pear-core/install-pear.php?revision=1.31 -O install-pear.php
|
||||
# wget http://cvs.php.net/viewvc.cgi/pear-core/install-pear.php?revision=1.39 -O install-pear.php
|
||||
Source1: install-pear.php
|
||||
Source2: relocate.php
|
||||
Source3: strip.php
|
||||
@ -28,6 +29,7 @@ Source20: http://pear.php.net/get/XML_RPC-%{xmlrpcver}.tgz
|
||||
Source21: http://pear.php.net/get/Archive_Tar-%{arctarver}.tgz
|
||||
Source22: http://pear.php.net/get/Console_Getopt-%{getoptver}.tgz
|
||||
Source23: http://pear.php.net/get/Structures_Graph-%{structver}.tgz
|
||||
Source24: http://pear.php.net/get/XML_Util-%{xmlutil}.tgz
|
||||
|
||||
BuildArch: noarch
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||
@ -37,6 +39,9 @@ Provides: php-pear(Archive_Tar) = %{arctarver}
|
||||
Provides: php-pear(PEAR) = %{version}
|
||||
Provides: php-pear(Structures_Graph) = %{structver}
|
||||
Provides: php-pear(XML_RPC) = %{xmlrpcver}
|
||||
Provides: php-pear(XML_Util) = %{xmlutil}
|
||||
Obsoletes: php-pear-XML-Util <= %{xmlutil}
|
||||
Provides: php-pear-XML-Util = %{xmlutil}-%{release}
|
||||
Requires: php-cli >= 5.1.0-1
|
||||
|
||||
%description
|
||||
@ -47,10 +52,12 @@ components. This package contains the basic PEAR components.
|
||||
%setup -cT
|
||||
|
||||
# Create a usable PEAR directory (used by install-pear.php)
|
||||
for archive in %{SOURCE0} %{SOURCE21} %{SOURCE22} %{SOURCE23}
|
||||
for archive in %{SOURCE0} %{SOURCE21} %{SOURCE22} %{SOURCE23} %{SOURCE24}
|
||||
do
|
||||
tar xzf $archive --strip-components 1 || tar xzf $archive --strip-path 1
|
||||
done
|
||||
tar xzf %{SOURCE24} package.xml
|
||||
mv package.xml XML_Util.xml
|
||||
|
||||
# apply patches on used PEAR during install
|
||||
# -- no patch
|
||||
@ -74,6 +81,7 @@ export PHP_PEAR_TEMP_DIR=/var/tmp
|
||||
|
||||
install -d $RPM_BUILD_ROOT%{peardir} \
|
||||
$RPM_BUILD_ROOT%{_localstatedir}/cache/php-pear \
|
||||
$RPM_BUILD_ROOT%{_localstatedir}/www/html \
|
||||
$RPM_BUILD_ROOT%{peardir}/.pkgxml \
|
||||
$RPM_BUILD_ROOT%{_sysconfdir}/rpm \
|
||||
$RPM_BUILD_ROOT%{_sysconfdir}/pear
|
||||
@ -85,7 +93,8 @@ export INSTALL_ROOT=$RPM_BUILD_ROOT
|
||||
%{SOURCE1} -d %{peardir} \
|
||||
-c %{_sysconfdir}/pear \
|
||||
-b %{_bindir} \
|
||||
%{SOURCE0} %{SOURCE21} %{SOURCE22} %{SOURCE23} %{SOURCE20}
|
||||
-w %{_localstatedir}/www/html \
|
||||
%{SOURCE0} %{SOURCE21} %{SOURCE22} %{SOURCE23} %{SOURCE24} %{SOURCE20}
|
||||
|
||||
# Replace /usr/bin/* with simple scripts:
|
||||
install -m 755 %{SOURCE10} $RPM_BUILD_ROOT%{_bindir}/pear
|
||||
@ -106,12 +115,17 @@ install -m 644 -c %{SOURCE13} \
|
||||
$RPM_BUILD_ROOT%{_sysconfdir}/rpm/macros.pear
|
||||
|
||||
# apply patches on installed PEAR tree
|
||||
cd $RPM_BUILD_ROOT%{peardir}
|
||||
pushd $RPM_BUILD_ROOT%{peardir}
|
||||
# -- no patch
|
||||
popd
|
||||
|
||||
# Why this file here ?
|
||||
rm -rf $RPM_BUILD_ROOT/.depdb* $RPM_BUILD_ROOT/.lock $RPM_BUILD_ROOT/.channels $RPM_BUILD_ROOT/.filemap
|
||||
|
||||
# Need for re-registrying XML_Util
|
||||
install -m 644 XML_Util.xml $RPM_BUILD_ROOT%{peardir}/.pkgxml/
|
||||
|
||||
|
||||
%check
|
||||
# Check that no bogus paths are left in the configuration, or in
|
||||
# the generated registry files.
|
||||
@ -121,10 +135,17 @@ grep '"/tmp"' $RPM_BUILD_ROOT%{_sysconfdir}/pear.conf && exit 1
|
||||
grep /usr/local $RPM_BUILD_ROOT%{_sysconfdir}/pear.conf && exit 1
|
||||
grep -rl $RPM_BUILD_ROOT $RPM_BUILD_ROOT && exit 1
|
||||
|
||||
|
||||
%clean
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
rm new-pear.conf
|
||||
|
||||
|
||||
%triggerpostun -- php-pear-XML-Util
|
||||
# re-register extension unregistered during postun of obsoleted php-pear-XML-Util
|
||||
%{_bindir}/pear install --nodeps --soft --force --register-only %{pear_xmldir}/XML_Util.xml >/dev/null || :
|
||||
|
||||
|
||||
%files
|
||||
%defattr(-,root,root,-)
|
||||
%{peardir}
|
||||
@ -132,10 +153,17 @@ rm new-pear.conf
|
||||
%config(noreplace) %{_sysconfdir}/pear.conf
|
||||
%config %{_sysconfdir}/rpm/macros.pear
|
||||
%dir %{_localstatedir}/cache/php-pear
|
||||
%dir %{_localstatedir}/www/html
|
||||
%dir %{_sysconfdir}/pear
|
||||
%doc LICENSE README
|
||||
|
||||
|
||||
%changelog
|
||||
* Sat May 30 2009 Remi Collet <Fedora@FamilleCollet.com> 1:1.8.1-1
|
||||
- update to 1.8.1
|
||||
- Update install-pear.php script (1.39)
|
||||
- add XML_Util
|
||||
|
||||
* Thu Feb 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1:1.7.2-3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
|
||||
|
||||
@ -147,7 +175,7 @@ rm new-pear.conf
|
||||
- Update install-pear.php script (1.32)
|
||||
|
||||
* Tue Mar 11 2008 Tim Jackson <rpm@timj.co.uk> 1:1.7.1-2
|
||||
- Set cfg_dir to be %{_sysconfdir}/pear (and own it)
|
||||
- Set cfg_dir to be %%{_sysconfdir}/pear (and own it)
|
||||
- Update install-pear.php script
|
||||
- Add %%pear_cfgdir and %%pear_wwwdir macros
|
||||
|
||||
|
5
sources
5
sources
@ -1,5 +1,6 @@
|
||||
6614c4862f16c80eadb2d00b776d33c0 PEAR-1.7.2.tgz
|
||||
17d49e837b64df4e8f9124f829b22cd1 Archive_Tar-1.3.2.tgz
|
||||
38d443cba3f2dc378fdadb73075dcad9 Archive_Tar-1.3.3.tgz
|
||||
d7618327f9302a7191893768982de823 Console_Getopt-1.2.3.tgz
|
||||
03f7d3b1aececfd45302c9235103299c PEAR-1.8.1.tgz
|
||||
2664e2d024048f982e12fad4d1bfbb87 Structures_Graph-1.0.2.tgz
|
||||
1b516162ad65971b5fd04a7c279627ec XML_RPC-1.5.1.tgz
|
||||
b8d4efcdb11b308b179f7bb63043284f XML_Util-1.2.1.tgz
|
||||
|
Loading…
Reference in New Issue
Block a user