Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

add package.xml v2 file and builder

git-svn-id: http://svn.php.net/repository/pear/packages/XML_Beautifier/trunk@265439 c90b9560-bf6c-de11-be94-00142212c4b1
  • Loading branch information...
commit d93a54e28bf6053efe6309cb20ab362a8ddb2e87 1 parent 8294b84
Chuck Burgess authored
Showing with 292 additions and 0 deletions.
  1. +71 −0 package2.php
  2. +221 −0 package2.xml
71 package2.php
View
@@ -0,0 +1,71 @@
+<?php
+
+require_once 'PEAR/PackageFileManager2.php';
+PEAR::setErrorHandling(PEAR_ERROR_DIE);
+
+$desc = <<<EOT
+XML_Beautifier will add indentation and linebreaks to you XML files, replace all entities, format your comments and makes your document easier to read.
+You can influence the way your document is beautified with several options, ranging from indentation to changing the case of tags and normalizing your comments.
+EOT;
+
+$version = '1.2.0a1';
+$apiver = '1.2.0';
+$state = 'alpha';
+
+$notes = <<<EOT
+- switched to BSD License
+- switch to package.xml v2
+- PEAR CS cleanup
+- Fixed Bug #1009: Data in <![CDATA[ ... ]]> [schst]
+- Fixed Bug #1232: The standalone attributes turned to 'on' [schst]
+EOT;
+
+$package = PEAR_PackageFileManager2::importOptions(
+ 'package2.xml',
+ array(
+ 'filelistgenerator' => 'cvs',
+ 'changelogoldtonew' => false,
+ 'simpleoutput' => true,
+ 'baseinstalldir' => 'XML',
+ 'packagefile' => 'package2.xml',
+ 'packagedirectory' => '.'));
+
+if (PEAR::isError($result)) {
+ echo $result->getMessage();
+ die();
+}
+
+$package->clearDeps();
+
+$package->setPackage('XML_Beautifier');
+$package->setPackageType('php');
+$package->setSummary('Class to format XML documents.');
+$package->setDescription($desc);
+$package->setChannel('pear.php.net');
+$package->setLicense('BSD License', 'http://opensource.org/licenses/bsd-license');
+$package->setAPIVersion($apiver);
+$package->setAPIStability($state);
+$package->setReleaseVersion($version);
+$package->setReleaseStability($state);
+$package->setNotes($notes);
+$package->setPhpDep('4.2.0');
+$package->setPearinstallerDep('1.3.0');
+$package->addPackageDepWithChannel('required', 'XML_Parser', 'pear.php.net', '1.0');
+$package->addPackageDepWithChannel('required', 'XML_Util', 'pear.php.net', '0.5');
+$package->addIgnore(array('package.php', 'package2.php', 'package.xml', 'package2.xml'));
+$package->addReplacement('Beautifier.php', 'package-info', '@package_version@', 'version');
+$package->addReplacement('Beautifier/Tokenizer.php', 'package-info', '@package_version@', 'version');
+$package->addReplacement('Beautifier/Renderer.php', 'package-info', '@package_version@', 'version');
+$package->addReplacement('Beautifier/Renderer/Plain.php', 'package-info', '@package_version@', 'version');
+$package->generateContents();
+
+if ($_SERVER['argv'][1] == 'make') {
+ $result = $package->writePackageFile();
+} else {
+ $result = $package->debugPackageFile();
+}
+
+if (PEAR::isError($result)) {
+ echo $result->getMessage();
+ die();
+}
221 package2.xml
View
@@ -0,0 +1,221 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<package packagerversion="1.7.2" version="2.0" xmlns="http://pear.php.net/dtd/package-2.0" xmlns:tasks="http://pear.php.net/dtd/tasks-1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://pear.php.net/dtd/tasks-1.0
+http://pear.php.net/dtd/tasks-1.0.xsd
+http://pear.php.net/dtd/package-2.0
+http://pear.php.net/dtd/package-2.0.xsd">
+ <name>XML_Beautifier</name>
+ <channel>pear.php.net</channel>
+ <summary>Class to format XML documents.</summary>
+ <description>XML_Beautifier will add indentation and linebreaks to you XML files, replace all entities, format your comments and makes your document easier to read.
+You can influence the way your document is beautified with several options, ranging from indentation to changing the case of tags and normalizing your comments.
+
+ </description>
+ <lead>
+ <name>Stephan Schmidt</name>
+ <user>schst</user>
+ <email>schst@php-tools.net</email>
+ <active>no</active>
+ </lead>
+ <lead>
+ <name>Chuck Burgess</name>
+ <user>ashnazg</user>
+ <email>ashnazg@php.net</email>
+ <active>yes</active>
+ </lead>
+ <date>2008-08-24</date>
+ <time>14:59:35</time>
+ <version>
+ <release>1.2.0a1</release>
+ <api>1.2.0a1</api>
+ </version>
+ <stability>
+ <release>alpha</release>
+ <api>alpha</api>
+ </stability>
+ <license>BSD License</license>
+ <notes>- switched to BSD License
+- switch to package.xml v2
+- PEAR CS cleanup
+- Fixed Bug #1009: Data in &lt;![CDATA[ ... ]]&gt; [schst]
+- Fixed Bug #1232: The standalone attributes turned to &apos;on&apos; [schst]
+
+ </notes>
+ <contents>
+ <dir name="/">
+ <dir name="Beautifier">
+ <dir name="Renderer">
+ <file baseinstalldir="XML" name="Plain.php" role="php" />
+ </dir> <!-- /Beautifier/Renderer -->
+ <file baseinstalldir="XML" name="Renderer.php" role="php" />
+ <file baseinstalldir="XML" name="Tokenizer.php" role="php" />
+ </dir> <!-- /Beautifier -->
+ <dir name="examples">
+ <file baseinstalldir="XML" name="example1.php" role="doc" />
+ <file baseinstalldir="XML" name="example2.php" role="doc" />
+ <file baseinstalldir="XML" name="example3.php" role="doc" />
+ <file baseinstalldir="XML" name="example4.php" role="doc" />
+ <file baseinstalldir="XML" name="example5.php" role="doc" />
+ <file baseinstalldir="XML" name="example6.php" role="doc" />
+ <file baseinstalldir="XML" name="example7.php" role="doc" />
+ <file baseinstalldir="XML" name="test.xml" role="doc" />
+ <file baseinstalldir="XML" name="test2.xml" role="doc" />
+ <file baseinstalldir="XML" name="test3.xml" role="doc" />
+ </dir> <!-- /examples -->
+ <file baseinstalldir="XML" name="Beautifier.php" role="php" />
+ </dir> <!-- / -->
+ </contents>
+ <dependencies>
+ <required>
+ <php>
+ <min>4.2.0</min>
+ </php>
+ <pearinstaller>
+ <min>1.4.0b1</min>
+ </pearinstaller>
+ <package>
+ <name>XML_Util</name>
+ <channel>pear.php.net</channel>
+ <min>0.5</min>
+ </package>
+ <package>
+ <name>XML_Parser</name>
+ <channel>pear.php.net</channel>
+ </package>
+ </required>
+ </dependencies>
+ <phprelease />
+ <changelog>
+ <release>
+ <version>
+ <release>0.2</release>
+ <api>0.2</api>
+ </version>
+ <stability>
+ <release>beta</release>
+ <api>beta</api>
+ </stability>
+ <date>2003-10-01</date>
+ <license uri="http://www.php.net/license">PHP License</license>
+ <notes>initial pear release
+
+ </notes>
+ </release>
+ <release>
+ <version>
+ <release>0.2.1</release>
+ <api>0.2.1</api>
+ </version>
+ <stability>
+ <release>beta</release>
+ <api>beta</api>
+ </stability>
+ <date>2003-11-11</date>
+ <license uri="http://www.php.net/license">PHP License</license>
+ <notes>fixed bug #220
+
+ </notes>
+ </release>
+ <release>
+ <version>
+ <release>0.2.2</release>
+ <api>0.2.2</api>
+ </version>
+ <stability>
+ <release>beta</release>
+ <api>beta</api>
+ </stability>
+ <date>2003-11-22</date>
+ <license uri="http://www.php.net/license">PHP License</license>
+ <notes>fixed whitespace issues (Davey),
+fixed two notices (Davey)
+
+ </notes>
+ </release>
+ <release>
+ <version>
+ <release>0.3</release>
+ <api>0.3</api>
+ </version>
+ <stability>
+ <release>beta</release>
+ <api>beta</api>
+ </stability>
+ <date>2003-12-14</date>
+ <license uri="http://www.php.net/license">PHP License</license>
+ <notes>* Did some refactoring:
+The package is now split into a tokenizer and renderers. This will allow
+different renderers to be added later. Syntax-Highlighter will follow.
+* Fixed bug that caused corrupt DTDs.
+
+ </notes>
+ </release>
+ <release>
+ <version>
+ <release>1.0</release>
+ <api>1.0</api>
+ </version>
+ <stability>
+ <release>stable</release>
+ <api>stable</api>
+ </stability>
+ <date>2003-12-21</date>
+ <license uri="http://www.php.net/license">PHP License</license>
+ <notes>Changed state to stable (API will not change from now on)
+added methods to set option(s)
+did some small cleanup
+
+ </notes>
+ </release>
+ <release>
+ <version>
+ <release>1.0.1</release>
+ <api>1.0.1</api>
+ </version>
+ <stability>
+ <release>stable</release>
+ <api>stable</api>
+ </stability>
+ <date>2004-01-12</date>
+ <license uri="http://www.php.net/license">PHP License</license>
+ <notes>fixed bug #556 (notices)
+
+ </notes>
+ </release>
+ <release>
+ <version>
+ <release>1.1</release>
+ <api>1.1</api>
+ </version>
+ <stability>
+ <release>stable</release>
+ <api>stable</api>
+ </stability>
+ <date>2004-02-01</date>
+ <license uri="http://www.php.net/license">PHP License</license>
+ <notes>fixed bug #629 (treatment of data sections),
+added XML_BEAUTIFER_INCLUDE_PATH constant for testing environments,
+moved data trim() to renderer
+
+ </notes>
+ </release>
+ <release>
+ <version>
+ <release>1.2.0a1</release>
+ <api>1.2.0a1</api>
+ </version>
+ <stability>
+ <release>alpha</release>
+ <api>alpha</api>
+ </stability>
+ <date>2008-08-24</date>
+ <license uri="http://www.example.com">BSD License</license>
+ <notes>- switched to BSD License
+- switch to package.xml v2
+- PEAR CS cleanup
+- Fixed Bug #1009: Data in &lt;![CDATA[ ... ]]&gt; [schst]
+- Fixed Bug #1232: The standalone attributes turned to &apos;on&apos; [schst]
+
+ </notes>
+ </release>
+ </changelog>
+</package>
Please sign in to comment.
Something went wrong with that request. Please try again.