--- Packaging.php.orig 1970-01-01 10:13:24.000000000 +0100
+++ Packaging.php 2009-06-27 22:05:09.000000000 +0100
@@ -72,15 +72,14 @@
%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 @@
$ 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 @@
* $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,7 +139,7 @@
* %P = use the same as whatever rpm_pkgname_format is set to be
*/
var $_rpm_depname_format = array(
- 'pkg' => '%P',
+ 'pkg' => 'php-(%N%s)',
'ext' => 'php-%l',
'php' => 'php',
'chan' => 'php-channel(%n)',
@@ -159,7 +158,7 @@
* 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 @@
* 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 @@
* 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 @@
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 @@
// Handle doc files
if (isset($file_list['doc'])) {
- $this->_output['doc_files'] = 'docs/' . $pf->getPackage() . '/*';
+ $this->_output['doc_files'] = '%{pear_name}-%{version}/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