+Support for: $W->{"css_push"}
[www.jankratochvil.net.git] / project / captive / CVS.pm
1 # $Id$
2 # CVS page of 'My::Project::captive'
3 # Copyright (C) 2003-2005 Jan Kratochvil <project-www.jankratochvil.net@jankratochvil.net>
4
5 # This program is free software; you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation; exactly version 2 of June 1991 is required
8
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12 # GNU General Public License for more details.
13
14 # You should have received a copy of the GNU General Public License
15 # along with this program; if not, write to the Free Software
16 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
17
18
19 package project::captive::CVS;
20 require 5.6.0;  # at least 'use warnings;' but we need some 5.6.0+ modules anyway
21 our $VERSION=do { my @r=(q$Revision$=~/\d+/g); sprintf "%d.".("%03d"x$#r),@r; };
22 our $CVS_ID=q$Id$;
23 use strict;
24 use warnings;
25
26 use My::Web;
27 Wuse 'project::Lib';
28 Wuse 'project::captive::Index';
29
30
31 sub handler
32 {
33 my $W=project::Lib->init(
34                 "project_name"=>"captive",
35                 "before_project_data"=>sub { return '<h2>'.a_href('./','Captive Main Page').'</h2>'."\n"; },
36                 );
37
38
39 print <<"HERE";
40 <h2>CVS Checkout Instructions</h2>
41 <pre>
42 cvs -d :pserver:pserver@{[ '@' ]}cvs.jankratochvil.net:/cvs login
43         Just hit ENTER (empty password)
44 cvs -d :pserver:pserver@{[ '@' ]}cvs.jankratochvil.net:/cvs -z3 checkout captive
45 cd captive
46 cvs -d :pserver:pserver@{[ '@' ]}cvs.jankratochvil.net:/cvs -z3 checkout -r captive -kk reactos
47 ./autogen.pl
48 make
49 ./src/client/cmdline/captive-cmdline --load-module=/var/lib/captive/ntoskrnl.exe --filesystem=/var/lib/captive/ntfs.sys --disk --blind /dev/hda1
50 </pre>
51
52 @{[ vskip "3ex" ]}
53
54 <h2>Download</h2>
55
56 <table border="0" width="100%"><tr><td align="center">
57         <table border="1"><tr><th>Distribution</th>
58                 <th>Installation Case #1<br />Filesystem and installer<br />(recommended)</th>
59                 <th>Installation Case #2<br />Manual installation<br />(filesystem, expert user)</th>
60                 <th>Installation Case #3<br />Command-line client<br />(no filesystem access)</th></tr>
61 HERE
62 my %pkg=(
63                 1=>[qw(captive captive-lufs captive-install lufs gnome-vfs-httpcaptive ntfsprogs ntfsprogs-gnomevfs)],
64                 2=>[qw(captive captive-lufs                 lufs)],
65                 3=>[qw(captive)],
66                 );
67 my %version=(
68                 map(($_=>["1.1.5","0"]),qw(captive captive-lufs captive-install)),
69                 "lufs"=>["0.9.7","1captive8"],
70                 "gnome-vfs-httpcaptive"=>["2.3.8captive2","0"],
71                 "ntfsprogs"=>["200309071734","1captive1"],
72                 "ntfsprogs-gnomevfs"=>["1.0.2","0"],
73                 "build-captive-static"=>"2003-12-14-00",
74                 );
75 my %has_devel=(map(($_=>1),qw(
76                 ntfsprogs
77                 )));
78 my %pkg_nosrc=(map(($_=>1),qw(
79                 captive-lufs
80                 captive-install
81                 ntfsprogs
82                 ntfsprogs-gnomevfs
83                 )));
84
85 my $case;
86 my $a_href_arch=sub ($$%)
87 {
88 my($file_base,$text,%args)=@_;
89
90         $text=~s/[._]\D.*$// if $case!=1 && $text!~/^[.]/;
91         return a_href $file_base,$text,"size"=>($case==1),%args;
92 };
93
94 my $ntfsprogs_after=sub ($) {
95         my($format)=@_;
96                 return if $case!=1;
97                 return '<table width="100%" border="0"><tr><td align="center"><table width="80%" border="0"><tr><td>'
98                                                 .'<hr />requirement: '
99                                                 .a_href('http://linux-ntfs.sourceforge.net/downloads.html#downloads','ntfsprogs')
100                                                 .' '.$format.' &ge; 1.8.0'
101                                         .'</td></tr></table>'
102                                 .'</td></tr></table>';
103         };
104
105 my @dist=(
106                 {
107                         "name"=>"Sources (.tar.gz)",
108                         "id"=>"source",
109                         "out"=>sub {
110                                 my($pkg,$version_base,$version_ext)=@_;
111                                         return () if $pkg_nosrc{$pkg};
112                                         $version_ext=~s/^\d+//;
113                                         my $file="$pkg-$version_base".($version_ext=~/^\d+$/ ? "" : $version_ext).".tar.gz";
114                                         return $file,$file;
115                                 },
116                         "after"=>sub { return &{$ntfsprogs_after}(".tar.gz"); },
117                         },
118                 );
119
120 for my $dist (@dist) {
121         print '<tr id="'.$dist->{"id"}.'">';
122                 print "<td>".$dist->{"name"}."</td>";
123                 for my $casel (1,2,3) {
124                         $case=$casel;
125                         print "<td>";
126                         print join("<br />",map({ my $pkg=$_;
127                                 my($file,$text)=&{$dist->{"out"}}($pkg,@{$version{$pkg}});
128                                 (!defined $text ? ($file) || () : (&$a_href_arch("dist/$file",$text)));
129                                 } @{$pkg{$case}}),map({ (!$_ ? () : (&{$_}())); } $dist->{"after"}));
130                         print "</td>";
131                         }
132         print "</tr>\n";
133         }
134 print <<"HERE";
135                 <tr>
136                         <td>'captive-static' build<br />system patches for Red Hat 9 Shrike<br />(never needed for a&nbsp;regular build)</td>
137                         <td colspan="3">
138 HERE
139 my $build_static_basename=(map("$_-".$version{$_}.".tar.gz","build-captive-static"))[0];
140 print a_href "dist/$build_static_basename",$build_static_basename;
141 print <<"HERE";
142                         </td>
143                 </tr>
144         </table>
145 </td></tr></table>
146
147 @{[ vskip "3ex" ]}
148
149
150 <h2>Pending Integrations</h2>
151
152 <dl>
153         <dt>
154                 @{[ a_href $W->{"project_viewcvs"}.'/lufs/','lufs-captive' ]}
155                 [@{[ a_href $W->{"project_viewcvs"}.'/*checkout*/lufs/NEWS.captive?rev=1.1.2.11','NEWS' ]}]
156         </dt>
157         <dd>
158                 <p>@{[ a_href 'http://lufs.sourceforge.net/lufs/','LUFS' ]} still has not yet integrated
159                                 the Captive-developed patches. No integration schedule is currently known.</p>
160                 <ul>
161                         <li>Linux kernel module has implemented support for statfs(2)/df(1)</li>
162                         <li>Many fixes of the userland lufsd(8) daemon</li>
163                         <li>Scripts for unattended Linux kernel module prebuilds/compilation/installation</li>
164                 </ul>
165                 <p>The recommended way is to port Captive project to maintained
166                 @{[ a_href 'http://fuse.sourceforge.net/','FUSE' ]}.</p>
167         </dd>
168 </dl>
169
170
171 <h1>@{[ a_href './','Back to Captive Main Page' ]}</h1>
172
173 HERE
174
175
176 My::Web->footer();
177 }
178 1;