Skip to content

Commit 2c4fe98

Browse files
committed
Polishing packaging related files.
1 parent 01f522c commit 2c4fe98

File tree

3 files changed

+29
-24
lines changed

3 files changed

+29
-24
lines changed

extrasetup.php

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,28 @@
11
<?php
22
$extrafiles = array();
3-
4-
$phpDir = Pyrus\Config::current()->php_dir . DIRECTORY_SEPARATOR;
3+
$phpDir = Pyrus\Config::current()->php_dir;
54
$packages = array('PEAR2/Autoload', 'PEAR2/Cache/SHM');
65

6+
$oldCwd = getcwd();
7+
chdir($phpDir);
78
foreach ($packages as $pkg) {
8-
$prefix = $phpDir . $pkg;
9-
10-
if (is_dir($prefix)) {
9+
if (is_dir($pkg)) {
1110
foreach (
1211
new RecursiveIteratorIterator(
1312
new RecursiveDirectoryIterator(
14-
$prefix,
13+
$pkg,
1514
RecursiveDirectoryIterator::UNIX_PATHS
1615
),
1716
RecursiveIteratorIterator::LEAVES_ONLY
1817
) as $path
1918
) {
20-
$pathname = $path->getPathname();
21-
$extrafiles['src/' . $pathname] = $pathname;
19+
$extrafiles['src/' . $path->getPathname()] = $path->getRealPath();
2220
}
2321
}
2422

25-
if (is_file($prefix . '.php')) {
26-
$extrafiles['src/' . $pkg . '.php'] = $prefix . '.php';
23+
if (is_file($pkg . '.php')) {
24+
$extrafiles['src/' . $pkg . '.php']
25+
= $phpDir . DIRECTORY_SEPARATOR . $pkg . '.php';
2726
}
28-
}
27+
}
28+
chdir($oldCwd);

package.xml

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ This package abstracts this away, so that when you want to get exactly N amount
1313
<email>[email protected]</email>
1414
<active>yes</active>
1515
</lead>
16-
<date>2012-07-11</date>
17-
<time>00:15:41</time>
16+
<date>2012-08-03</date>
17+
<time>02:47:16</time>
1818
<version>
1919
<release>1.0.0a3</release>
2020
<api>1.0.0</api>
@@ -112,11 +112,16 @@ This package abstracts this away, so that when you want to get exactly N amount
112112
</pearinstaller>
113113
</required>
114114
<optional>
115-
<package>
116-
<name>PEAR2_Cache_SHM</name>
117-
<channel>pear2.php.net</channel>
118-
<min>0.1.0</min>
119-
</package>
115+
<package>
116+
<name>PEAR2_Autoload</name>
117+
<channel>pear2.php.net</channel>
118+
<min>0.2.4</min>
119+
</package>
120+
<package>
121+
<name>PEAR2_Cache_SHM</name>
122+
<channel>pear2.php.net</channel>
123+
<min>0.1.0</min>
124+
</package>
120125
</optional>
121126
</dependencies>
122127
<phprelease>

stub.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
if ($isNotCli) {
1212
header('Content-Type: text/plain;charset=UTF-8');
1313
}
14-
echo "PEAR2_Net_Transmitter @PACKAGE_VERSION@\n";
14+
echo "@PACKAGE_NAME@ @PACKAGE_VERSION@\n";
1515

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

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

0 commit comments

Comments
 (0)