Finally merged the branch 'apache20'(+'apache2') back to the main trunk.
[www.jankratochvil.net.git] / project / captive / CVS.pm
similarity index 73%
rename from project/captive/CVS.html.pl
rename to project/captive/CVS.pm
index ffcc660..57cd168 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,16 @@ 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,
-               "before_project_data"=>
-                               '<h2 align="center">'.a_href('./','Captive Main Page').'</h2>'."\n",
+sub handler
+{
+my $W=project::Lib->init(
+               "project_name"=>"captive",
+               "before_project_data"=>sub { return '<h2>'.a_href('./','Captive Main Page').'</h2>'."\n"; },
                );
 
 
@@ -56,10 +53,10 @@ make
 
 <h2>Download</h2>
 
-<table border="1" align="center" style="text-align: center;" width="100%"><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>
+<table border="1" class="margin-center"><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>
 HERE
 my %pkg=(
                1=>[qw(captive captive-lufs captive-install lufs gnome-vfs-httpcaptive ntfsprogs ntfsprogs-gnomevfs)],
@@ -95,10 +92,12 @@ 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="80%" border="0" class="margin-center"><tr><td>'
+                                       .'<hr />requirement: '
+                                       .a_href('http://linux-ntfs.sourceforge.net/downloads.html#downloads','ntfsprogs')
+                                       .' '.$format.' &ge; 1.8.0'
+                               .'</td></tr></table>';
        };
 
 my @dist=(
@@ -117,23 +116,23 @@ my @dist=(
                );
 
 for my $dist (@dist) {
-       print "<a name=".$dist->{"id"}."><tr>";
-               print "<td>".$dist->{"name"}."</td>";
+       print '<tr id="'.$dist->{"id"}.'">';
+               print '<td align="center">'.$dist->{"name"}."</td>";
                for my $casel (1,2,3) {
                        $case=$casel;
-                       print "<td>";
+                       print '<td align="center">';
                        print join("<br />",map({ my $pkg=$_;
                                my($file,$text)=&{$dist->{"out"}}($pkg,@{$version{$pkg}});
                                (!defined $text ? ($file) || () : (&$a_href_arch("dist/$file",$text)));
                                } @{$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;
@@ -148,8 +147,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>
@@ -169,4 +170,6 @@ print <<"HERE";
 HERE
 
 
-My::Web->footer();
+exit;
+}
+1;