Skip to content

Commit

Permalink
Polishing packaging related files.
Browse files Browse the repository at this point in the history
  • Loading branch information
boenrobot committed Aug 2, 2012
1 parent 01f522c commit 2c4fe98
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 24 deletions.
22 changes: 11 additions & 11 deletions extrasetup.php
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
<?php
$extrafiles = array();

$phpDir = Pyrus\Config::current()->php_dir . DIRECTORY_SEPARATOR;
$phpDir = Pyrus\Config::current()->php_dir;
$packages = array('PEAR2/Autoload', 'PEAR2/Cache/SHM');

$oldCwd = getcwd();
chdir($phpDir);
foreach ($packages as $pkg) {
$prefix = $phpDir . $pkg;

if (is_dir($prefix)) {
if (is_dir($pkg)) {
foreach (
new RecursiveIteratorIterator(
new RecursiveDirectoryIterator(
$prefix,
$pkg,
RecursiveDirectoryIterator::UNIX_PATHS
),
RecursiveIteratorIterator::LEAVES_ONLY
) as $path
) {
$pathname = $path->getPathname();
$extrafiles['src/' . $pathname] = $pathname;
$extrafiles['src/' . $path->getPathname()] = $path->getRealPath();
}
}

if (is_file($prefix . '.php')) {
$extrafiles['src/' . $pkg . '.php'] = $prefix . '.php';
if (is_file($pkg . '.php')) {
$extrafiles['src/' . $pkg . '.php']
= $phpDir . DIRECTORY_SEPARATOR . $pkg . '.php';
}
}
}
chdir($oldCwd);
19 changes: 12 additions & 7 deletions package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ This package abstracts this away, so that when you want to get exactly N amount
<email>boen.robot@gmail.com</email>
<active>yes</active>
</lead>
<date>2012-07-11</date>
<time>00:15:41</time>
<date>2012-08-03</date>
<time>02:47:16</time>
<version>
<release>1.0.0a3</release>
<api>1.0.0</api>
Expand Down Expand Up @@ -112,11 +112,16 @@ This package abstracts this away, so that when you want to get exactly N amount
</pearinstaller>
</required>
<optional>
<package>
<name>PEAR2_Cache_SHM</name>
<channel>pear2.php.net</channel>
<min>0.1.0</min>
</package>
<package>
<name>PEAR2_Autoload</name>
<channel>pear2.php.net</channel>
<min>0.2.4</min>
</package>
<package>
<name>PEAR2_Cache_SHM</name>
<channel>pear2.php.net</channel>
<min>0.1.0</min>
</package>
</optional>
</dependencies>
<phprelease>
Expand Down
12 changes: 6 additions & 6 deletions stub.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
if ($isNotCli) {
header('Content-Type: text/plain;charset=UTF-8');
}
echo "PEAR2_Net_Transmitter @PACKAGE_VERSION@\n";
echo "@PACKAGE_NAME@ @PACKAGE_VERSION@\n";

if (version_compare(phpversion(), '5.3.0', '<')) {
echo "\nThis package requires PHP 5.3.0 or later.";
Expand All @@ -26,15 +26,15 @@

if (function_exists('stream_socket_client')) {
echo <<<HEREDOC
The stream_socket_client() function is enabled.\n
The stream_socket_client() function is enabled.
If you can't connect to a host, this means one
of the following:\n
of the following:
1. You've mistyped the IP and/or port. Check the IP and port you've specified
are the one you intended.\n
are the one you intended.
2. The host is not reachable from your web server. Try to reach the host
from the web server by other means (e.g. ping) using the same IP, and if
you're unable to reach it, check your network's settings.\n
2. Your web server is configured to forbid that outgoing connection. If you're
you're unable to reach it, check your network's settings.
3. Your web server is configured to forbid that outgoing connection. If you're
the web server administrator, check your firewall's settings. If you're on a
hosting plan... Typically, shared hosts block all outgoing connections, but it's
also possible that only connections to that port are blocked. If the remote host
Expand Down

0 comments on commit 2c4fe98

Please sign in to comment.