]> git.pld-linux.org Git - packages/php-pear-PEAR_Command_Packaging.git/commitdiff
- add --output argument support
authorElan Ruusamäe <glen@pld-linux.org>
Wed, 8 Nov 2006 19:17:13 +0000 (19:17 +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.5

php-pear-PEAR_Command_Packaging.patch

index f448c7c87a06022f87c027d4daafb0bf812132b4..47eced1922905f917ae9af25b560e37a24dcd36d 100644 (file)
@@ -1,6 +1,18 @@
---- ./usr/share/pear/PEAR/Command/Packaging.php        2006-11-08 20:57:35.522937986 +0200
-+++ ./usr/share/pear/PEAR/Command/Packaging.php        2006-11-08 21:05:54.294127778 +0200
-@@ -98,7 +98,7 @@
+--- ./usr/share/pear/PEAR/Command/Packaging.php        2006-11-08 21:05:54.294127778 +0200
++++ ./usr/share/pear/PEAR/Command/Packaging.php        2006-11-08 21:12:50.723466165 +0200
+@@ -54,6 +54,11 @@
+                     'arg' => 'FILE',
+                     'doc' => 'Use FILE as RPM spec file template'
+                     ),
++                'output' => array(
++                    'shortopt' => 'o',
++                    'arg' => 'FILE',
++                    'doc' => 'Use FILE as output filename'
++                    ),
+                 'rpm-release' => array(
+                     'shortopt' => 'r',
+                     'arg' => 'RELEASE',
+@@ -98,7 +103,7 @@
      var $output;
      
      // The default format of the RPM package name
@@ -9,7 +21,7 @@
      
      // The default format of various dependencies that might be generated in the
      // spec file.
-@@ -113,7 +113,7 @@
+@@ -113,7 +118,7 @@
      // the rpm-pkgname format string, with the addition of:
      // %v = package version
      // %P = use the same as whatever rpm_pkgname_format is set to be
@@ -18,7 +30,7 @@
  
      /**
       * PEAR_Command_Packaging constructor.
-@@ -172,7 +172,8 @@
+@@ -172,7 +177,8 @@
          }
          $reg = &$this->config->getRegistry();
          $pkg = &$this->getPackageFile($this->config, $this->_debug);
@@ -28,7 +40,7 @@
          if (PEAR::isError($pf)) {
              $u = $pf->getUserinfo();
              if (is_array($u)) {
-@@ -219,6 +220,10 @@
+@@ -219,6 +225,10 @@
          } else {
              $info['release'] = '1';
          }
@@ -39,7 +51,7 @@
          
          // Work out the alias for the channel that this package is in
          $info['possible_channel'] = '';
-@@ -234,17 +239,19 @@
+@@ -234,17 +244,19 @@
          $info['doc_files'] = array();
          $info['doc_files_relocation_script'] = '';
          $info['doc_files_statement'] = '';
@@ -62,7 +74,7 @@
          }
          
          $srcfiles = 0;
-@@ -253,44 +260,49 @@
+@@ -253,44 +265,49 @@
                  continue;
              }
              $name = preg_replace('![/:\\\\]!', '/', $name);
          }
          
          $ndocs = count($info['doc_files']);
-@@ -305,6 +317,12 @@
+@@ -305,6 +322,12 @@
              $info['doc_files_statement'] = '%doc ' . $info['doc_files'];
              $info['doc_files_relocation_script'] = "mv %{buildroot}/docs .\n";
          }
          
          if ($srcfiles > 0) {
              require_once 'OS/Guess.php';
-@@ -332,11 +350,27 @@
+@@ -332,11 +355,27 @@
          $info['version'] = $pf->getVersion();
          $info['release_license'] = $pf->getLicense();
          $info['release_state'] = $pf->getState();
                          continue;
                      }
                      
-@@ -368,6 +402,13 @@
+@@ -368,6 +407,13 @@
                          'le' => '<=',
                          'eq' => '=',
                      );
                      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.
-@@ -375,16 +416,22 @@
+@@ -375,16 +421,22 @@
                      } elseif ($dep['rel'] == 'not') {
                          $conflicts[] = $package;
                      } elseif ($dep['rel'] == 'ne') {
                  }
              } else {
                  $info['package2xml'] = '2'; // tell the spec to use package2.xml
-@@ -515,18 +562,60 @@
+@@ -515,18 +567,60 @@
                          $requires[$info['pear_rpm_name']] = $info['pear_rpm_name'] . ' >= ' .
                              $deps['required']['pearinstaller']['min'];
                      }
          if (function_exists('file_get_contents')) {
              fclose($fp);
              $spec_contents = preg_replace('/@([a-z0-9_-]+)@/e', '$info["\1"]',
+@@ -536,7 +630,13 @@
+                 fread($fp, filesize($spec_template)));
+             fclose($fp);
+         }
+-        $spec_file = $this->_getRPMNameFromFormat($this->_rpm_specname_format, $pf->getPackage(), $alias, $info['version']);
++
++        if (isset($options['output'])) {
++                      $spec_file = $options['output'];
++        } else {
++                      $spec_file = $this->_getRPMNameFromFormat($this->_rpm_specname_format, $pf->getPackage(), $alias, $info['version']);
++        }
++
+         $wp = fopen($spec_file, "wb");
+         if (!$wp) {
+             return $this->raiseError("could not write RPM spec file $spec_file: $php_errormsg");
This page took 0.094165 seconds and 4 git commands to generate.