]> git.ozlabs.org Git - ccan/blobdiff - web/staticmoduleinfo.php
foreach, iscsi, jbitset, jmap, opt, rbtree, sparse_bsearch, tally, tdb2: add LICENSE...
[ccan] / web / staticmoduleinfo.php
index 5b16e62d0003afed9a35d1a4f8ea3d62138bdbea..ba73265696383d7b7898bf38b79b1f6dabf4a5ea 100644 (file)
@@ -3,15 +3,17 @@ session_start();
 include('logo.html');
 include('menulist.html');
 include('static-configuration');
 include('logo.html');
 include('menulist.html');
 include('static-configuration');
-$module=$argv[1];
-
-$maintainer=extract_field('maintainer',$module);
-$author=extract_field('author',$module);
-$summary=extract_field('summary',$module);
-$description=htmlize_field('description',$module);
-$example=extract_field('example',$module);
-$dependencies=htmlspecialchars(shell_exec('tools/ccan_depends --direct '.$module));
-$licence=extract_field('licence',$module);
+$module_path=$argv[1];
+$module=basename($module_path);
+$maintainer=extract_field('maintainer',$module_path);
+$author=extract_field('author',$module_path);
+$summary=extract_field('summary',$module_path);
+$description=htmlize_field('description',$module_path);
+$example=extract_field('example',$module_path);
+$dependencies=htmlspecialchars(shell_exec('tools/ccan_depends --direct '.$module_path));
+$extdepends=htmlspecialchars(shell_exec('tools/ccan_depends --compile --non-ccan '.$module_path));
+$licence=extract_field('licence',$module_path);
+$license=extract_field('license',$module_path);
 ?>
 <table align="center" bgcolor="lightblue" width="70%" border="0" cellpadding="3" cellspacing="1">
 <tr align="center" bgcolor="FFFFCC">
 ?>
 <table align="center" bgcolor="lightblue" width="70%" border="0" cellpadding="3" cellspacing="1">
 <tr align="center" bgcolor="FFFFCC">
@@ -19,9 +21,8 @@ $licence=extract_field('licence',$module);
 <a href="<?=$repo_base.$module?>">Browse Source</a>
 </td>
 <td>
 <a href="<?=$repo_base.$module?>">Browse Source</a>
 </td>
 <td>
-Download:
-<a href="../<?=$tar_dir?>/<?=basename($module)?>.tar.bz2">(standalone)</a>
-<a href="../<?=$tar_dir?>/with-deps/<?=basename($module)?>.tar.bz2">(with all dependencies)</a>
+<a href="../<?=$tar_dir?>/with-deps/<?=$module?>.tar.bz2">Download</a>
+<a href="../<?=$tar_dir?>/<?=$module?>.tar.bz2">(without any required ccan dependencies)</a>
 </tr>
 </table>
 
 </tr>
 </table>
 
@@ -65,6 +66,22 @@ if ($dependencies) {
 </tr>
 <?php 
 }
 </tr>
 <?php 
 }
+
+if ($extdepends) {
+?>
+<tr align="left" bgcolor="FFFFCC">
+<td><h3>External dependencies: </h3> <?php
+       foreach (split("\n", $extdepends) as $dep) {
+               $fields=preg_split("/\s+/", $dep);
+               echo $fields[0].' ';
+               if (count($fields) > 1)
+                       echo '(version '.$fields[1].') ';
+               echo '<br>';
+        }
+?></td>
+</tr>
+<?php 
+}
 ?>
 <tr align="left" bgcolor="FFFFCC">
 <td><h3>Description: </h3> <?=$description;?> </td>
 ?>
 <tr align="left" bgcolor="FFFFCC">
 <td><h3>Description: </h3> <?=$description;?> </td>
@@ -81,7 +98,15 @@ if ($example) {
 if ($licence) {
 ?>
 <tr align="left" bgcolor="FFFFCC"> 
 if ($licence) {
 ?>
 <tr align="left" bgcolor="FFFFCC"> 
-<td><h3>Licence: </h3> <?=$licence?></td>
+<td><h3>License: </h3> <?=$licence?></td>
+</tr>
+<?php
+}
+
+if ($license) {
+?>
+<tr align="left" bgcolor="FFFFCC"> 
+<td><h3>License: </h3> <?=$license?></td>
 </tr>
 <?php
 }
 </tr>
 <?php
 }