&My::Web::footer call is deprecated now, use just: exit;
[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="1" class="margin-center"><tr><th>Distribution</th>
57         <th>Installation Case #1<br />Filesystem and installer<br />(recommended)</th>
58         <th>Installation Case #2<br />Manual installation<br />(filesystem, expert user)</th>
59         <th>Installation Case #3<br />Command-line client<br />(no filesystem access)</th></tr>
60 HERE
61 my %pkg=(
62                 1=>[qw(captive captive-lufs captive-install lufs gnome-vfs-httpcaptive ntfsprogs ntfsprogs-gnomevfs)],
63                 2=>[qw(captive captive-lufs                 lufs)],
64                 3=>[qw(captive)],
65                 );
66 my %version=(
67                 map(($_=>["1.1.5","0"]),qw(captive captive-lufs captive-install)),
68                 "lufs"=>["0.9.7","1captive8"],
69                 "gnome-vfs-httpcaptive"=>["2.3.8captive2","0"],
70                 "ntfsprogs"=>["200309071734","1captive1"],
71                 "ntfsprogs-gnomevfs"=>["1.0.2","0"],
72                 "build-captive-static"=>"2003-12-14-00",
73                 );
74 my %has_devel=(map(($_=>1),qw(
75                 ntfsprogs
76                 )));
77 my %pkg_nosrc=(map(($_=>1),qw(
78                 captive-lufs
79                 captive-install
80                 ntfsprogs
81                 ntfsprogs-gnomevfs
82                 )));
83
84 my $case;
85 my $a_href_arch=sub ($$%)
86 {
87 my($file_base,$text,%args)=@_;
88
89         $text=~s/[._]\D.*$// if $case!=1 && $text!~/^[.]/;
90         return a_href $file_base,$text,"size"=>($case==1),%args;
91 };
92
93 my $ntfsprogs_after=sub ($) {
94         my($format)=@_;
95                 return if $case!=1;
96                 return '<table width="80%" border="0" class="margin-center"><tr><td>'
97                                         .'<hr />requirement: '
98                                         .a_href('http://linux-ntfs.sourceforge.net/downloads.html#downloads','ntfsprogs')
99                                         .' '.$format.' &ge; 1.8.0'
100                                 .'</td></tr></table>';
101         };
102
103 my @dist=(
104                 {
105                         "name"=>"Sources (.tar.gz)",
106                         "id"=>"source",
107                         "out"=>sub {
108                                 my($pkg,$version_base,$version_ext)=@_;
109                                         return () if $pkg_nosrc{$pkg};
110                                         $version_ext=~s/^\d+//;
111                                         my $file="$pkg-$version_base".($version_ext=~/^\d+$/ ? "" : $version_ext).".tar.gz";
112                                         return $file,$file;
113                                 },
114                         "after"=>sub { return &{$ntfsprogs_after}(".tar.gz"); },
115                         },
116                 );
117
118 for my $dist (@dist) {
119         print '<tr id="'.$dist->{"id"}.'">';
120                 print '<td align="center">'.$dist->{"name"}."</td>";
121                 for my $casel (1,2,3) {
122                         $case=$casel;
123                         print '<td align="center">';
124                         print join("<br />",map({ my $pkg=$_;
125                                 my($file,$text)=&{$dist->{"out"}}($pkg,@{$version{$pkg}});
126                                 (!defined $text ? ($file) || () : (&$a_href_arch("dist/$file",$text)));
127                                 } @{$pkg{$case}}),map({ (!$_ ? () : (&{$_}())); } $dist->{"after"}));
128                         print "</td>";
129                         }
130         print "</tr>\n";
131         }
132 print <<"HERE";
133                 <tr>
134                         <td>'captive-static' build<br />system patches for Red Hat 9 Shrike<br />(never needed for a&nbsp;regular build)</td>
135                         <td colspan="3">
136 HERE
137 my $build_static_basename=(map("$_-".$version{$_}.".tar.gz","build-captive-static"))[0];
138 print a_href "dist/$build_static_basename",$build_static_basename;
139 print <<"HERE";
140                 </td>
141         </tr>
142 </table>
143
144 @{[ vskip "3ex" ]}
145
146
147 <h2>Pending Integrations</h2>
148
149 <dl>
150         <dt>
151                 @{[ a_href $W->{"project_viewcvs"}.'/lufs/','lufs-captive' ]}
152                 [@{[ a_href $W->{"project_viewcvs"}.'/*checkout*/lufs/NEWS.captive?rev=1.1.2.11','NEWS' ]}]
153         </dt>
154         <dd>
155                 <p>@{[ a_href 'http://lufs.sourceforge.net/lufs/','LUFS' ]} still has not yet integrated
156                                 the Captive-developed patches. No integration schedule is currently known.</p>
157                 <ul>
158                         <li>Linux kernel module has implemented support for statfs(2)/df(1)</li>
159                         <li>Many fixes of the userland lufsd(8) daemon</li>
160                         <li>Scripts for unattended Linux kernel module prebuilds/compilation/installation</li>
161                 </ul>
162                 <p>The recommended way is to port Captive project to maintained
163                 @{[ a_href 'http://fuse.sourceforge.net/','FUSE' ]}.</p>
164         </dd>
165 </dl>
166
167
168 <h1>@{[ a_href './','Back to Captive Main Page' ]}</h1>
169
170 HERE
171
172
173 exit;
174 }
175 1;