diff -up package.xml.orig package.xml
--- package.xml.orig 1970-01-01 10:13:24.000000000 +0100
+++ package.xml 2010-02-20 08:48:51.000000000 +0100
@@ -66,7 +66,7 @@
<contents>
<dir baseinstalldir="PEAR/Command" name="/">
<file baseinstalldir="PEAR/Command" md5sum="72a74194c78677dba2584098c3b53a2e" name="Packaging.xml" role="php" />
- <file baseinstalldir="PEAR/Command" md5sum="70509a4f539f3f8b219fccf38831a38b" name="Packaging.php" role="php">
+ <file baseinstalldir="PEAR/Command" md5sum="5f97e963109b46d09427c23b64a40155" name="Packaging.php" role="php">
<tasks:replace from="@DATA-DIR@" to="data_dir" type="pear-config" />
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
diff -up PEAR_Command_Packaging-0.2.0/Packaging.php.orig PEAR_Command_Packaging-0.2.0/Packaging.php
--- PEAR_Command_Packaging-0.2.0/Packaging.php.orig 2010-02-20 08:48:14.000000000 +0100
+++ PEAR_Command_Packaging-0.2.0/Packaging.php 2010-02-20 08:48:17.000000000 +0100
@@ -72,15 +72,14 @@ are as follows:
%n = Channel name (full) e.g. pear.example.com
%N = Non standard channel name followed by a "/" (e.g. "pear.example.com/")
-Defaults to "%C::%s" for library/application packages and "php-channel-%c" for
+Defaults to "php-%c-%S" for library/application packages and "php-channel-%c" for
channel packages.',
),
'rpm-depname' => array(
'shortopt' => 'd',
'arg' => 'FORMAT',
'doc' => 'Use FORMAT as format string for naming RPM dependencies. Substitutions
-are as for the --rpm-pkgname option. Defaults to be the same as
-the format defined by the --rpm-pkgname option.',
+are as for the --rpm-pkgname option. Defaults to "php-%c(%s)".',
),
),
'doc' => '<package-file>
@@ -91,10 +90,10 @@ PEAR package tarball in the SOURCES dire
$ cd /path/to/rpm-build-tree/SPECS
$ pear make-rpm-spec ../SOURCES/Net_Socket-1.0.tgz
-Wrote RPM spec file PEAR::Net_Socket-1.0.spec
-$ rpm -bb PEAR::Net_Socket-1.0.spec
+Wrote RPM spec file php-pear-Net-Socket.spec
+$ rpm -bb php-pear-Net-Socket.spec
...
-Wrote: /path/to/rpm-build-tree/RPMS/noarch/PEAR::Net_Socket-1.0-1.noarch.rpm
+Wrote: /path/to/rpm-build-tree/RPMS/noarch/php-pear-Net-Socket-1.0-1.noarch.rpm
',
),
);
@@ -121,7 +120,7 @@ Wrote: /path/to/rpm-build-tree/RPMS/noar
* $commands array above and in Packaging.xml so that it is consistent.
*/
var $_rpm_pkgname_format = array(
- 'pkg' => '%C::%s',
+ 'pkg' => 'php-%c-%S',
'chan' => 'php-channel-%c',
);
@@ -140,9 +139,9 @@ Wrote: /path/to/rpm-build-tree/RPMS/noar
* %P = use the same as whatever rpm_pkgname_format is set to be
*/
var $_rpm_depname_format = array(
- 'pkg' => '%P',
+ 'pkg' => 'php-pear(%N%s)',
'ext' => 'php-%l',
- 'php' => 'php',
+ 'php' => 'php-common',
'chan' => 'php-channel(%n)',
);
@@ -159,7 +158,7 @@ Wrote: /path/to/rpm-build-tree/RPMS/noar
* chan - used when generating a spec file for a channel
*/
var $_rpm_specname_format = array(
- 'pkg' => '%P-%v.spec',
+ 'pkg' => '%P.spec',
'chan' => 'php-channel-%c.spec'
);
@@ -182,14 +181,14 @@ Wrote: /path/to/rpm-build-tree/RPMS/noar
* need to be listed here
*/
var $_file_prefixes = array(
- 'php' => '%{_libdir}/php/pear',
+ 'php' => '%{pear_phpdir}',
'doc' => '',
- 'ext' => '%{_libdir}/php',
- 'test' => '%{_libdir}/php/tests/%s',
- 'data' => '%{_libdir}/php/data/%s',
+ 'ext' => '%{_libdir}/php/modules',
+ 'test' => '%{pear_testdir}/%s',
+ 'data' => '%{pear_datadir}/%s',
'script' => '%{_bindir}',
'cfg' => '%{_sysconfdir}/pear',
- 'www' => '%{_datadir}/pear/www'
+ 'www' => '%{pear_wwwdir}/%s'
);
/**
@@ -197,7 +196,7 @@ Wrote: /path/to/rpm-build-tree/RPMS/noar
* printf format. The first '%s' is the RPM header name followed by a colon,
* the second is the header value.
*/
- var $_spec_line_format = '%s %s';
+ var $_spec_line_format = '%-16s%s';
// ------------------------------------------------------------------------
// --- END DISTRIBUTION CONFIG
@@ -593,13 +592,15 @@ Wrote: /path/to/rpm-build-tree/RPMS/noar
if ($pf->getDeps()) {
$this->_generatePackageDeps($pf);
}
-
+
+ /* Fedora: we handle this in our template spec
// Hook to support virtual Provides, where the dependency name differs
// from the package name
$rpmdep = $this->_getRPMName($pf->getPackage(), $pf->getChannel(), null, 'pkgdep');
if (!empty($rpmdep) && $rpmdep != $this->_output['rpm_package']) {
$this->_output['extra_headers'] .= $this->_formatRpmHeader('Provides', "$rpmdep = %{version}") . "\n";
}
+ */
// Create the list of files in the package
foreach ($package_info['filelist'] as $filename => $attr) {
@@ -657,9 +658,9 @@ Wrote: /path/to/rpm-build-tree/RPMS/noar
// Handle doc files
if (isset($file_list['doc'])) {
- $this->_output['doc_files'] = 'docs/' . $pf->getPackage() . '/*';
+ $this->_output['doc_files'] = '%{pear_docdir}/%{pear_name}';
$this->_output['doc_files_statement'] = '%doc ' . $this->_output['doc_files'];
- $this->_output['doc_files_relocation_script'] = "mv %{buildroot}/docs .\n";
+ $this->_output['doc_files_relocation_script'] = "# Move documentation\nmkdir -p docdir\nmv \$RPM_BUILD_ROOT%{pear_docdir}/* docdir\n";
}
// Work out architecture