packages: php-pear-PEAR_Command_Packaging/php-pear-PEAR_Command_Packaging.p...

glen glen at pld-linux.org
Sun Aug 22 10:58:23 CEST 2010


Author: glen                         Date: Sun Aug 22 08:58:23 2010 GMT
Module: packages                      Tag: HEAD
---- Log message:
- different naming policy for pear packages and external repos; rel 5

---- Files affected:
packages/php-pear-PEAR_Command_Packaging:
   php-pear-PEAR_Command_Packaging.patch (1.9 -> 1.10) , php-pear-PEAR_Command_Packaging.spec (1.21 -> 1.22) 

---- Diffs:

================================================================
Index: packages/php-pear-PEAR_Command_Packaging/php-pear-PEAR_Command_Packaging.patch
diff -u packages/php-pear-PEAR_Command_Packaging/php-pear-PEAR_Command_Packaging.patch:1.9 packages/php-pear-PEAR_Command_Packaging/php-pear-PEAR_Command_Packaging.patch:1.10
--- packages/php-pear-PEAR_Command_Packaging/php-pear-PEAR_Command_Packaging.patch:1.9	Sat Aug 21 14:34:15 2010
+++ packages/php-pear-PEAR_Command_Packaging/php-pear-PEAR_Command_Packaging.patch	Sun Aug 22 10:58:18 2010
@@ -1,5 +1,5 @@
---- PEAR_Command_Packaging-0.2.0/usr/share/pear/PEAR/Command/Packaging.php	2010-08-21 12:49:51.257395974 +0300
-+++ PEAR_Command_Packaging-0.2.0/usr/share/pear/PEAR/Command/Packaging.php	2010-08-21 15:27:50.933114597 +0300
+--- PEAR_Command_Packaging-0.2.0/usr/share/pear/PEAR/Command/Packaging.php	2010-08-21 15:27:50.933114597 +0300
++++ PEAR_Command_Packaging-0.2.0/usr/share/pear/PEAR/Command/Packaging.php	2010-08-22 11:54:43.779087274 +0300
 @@ -54,6 +54,11 @@
                      'arg' => 'FILE',
                      'doc' => 'Use FILE as RPM spec file template'
@@ -12,26 +12,31 @@
                  'rpm-release' => array(
                      'shortopt' => 'r',
                      'arg' => 'RELEASE',
-@@ -121,7 +126,7 @@
+@@ -121,10 +126,10 @@
       * $commands array above and in Packaging.xml so that it is consistent.
       */
      var $_rpm_pkgname_format = array(
 -        'pkg'  => '%C::%s',
-+        'pkg'  => 'php-pear-%s',
++        'pkg'  => 'php-%s',
          'chan' => 'php-channel-%c',
      );
-     
-@@ -142,7 +147,8 @@
+-    
++
+     /**
+      * The default format of various dependencies that might be generated in the
+      * spec file. The currently-handled dependency types are:
+@@ -142,7 +147,9 @@
      var $_rpm_depname_format = array(
          'pkg'  => '%P',
          'ext'  => 'php-%l',
 -        'php'  => 'php',
++        'pear-pkg' => 'php-pear-%s',
 +        'pecl-ext'  => 'php-pecl-%l',
 +        'php'  => 'php-common',
          'chan' => 'php-channel(%n)',
      );
      
-@@ -159,7 +165,7 @@
+@@ -159,7 +166,7 @@
       * chan - used when generating a spec file for a channel
       */
      var $_rpm_specname_format = array(
@@ -40,7 +45,7 @@
          'chan' => 'php-channel-%c.spec'
      );
      
-@@ -182,11 +188,11 @@
+@@ -182,11 +189,11 @@
       * need to be listed here
       */
      var $_file_prefixes = array(
@@ -56,7 +61,7 @@
          'script' => '%{_bindir}',
          'cfg' => '%{_sysconfdir}/pear',
          'www' => '%{_datadir}/pear/www'
-@@ -197,7 +203,7 @@
+@@ -197,7 +204,7 @@
       * printf format. The first '%s' is the RPM header name followed by a colon,
       * the second is the header value.
       */
@@ -65,7 +70,7 @@
      
      // ------------------------------------------------------------------------
      // --- END DISTRIBUTION CONFIG
-@@ -247,6 +253,7 @@
+@@ -247,6 +254,7 @@
          'test_dir' => '',
          'test_files_statement' => '',// empty string, or list of test files
          'www_files_statement' => '', // empty string, or newline-separated list of files with "www" role
@@ -73,7 +78,7 @@
      );
      
      // The name of the template spec file to use
-@@ -330,15 +337,24 @@
+@@ -330,15 +338,24 @@
          
          // Initialise the RPM package/dep naming format options
          $this->_initialiseNamingOptions($options);        
@@ -100,7 +105,7 @@
          // If source file ends in ".xml" we assume we are creating an RPM spec
          // for a channel rather than an actual package
          if (substr(strtolower($source_file), -4) == '.xml') {
-@@ -378,13 +394,40 @@
+@@ -378,13 +395,40 @@
      /**
       * Format an RPM header line to be added to the spec file
       * @param  string $header The name of the RPM header to be added 
@@ -144,7 +149,7 @@
      
      /**
       * Replace a macro in the output spec file
-@@ -410,16 +453,20 @@
+@@ -410,16 +454,20 @@
          } else {
              $package_name = null;
          }
@@ -174,7 +179,7 @@
          // Write the actual file
          $wp = fopen($spec_file, 'wb');
          if (!$wp) {
-@@ -457,7 +504,7 @@
+@@ -457,7 +505,7 @@
          
          $rpmdep = $this->_getRPMName(null, $cf->getName(), $cf->getAlias(), 'chandep');
          if (!empty($rpmdep) && $rpmdep != $this->_output['rpm_package']) {
@@ -183,7 +188,7 @@
          }
              
          // Channels don't really have version numbers; this will need to be
-@@ -564,7 +611,7 @@
+@@ -564,7 +612,7 @@
          
          // Set up some of the basic macros
          $this->_output['rpm_package'] = $this->_getRPMName($pf->getPackage(), $pf->getChannel(), null, 'pkg');
@@ -192,7 +197,7 @@
          $this->_output['summary'] = trim($package_info['summary']);
          $this->_output['possible_channel'] = $pf->getChannel();
          $this->_output['channel_alias'] = $this->_getChannelAlias($pf->getPackage(), $pf->getChannel());
-@@ -646,11 +693,13 @@
+@@ -646,11 +694,13 @@
              if (substr($this->_file_prefixes[$role], -2) == '%s') {
                  $this->_output[$macro_name] = str_replace('%s', $pf->getPackage(), $this->_file_prefixes[$role]);
              } else {
@@ -209,7 +214,7 @@
              }
          }
          $this->_output['files'] = trim($this->_output['files']);
-@@ -685,12 +734,11 @@
+@@ -685,12 +735,11 @@
  
      function _generatePackageDeps($pf)
      {
@@ -226,7 +231,7 @@
                  
                  if (!isset($dep['type']) || $dep['type'] == 'pkg') {
                      $type = 'pkgdep';
-@@ -698,8 +746,14 @@
+@@ -698,8 +747,14 @@
                      $type = $dep['type'];
                  }
                  
@@ -242,7 +247,7 @@
                  
                  // $package contains the *dependency name* here, which may or may
                  // not be the same as the package name
-@@ -725,21 +779,25 @@
+@@ -725,21 +780,25 @@
                  if ($dep['rel'] == 'has') {
                      // We use $package as the index to the $requires array to de-duplicate deps.
                      // Note that in the case of duplicate deps, versioned deps will "win" - see several lines down.
@@ -277,7 +282,7 @@
          } else {
              $this->_output['package2xml'] = '2'; // tell the spec to use package2.xml
              $deps = $pf->getDeps(true);
-@@ -842,10 +900,10 @@
+@@ -842,10 +901,10 @@
                          }
                      } else {
                          if (isset($dep['min'])) {
@@ -290,8 +295,7 @@
                          }
                          if (isset($dep['exclude'])) {
                              $ex = $dep['exclude'];
-@@ -864,18 +922,109 @@
-                 $a = $tar->extractInString('package2.xml');
+@@ -865,17 +924,108 @@
                  $tar->popErrorHandling();
                  if ($a === null || PEAR::isError($a)) {
 -                    $this->_output['package2xml'] = '';
@@ -303,9 +307,7 @@
 +                    // PLD linux hack: include epoch for PEAR package
 +                    $version = "1:{$version}";
 +                    $buildrequires[$this->_output['pear_rpm_name']] = $this->_output['pear_rpm_name'] . ' >= ' . $version;
-                 }
--                if (count($requires)) {
--                    $this->_output['extra_headers'] .= $this->_formatRpmHeader('Requires', implode(', ', $requires)) . "\n";
++                }
 +            }
 +
 +            if (isset($deps['required']['extension'])) {
@@ -329,9 +331,7 @@
 +            if (isset($deps['required']['subpackage'])) {
 +                if (!isset($deps['required']['subpackage'][0])) {
 +                    $deps['required']['subpackage'] = array($deps['required']['subpackage']);
-                 }
--                if (count($conflicts)) {
--                    $this->_output['extra_headers'] .= $this->_formatRpmHeader('Conflicts', implode(', ', $conflicts)) . "\n";
++                }
 +                foreach ($deps['required']['subpackage'] as $dep) {
 +                    if (!isset($dep['channel'])) $dep['channel'] = null;
 +
@@ -345,13 +345,15 @@
 +
 +                    $requires[$package] = $package;
 +                    // XXX: should be more complese like above with ranges, etc
-                 }
-             }
++                }
++            }
 +
 +            if (isset($deps['optional']['package'])) {
 +                if (!isset($deps['optional']['package'][0])) {
 +                    $deps['optional']['package'] = array($deps['optional']['package']);
-+                }
+                 }
+-                if (count($requires)) {
+-                    $this->_output['extra_headers'] .= $this->_formatRpmHeader('Requires', implode(', ', $requires)) . "\n";
 +                foreach ($deps['optional']['package'] as $dep) {
 +                    if (!isset($dep['channel'])) $dep['channel'] = null;
 +
@@ -368,7 +370,9 @@
 +
 +                    // fill extra info for _noautoreq deps
 +                    $this->_output['_noautoreq'] .= " pear(". str_replace('_', '/', $dep['name']) . ".*)";
-+                }
+                 }
+-                if (count($conflicts)) {
+-                    $this->_output['extra_headers'] .= $this->_formatRpmHeader('Conflicts', implode(', ', $conflicts)) . "\n";
 +            }
 +
 +            if (isset($deps['optional']['extension'])) {
@@ -388,9 +392,9 @@
 +
 +                    // suggests are not versioned (makes no sense in poldek)
 +                    $suggests[$package] = $package;
-+                }
-+            }
-+        }
+                 }
+             }
+         }
 +
 +        // append extra headers which we collected
 +        if (count($buildrequires)) {
@@ -404,10 +408,10 @@
 +        }
 +        if (count($suggests)) {
 +            $this->_output['extra_headers'] .= $this->_formatRpmHeader('Suggests', $suggests) . "\n";
-         }
++        }
      }
  
-@@ -927,7 +1076,12 @@
+@@ -927,7 +1077,14 @@
              case 'pkg':
                  return $this->_getRPMNameFromFormat($this->_rpm_pkgname_format['pkg'], $package_name, $chan_name, $chan_alias);
              case 'pkgdep':
@@ -415,6 +419,8 @@
 +                // PLD Linux: pecl extensions have different naming format
 +                if ($chan_alias == 'PECL') {
 +                    $type = 'pecl-ext';
++                } elseif ($chan_alias == 'PEAR') {
++                    $type = 'pear-pkg';
 +                } else {
 +                    $type = 'pkg';
 +                }

================================================================
Index: packages/php-pear-PEAR_Command_Packaging/php-pear-PEAR_Command_Packaging.spec
diff -u packages/php-pear-PEAR_Command_Packaging/php-pear-PEAR_Command_Packaging.spec:1.21 packages/php-pear-PEAR_Command_Packaging/php-pear-PEAR_Command_Packaging.spec:1.22
--- packages/php-pear-PEAR_Command_Packaging/php-pear-PEAR_Command_Packaging.spec:1.21	Sun Aug 22 10:57:43 2010
+++ packages/php-pear-PEAR_Command_Packaging/php-pear-PEAR_Command_Packaging.spec	Sun Aug 22 10:58:18 2010
@@ -6,8 +6,6 @@
 #   Conflicts:  php-pear-Mail_Mime = 1.4.0
 #   ->
 #   Requires:   php-pear-Mail_Mime > 1.4.0
-# - think something for creole and jargon deps (Mail_Queue)
-#   seems we name such external pkgs (non-pear pkgs) as php-<pkgname>
 # - add minimum php version used (so that the epoch does not go to nonsense for
 #   older php's, yet think that could blow up php4 only pkgs)
 %include	/usr/lib/rpm/macros.php
@@ -17,7 +15,7 @@
 Summary(pl.UTF-8):	%{_pearname} - polecenie make-rpm-spec do zarządzania plikami .spec pakietów PEAR-a
 Name:		php-pear-%{_pearname}
 Version:	0.2.0
-Release:	4
+Release:	5
 License:	PHP 3.01
 Group:		Development/Languages/PHP
 Source0:	http://pear.php.net/get/%{_pearname}-%{version}.tgz
@@ -101,6 +99,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.22  2010/08/22 08:58:18  glen
+- different naming policy for pear packages and external repos; rel 5
+
 Revision 1.21  2010/08/22 08:57:43  glen
 - todo
 
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/php-pear-PEAR_Command_Packaging/php-pear-PEAR_Command_Packaging.patch?r1=1.9&r2=1.10&f=u
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/php-pear-PEAR_Command_Packaging/php-pear-PEAR_Command_Packaging.spec?r1=1.21&r2=1.22&f=u



More information about the pld-cvs-commit mailing list