Initial mod_perl-2.0 port.
[www.jankratochvil.net.git] / project / captive / CVS.pm
similarity index 79%
rename from project/captive/CVS.html.pl
rename to project/captive/CVS.pm
index ffcc660..1b6f952 100755 (executable)
@@ -1,8 +1,6 @@
-#! /usr/bin/perl
-# 
 # $Id$
 # CVS page of 'My::Project::captive'
-# Copyright (C) 2003 Jan Kratochvil <project-www.jankratochvil.net@jankratochvil.net>
+# Copyright (C) 2003-2005 Jan Kratochvil <project-www.jankratochvil.net@jankratochvil.net>
 # 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -25,17 +23,17 @@ our $CVS_ID=q$Id$;
 use strict;
 use warnings;
 
-BEGIN{ open F,"Makefile"; our $top_dir=pop @{[split /\s/,(grep /^top_srcdir/,<F>)[0]]}; eval "use lib '$top_dir'"; close F; }
 use My::Web;
-Wuse 'My::Project';
-Wuse 'project::captive::ListItem';
+Wuse 'project::Lib';
+Wuse 'project::captive::Index';
 
 
-my $W=My::Project->init_project(
-               "__PACKAGE__"=>__PACKAGE__,
-               "ListItem"=>\@project::captive::ListItem::ListItem,
+sub handler
+{
+my $W=project::Lib->init(
+               "project_name"=>"captive",
                "before_project_data"=>
-                               '<h2 align="center">'.a_href('./','Captive Main Page').'</h2>'."\n",
+                               '<h2>'.a_href('./','Captive Main Page').'</h2>'."\n",
                );
 
 
@@ -56,7 +54,8 @@ make
 
 <h2>Download</h2>
 
-<table border="1" align="center" style="text-align: center;" width="100%"><tr><th>Distribution</th>
+<table border="0" width="100%"><tr><td align="center">
+       <table border="1"><tr><th>Distribution</th>
                <th>Installation Case #1<br />Filesystem and installer<br />(recommended)</th>
                <th>Installation Case #2<br />Manual installation<br />(filesystem, expert user)</th>
                <th>Installation Case #3<br />Command-line client<br />(no filesystem access)</th></tr>
@@ -95,10 +94,13 @@ my($file_base,$text,%args)=@_;
 
 my $ntfsprogs_after=sub ($) {
        my($format)=@_;
-               return () if $case!=1;
-               return '<hr width="80%" />requirement: '
-                               .a_href('http://linux-ntfs.sourceforge.net/downloads.html#downloads','ntfsprogs')
-                               .' '.$format.' &ge; 1.8.0';
+               return if $case!=1;
+               return '<table width="100%" border="0"><tr><td align="center"><table width="80%" border="0"><tr><td>'
+                                               .'<hr />requirement: '
+                                               .a_href('http://linux-ntfs.sourceforge.net/downloads.html#downloads','ntfsprogs')
+                                               .' '.$format.' &ge; 1.8.0'
+                                       .'</td></tr></table>'
+                               .'</td></tr></table>';
        };
 
 my @dist=(
@@ -117,7 +119,7 @@ my @dist=(
                );
 
 for my $dist (@dist) {
-       print "<a name=".$dist->{"id"}."><tr>";
+       print '<tr id="'.$dist->{"id"}.'">';
                print "<td>".$dist->{"name"}."</td>";
                for my $casel (1,2,3) {
                        $case=$casel;
@@ -128,19 +130,20 @@ for my $dist (@dist) {
                                } @{$pkg{$case}}),map({ (!$_ ? () : (&{$_}())); } $dist->{"after"}));
                        print "</td>";
                        }
-       print "</tr></a>\n";
+       print "</tr>\n";
        }
 print <<"HERE";
-       <tr>
-               <td>'captive-static' build<br />system patches for Red Hat 9 Shrike<br />(never needed for a&nbsp;regular build)</td>
-               <td colspan="3">
+               <tr>
+                       <td>'captive-static' build<br />system patches for Red Hat 9 Shrike<br />(never needed for a&nbsp;regular build)</td>
+                       <td colspan="3">
 HERE
 my $build_static_basename=(map("$_-".$version{$_}.".tar.gz","build-captive-static"))[0];
 print a_href "dist/$build_static_basename",$build_static_basename;
 print <<"HERE";
-               </td>
-       </tr>
-</table>
+                       </td>
+               </tr>
+       </table>
+</td></tr></table>
 
 @{[ vskip "3ex" ]}
 
@@ -148,8 +151,10 @@ print <<"HERE";
 <h2>Pending Integrations</h2>
 
 <dl>
-       <dt>@{[ a_href $W->{"project_viewcvs"}.'/lufs/','lufs-captive' ]}
-                       [@{[ a_href $W->{"project_viewcvs"}.'/*checkout*/lufs/NEWS.captive?rev=1.1.2.11','NEWS' ]}]
+       <dt>
+               @{[ a_href $W->{"project_viewcvs"}.'/lufs/','lufs-captive' ]}
+               [@{[ a_href $W->{"project_viewcvs"}.'/*checkout*/lufs/NEWS.captive?rev=1.1.2.11','NEWS' ]}]
+       </dt>
        <dd>
                <p>@{[ a_href 'http://lufs.sourceforge.net/lufs/','LUFS' ]} still has not yet integrated
                                the Captive-developed patches. No integration schedule is currently known.</p>
@@ -170,3 +175,5 @@ HERE
 
 
 My::Web->footer();
+}
+1;