cvs: peardoc /en/pyrus/extending packagefile.xml

[email protected] ("Greg Beaver")
Newsgroups php.pear.doc
Message-ID <cvscellog1247163023@cvsserver>
cellog		Thu Jul  9 18:10:23 2009 UTC

  Modified files:              
    /peardoc/en/pyrus/extending	packagefile.xml 
  Log:
  add docs on handling release tags in package.xml
  
http://cvs.php.net/viewvc.cgi/peardoc/en/pyrus/extending/packagefile.xml?r1=1.6&r2=1.7&diff_format=u
Index: peardoc/en/pyrus/extending/packagefile.xml
diff -u peardoc/en/pyrus/extending/packagefile.xml:1.6 peardoc/en/pyrus/extending/packagefile.xml:1.7
--- peardoc/en/pyrus/extending/packagefile.xml:1.6	Thu Jul  9 17:46:05 2009
+++ peardoc/en/pyrus/extending/packagefile.xml	Thu Jul  9 18:10:23 2009
@@ -582,6 +582,63 @@
     </programlisting>
    </para>
   </section>
+  <section xml:id="pyrus.extending.packagefile.files.release">
+   <info><title>Working with &lt;release&gt; sections</title></info>
+   <para>
+    Releases are documented <link linkend="guide.developers.package2.release">here</link>,
+    you should familiarize yourself with this before continuing.
+   </para>
+   <para>
+    Release properties can be accessed with the following syntax:
+   </para>
+   <para>
+    <programlisting role="php">
+     <![CDATA[
+<?php
+// setting release type
+$package->type = 'php';
+$package->type = 'extsrc';
+$package->type = 'zendextsrc';
+$package->type = 'bin';
+$package->type = 'zendextbin';
+$package->type = 'bundle';
+
+// for types other than bundle
+$package->release[0]->installconditions['php']->min('5.2.0');
+// defaults to "min"
+$package->release[0]->installconditions['php'] = '5.2.0';
+
+// defaults to "pattern"
+$package->release[0]->installconditions['arch'] = 'i386';
+$package->release[0]->installconditions['arch']->pattern('i386')->conflicts();
+
+// defaults to "name"
+$package->release[0]->installconditions['os'] = 'windows';
+
+// defaults to existing
+$package->release[0]->installconditions['extension'][0]->name('PDO');
+$package->release[0]->installconditions['extension'][0]->name('PDO')->min('1.0');
+$package->release[0]->ignore('path/to/file.ext');
+$package->release[0]->installAs('path/to/anotherfile.ext', 'new/name.php');
+
+// add another release
+$i = count($package->release);
+$package->release[$i]->ignore('path/to/anotherfile.ext');
+$package->release[$i]->installAs('path/to/file.ext', 'new/name.php');
+
+// remove release
+unset($package->release[1]);
+
+// remove all releases
+$package->release = null;
+
+// retrieve the release that will be used on this system
+$release = $package->installrelease;
+?>
+     ]]>
+    </programlisting>
+   </para>
+  </section>
  </section>
  <section xml:id="pyrus.extending.packagefile.pecl">
   <info><title>Accessing PECL properties</title></info>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.