cvs: phd / build.php config.php package.xml
| From: | Hannes Magnusson | Date: | Tue, 02 Oct 2007 10:10:10 +0000 |
| Subject: | cvs: phd / build.php config.php package.xml | ||
| Groups: | php.doc.cvs | ||
| Request: | Send a blank email to doc-cvs+get-122@lists.php.net to get a copy of this message | ||
bjori Tue Oct 2 10:10:10 2007 UTC
Added files:
/phd package.xml
Modified files:
/phd config.php build.php
Log:
Add the posibility to install phd via pear
http://cvs.php.net/viewvc.cgi/phd/config.php?r1=1.1&r2=1.2&diff_format=u
Index: phd/config.php
diff -u phd/config.php:1.1 phd/config.php:1.2
--- phd/config.php:1.1 Sat Sep 8 17:43:44 2007
+++ phd/config.php Tue Oct 2 10:10:09 2007
@@ -1,6 +1,5 @@
<?php
-/* This file is autogenerated by setup.php. Do not edit directly. */
-/* Generated by PhD $Id: config.php,v 1.1 2007/09/08 17:43:44 bjori Exp $ at Thu, 09 Aug 2007
15:10:10 +0200. */
+/* Generated by PhD $Id: config.php,v 1.2 2007/10/02 10:10:09 bjori Exp $ at Thu, 09 Aug 2007
15:10:10 +0200. */
$OPTIONS = array (
'output_format' => array('xhtml'),
@@ -23,5 +22,17 @@
'debug' => true,
);
-die("You need to edit xml_root in config.php");
+if ($argc == 2) {
+ $OPTIONS["xml_root"] = $argv[1];
+}
+
+while (!is_dir($OPTIONS["xml_root"]) || !is_file($OPTIONS["xml_root"] .
"/.manual.xml")) {
+ print "I need to know where you keep your '.manual.xml' file (I didn't find
it in " . $OPTIONS["xml_root"] . "): ";
+ $root = trim(fgets(STDIN));
+ if (is_file($root)) {
+ $OPTIONS["xml_root"] = dirname($root);
+ } else {
+ $OPTIONS["xml_root"] = $root;
+ }
+}
http://cvs.php.net/viewvc.cgi/phd/build.php?r1=1.29&r2=1.30&diff_format=u
Index: phd/build.php
diff -u phd/build.php:1.29 phd/build.php:1.30
--- phd/build.php:1.29 Sun Sep 30 18:30:03 2007
+++ phd/build.php Tue Oct 2 10:10:09 2007
@@ -1,5 +1,6 @@
+#!@php_bin@
<?php
-/* $Id: build.php,v 1.29 2007/09/30 18:30:03 bjori Exp $ */
+/* $Id: build.php,v 1.30 2007/10/02 10:10:09 bjori Exp $ */
function err($no, $str, $file, $line) {
global $notify;
@@ -24,8 +25,12 @@
set_error_handler("err");
}
+$ROOT = "@php_dir@/phd";
+if ($ROOT == "@php_dir"."@/phd") {
+ $ROOT = dirname(__FILE__);
+}
-(@include "./config.php")
+(@include $ROOT."/config.php")
&& isset($OPTIONS)
&& is_array($OPTIONS)
&& isset($OPTIONS["output_format"], $OPTIONS["output_theme"])
@@ -35,12 +40,12 @@
$OPTIONS["chunk_extra"]["legalnotice"] = true;
$OPTIONS["xml_file"] = $OPTIONS["xml_root"] . "/.manual.xml";
-require "./include/PhDReader.class.php";
-require "./include/PhDHelper.class.php";
-require "./include/PhDFormat.class.php";
+require $ROOT. "/include/PhDReader.class.php";
+require $ROOT. "/include/PhDHelper.class.php";
+require $ROOT. "/include/PhDFormat.class.php";
if ($OPTIONS["index"]) {
- require "./mktoc.php";
+ require $ROOT. "/mktoc.php";
if ($err) {
$mktoc = microtime(true);
@@ -62,25 +67,25 @@
break;
}
- require "./formats/$output_format.php";
+ require $ROOT. "/formats/$output_format.php";
$format = new $classname($IDs);
$formatmap = $format->getElementMap();
$formattextmap = $format->getTextMap();
$themes = $elementmaps = $textmaps = array();
foreach($OPTIONS["output_theme"][$output_format] as $theme => $array) {
- is_dir("./themes/$theme") or die("Can't find the '$theme'
theme");
+ is_dir($ROOT. "/themes/$theme") or die("Can't find the
'$theme' theme");
/* Maybe other themes will need additional includes? */
switch($theme) {
case "php":
- require "./themes/php/phpdotnet.php";
+ require $ROOT ."/themes/php/phpdotnet.php";
break;
}
foreach($array as $themename) {
$themename = basename($themename);
- require "./themes/$theme/$themename.php";
+ require $ROOT. "/themes/$theme/$themename.php";
switch($theme) {
case "php":
$themes[$themename] = new $themename($IDs,
http://cvs.php.net/viewvc.cgi/phd/package.xml?view=markup&rev=1.1
Index: phd/package.xml
+++ phd/package.xml
<?xml version="1.0" encoding="UTF-8"?>
<package packagerversion="1.5.4" 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>PhD</name>
<uri>http://doc.php.net/phd/phd-0.1rc1</uri>
<summary>A PHP based Docbook renderer</summary>
<description>
PhD is a PHP based Docbook renderer aimed to replace the Docbook-XSL
and various other requirements needed to build the PHP.net documentation
</description>
<lead>
<name>Hannes Magnusson</name>
<user>bjori</user>
<email>bjori@php.net</email>
<active>yes</active>
</lead>
<date>2007-10-01</date>
<version>
<release>0.1RC1</release>
<api>0.1</api>
</version>
<stability>
<release>snapshot</release>
<api>devel</api>
</stability>
<license uri="http://www.opensource.org/licenses/bsd-license.php">BSD
Style</license>
<notes>Initial release</notes>
<contents>
<dir baseinstalldir="phd" name="/">
<file baseinstalldir="phd" name="formats/xhtml.php" role="php"
/>
<file baseinstalldir="phd" name="include/PhDFormat.class.php"
role="php" />
<file baseinstalldir="phd" name="include/PhDHelper.class.php"
role="php" />
<file baseinstalldir="phd" name="include/PhDReader.class.php"
role="php" />
<file baseinstalldir="phd" name="include/langs/cs.xml"
role="php" />
<file baseinstalldir="phd" name="include/langs/de.xml"
role="php" />
<file baseinstalldir="phd" name="include/langs/en.xml"
role="php" />
<file baseinstalldir="phd" name="include/langs/ja.xml"
role="php" />
<file baseinstalldir="phd" name="include/langs/pt_BR.xml"
role="php" />
<file baseinstalldir="phd" name="include/langs/ro.xml"
role="php" />
<file baseinstalldir="phd" name="themes/php/bightml.php"
role="php" />
<file baseinstalldir="phd" name="themes/php/chunkedhtml.php"
role="php" />
<file baseinstalldir="phd" name="themes/php/phpdotnet.php"
role="php" />
<file baseinstalldir="phd" name="themes/php/phpweb.php"
role="php" />
<file baseinstalldir="" name="build.php" role="script">
<tasks:replace from="@php_bin@" to="php_bin" type="pear-config"
/>
<tasks:replace from="@php_dir@" to="php_dir" type="pear-config"
/>
</file>
<file baseinstalldir="" name="phd.bat" role="script">
<tasks:replace from="@php_bin@" to="php_bin" type="pear-config"
/>
<tasks:replace from="@php_dir@" to="php_dir" type="pear-config"
/>
</file>
<file baseinstalldir="phd" name="config.php" role="php" />
<file baseinstalldir="phd" name="LICENSE" role="php" />
<file baseinstalldir="phd" name="mktoc.php" role="php" />
<file baseinstalldir="phd" name="README.RENDERER" role="php"
/>
<file baseinstalldir="phd" name="TODO.RENDERER" role="php" />
</dir>
</contents>
<dependencies>
<required>
<php>
<min>5.2.3</min>
</php>
<pearinstaller>
<min>1.4.0</min>
</pearinstaller>
<extension>
<name>libxml</name>
</extension>
<extension>
<name>xmlreader</name>
</extension>
<extension>
<name>dom</name>
</extension>
<extension>
<name>reflection</name>
</extension>
</required>
</dependencies>
<phprelease>
<installconditions>
<os>
<name>windows</name>
</os>
</installconditions>
<filelist>
<install as="phd.bat" name="phd.bat" />
</filelist>
</phprelease>
<phprelease>
<filelist>
<install as="phd" name="build.php" />
<ignore name="phd.bat" />
</filelist>
</phprelease>
<changelog>
<release>
<version>
<release>0.1</release>
<api>0.1</api>
</version>
<stability>
<release>snapshot</release>
<api>devel</api>
</stability>
<date>2007-10-01</date>
<license uri="http://www.opensource.org/licenses/bsd-license.php">BSD
Style</license>
<notes>Initial release</notes>
</release>
</changelog>
</package>