Permalink
Browse files

switch to package.xml v2; prepare for 1.2.0a1 release

git-svn-id: http://svn.php.net/repository/pear/packages/XML_Util/trunk@259074 c90b9560-bf6c-de11-be94-00142212c4b1
  • Loading branch information...
ashnazg committed May 5, 2008
1 parent a732ad8 commit 95b0e8fe52d838102b79c8eedebf3bfd54ce7851
Showing with 368 additions and 296 deletions.
  1. +37 −90 package.php
  2. +331 −206 package.xml
View
@@ -1,111 +1,59 @@
<?php
-/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
+require_once 'PEAR/PackageFileManager2.php';
+PEAR::setErrorHandling(PEAR_ERROR_DIE);
-/**
- * script to automate the generation of the package.xml file.
- *
- * PHP versions 4 and 5
- *
- * LICENSE:
- *
- * Copyright (c) 2004-2008 Stephan Schmidt <schst@php.net>
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * The name of the author may not be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
- * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * $Id$
- *
- * @author Stephan Schmidt <schst@php-tools.net>
- * @package XML_Util
- * @subpackage Tools
- */
+$desc =
+ "Selection of methods that are often needed when working with XML documents. "
+ . "Functionality includes creating of attribute lists from arrays, "
+ . "creation of tags, validation of XML names and more."
+;
-/**
- * uses PackageFileManager
- */
-require_once 'PEAR/PackageFileManager.php';
+$version = '1.2.0a1';
+$apiver = '1.2.0';
+$state = 'alpha';
-/**
- * current version
- */
-$version = '1.1.4';
-
-/**
- * current state
- */
-$state = 'stable';
-
-/**
- * release notes
- */
$notes = <<<EOT
-- Fixed bug #9561: Not allowing underscores in middle of tags
+Changed license to New BSD License (Req #13826 [ashnazg])
+Added a test suite against all API methods [ashnazg]
+Switch to package.xml v2 [ashnazg]
+Fixed Bug #4950: Incorrect CDATA serializing [ashnazg|ja.doma]
EOT;
-/**
- * package description
- */
-$description = <<<EOT
-Selection of methods that are often needed when working with XML documents. Functionality includes creating of attribute lists from arrays, creation of tags, validation of XML names and more.
-EOT;
-
-$package = new PEAR_PackageFileManager();
+$package = new PEAR_PackageFileManager2();
$result = $package->setOptions(array(
- 'package' => 'XML_Util',
- 'summary' => 'XML utility class.',
- 'description' => $description,
- 'version' => $version,
- 'state' => $state,
- 'license' => 'BSD License',
'filelistgenerator' => 'cvs',
- 'ignore' => array('package.php', 'package.xml'),
- 'notes' => $notes,
- 'simpleoutput' => true,
+ 'changelogoldtonew' => false,
+ 'simpleoutput' => true,
'baseinstalldir' => 'XML',
- 'packagedirectory' => './',
- 'dir_roles' => array('docs' => 'doc',
- 'examples' => 'doc',
- 'tests' => 'test',
- )
- ));
+ 'packagefile' => 'package.xml',
+ 'packagedirectory' => '.'));
if (PEAR::isError($result)) {
echo $result->getMessage();
die();
}
-$package->addMaintainer('schst', 'lead', 'Stephan Schmidt', 'schst@php-tools.net');
-$package->addMaintainer('davey', 'helper', 'Davey Shafik', 'davey@php.net');
-
-$package->addDependency('PEAR', '', 'has', 'pkg', false);
-$package->addDependency('php', '4.2.0', 'ge', 'php', false);
-$package->addDependency('pcre', '', 'has', 'ext', false);
+$package->setPackage('XML_Util');
+$package->setPackageType('php');
+$package->setSummary('XML utility class');
+$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.3.0');
+$package->setPearinstallerDep('1.4.3');
+$package->addExtensionDep('required', 'pcre');
+$package->addIgnore(array('package.php', 'package.xml'));
+$package->addReplacement('Util.php', 'package-info', '@version@', 'version');
+$package->generateContents();
-if (isset($_GET['make']) || (isset($_SERVER['argv'][1]) && $_SERVER['argv'][1] == 'make')) {
+if ($_SERVER['argv'][1] == 'commit') {
$result = $package->writePackageFile();
} else {
$result = $package->debugPackageFile();
@@ -115,4 +63,3 @@
echo $result->getMessage();
die();
}
-?>
Oops, something went wrong.

0 comments on commit 95b0e8f

Please sign in to comment.