]> git.pld-linux.org Git - packages/php-pear-PEAR_Command_Packaging.git/commitdiff
- different naming policy for pear packages and external repos; rel 5
authorElan Ruusamäe <glen@pld-linux.org>
Sun, 22 Aug 2010 08:58:18 +0000 (08:58 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    php-pear-PEAR_Command_Packaging.patch -> 1.10
    php-pear-PEAR_Command_Packaging.spec -> 1.22

php-pear-PEAR_Command_Packaging.patch
php-pear-PEAR_Command_Packaging.spec

index 27b664d8727dbc3c35232677895994c9c7971b75..4839a462b2581c17750aa295a6b730f6ec8ea243 100644 (file)
@@ -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'
                  '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);        
          // 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 
      
      /**
       * Replace a macro in the output spec file
-@@ -410,16 +453,20 @@
+@@ -410,16 +454,20 @@
          } else {
              $package_name = null;
          }
          // 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']) {
          }
              
          // 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');
          $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 {
              }
          }
          $this->_output['files'] = trim($this->_output['files']);
-@@ -685,12 +734,11 @@
+@@ -685,12 +735,11 @@
  
      function _generatePackageDeps($pf)
      {
                  
                  if (!isset($dep['type']) || $dep['type'] == 'pkg') {
                      $type = 'pkgdep';
-@@ -698,8 +746,14 @@
+@@ -698,8 +747,14 @@
                      $type = $dep['type'];
                  }
                  
                  
                  // $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.
          } 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'])) {
                          }
                          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'] = '';
 +                    // 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'])) {
 +            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;
 +
 +
 +                    $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;
 +
 +
 +                    // 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'])) {
 +
 +                    // suggests are not versioned (makes no sense in poldek)
 +                    $suggests[$package] = $package;
-+                }
-+            }
-+        }
+                 }
+             }
+         }
 +
 +        // append extra headers which we collected
 +        if (count($buildrequires)) {
 +        }
 +        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':
 +                // 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 ba055052fbd253c48d26ab5a3039c42a831fc360..f7c940b9331fe78852e90d68733a567a7b724931 100644 (file)
@@ -5,8 +5,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
@@ -16,7 +14,7 @@ Summary:      %{_pearname} - make-rpm-spec command for managing RPM .spec files for P
 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
This page took 0.097949 seconds and 4 git commands to generate.