powered by nequal
Home » Maple4_DocTest » Timeline » 191

Changeset 191 -- 2008-12-09 08:50:33

Author
ぼぶちん
Comment
first commit

Diffs

Maple4_DocTest/trunk/package.php

@@ -0,0 +1,103 @@
+<?php
+/**
+ * PHP versions 5
+ *
+ * Copyright (c) 2008 Maple Project, 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.
+ *
+ *   * Neither the name of Sebastian Bergmann nor the names of his
+ *     contributors may 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.
+ *
+ * @category   Testing
+ * @package    Maple4_DocTest
+ * @copyright  2008 Maple Project
+ * @license    http://www.opensource.org/licenses/bsd-license.php  BSD License
+ * @version    SVN: $Id$
+ * @since      File available since Release 0.2.0
+ */
+
+ini_set('error_reporting', E_ALL);
+
+require_once 'PEAR/PackageFileManager2.php';
+require_once 'PEAR.php';
+
+PEAR::staticPushErrorHandling(PEAR_ERROR_CALLBACK, create_function('$error', 'var_dump($error); exit();'));
+
+$releaseVersion = '0.2.0';
+$releaseStability = 'alpha';
+$apiVersion = '0.2.0';
+$apiStability = 'alpha';
+$notes = 'TDD/BDD Tool for PHPUnit3';
+
+$options = array(
+    'filelistgenerator' => 'file',
+    'changelogoldtonew' => false,
+    'simpleoutput' => true,
+    'baseinstalldir' => '/',
+    'packagefile' => 'package.xml',
+    'packagedirectory' => dirname(__FILE__) . '/src/',
+    'dir_roles' => array(
+        'tests' => 'test',
+        'doc' => 'doc',
+        'bin' => 'script',
+        'src' => 'php',
+    ),
+    'exceptions' => array('*.tpl' => 'php'),
+    'ignore' => array('package.xml')
+);
+
+$package = new PEAR_PackageFileManager2();
+$result = $package->setOptions($options);
+
+$package->setPackage('Maple4_DocTest');
+$package->setPackageType('php');
+$package->setSummary('TDD/BDD Tool for PHPUnit3');
+$package->setDescription('TDD/BDD Tool for PHPUnit3');
+$package->setChannel('__uri');
+$package->setLicense('BSD License', 'http://www.opensource.org/licenses/bsd-license.php');
+$package->setAPIVersion($apiVersion);
+$package->setAPIStability($apiStability);
+$package->setReleaseVersion($releaseVersion);
+$package->setReleaseStability($releaseStability);
+$package->setNotes($notes);
+$package->setPhpDep('5.1.0');
+$package->setPearinstallerDep('1.4.3');
+$package->addPackageDepWithChannel('required', 'PEAR', 'pear.php.net', '1.4.3');
+$package->addPackageDepWithChannel('required', 'PHPUnit', 'pear.phpunit.de', '3.2.21');
+$package->addPackageDepWithChannel('optional', 'Net_Growl', 'pear.php.net', '0.7.0');
+$package->addMaintainer('lead', 'kunit', 'TAKAHASHI Kunihiko', 'kunit@maple-project.com');
+$package->addGlobalReplacement('package-info', '@package_version@', 'version');
+$package->generateContents();
+
+if (array_key_exists(1, $_SERVER['argv']) && $_SERVER['argv'][1] == 'make') {
+    $package->writePackageFile();
+} else {
+    $package->debugPackageFile();
+}
+
+exit();