1 #! /bin/sh /usr/share/dpatch/dpatch-run
2 ## 01_installRpadWWW.sh_conversion.dpatch by <edd@xmcorsairs.wu-wien.ac.at>
4 ## All lines beginning with `## DP:' are a description of the patch.
5 ## DP: dos to unix fileconversion
9 diff -Naur Rpad.orig/inst/serverversion/installRpadWWW.sh Rpad/inst/serverversion/installRpadWWW.sh
10 --- Rpad.orig/inst/serverversion/installRpadWWW.sh 2007-04-24 17:47:26.000000000 +0200
11 +++ Rpad/inst/serverversion/installRpadWWW.sh 2009-04-09 04:25:13.000000000 +0200
14 -# This installs the extra server files for Rpad on Debian.
\r
15 -# The defaults are to install to /var/www/Rpad.
\r
17 -# installRpadWWW.sh directory tree
\r
19 -# installRpadWWW.sh /var/www/Rpad
\r
20 -# installRpadWWW.sh /var/www/Rpad /testingdir
\r
21 -# installRpadWWW.sh /var/www/anotherdir
\r
25 -if [ $# -eq 1 ]; then
\r
28 -if [ $# -eq 2 ]; then
\r
33 -# copy the base files
\r
35 -cp -r ../basehtml/* $RPAD
\r
36 -cp -r ../basehtml/.RpadStartup.R $RPAD
\r
38 -# fix the directory permissions
\r
39 -chmod a+w $TREE$RPAD
\r
40 -chmod a+w $TREE$RPAD/server
\r
41 -chmod a+x $TREE$RPAD/server/*.pl
\r
43 -# this link makes the help menu work
\r
44 -ln -s /usr/lib/R $TREE$RPAD/R
\r
46 -# make a name for the apache config file
\r
47 -conf_d_name=`echo $RPAD | sed s^/^.^g`
\r
49 -# apache configuration file (cgi or mod_perl)
\r
50 -mkdir -p $TREE/etc/apache2/conf.d
\r
51 -cat >> $TREE/etc/apache2/conf.d/Rpad$conf_d_name << EOF
\r
52 -<Directory $RPAD/server*>
\r
53 - <IfModule mod_perl.c>
\r
54 - <Files *.pl> # requires mod_perl
\r
55 - SetHandler perl-script
\r
56 - PerlResponseHandler ModPerl::PerlRun
\r
57 - PerlOptions +ParseHeaders
\r
58 - Options -Indexes +ExecCGI
\r
62 - AddHandler cgi-script .pl
\r
63 - <IfModule mod_expires.c>
\r
65 - ExpiresDefault "now plus 0 seconds"
\r
68 -AddType text/x-component .htc
\r
69 -AddType text/html .Rpad
\r
72 -# apache2 configuration file (cgi or mod_perl)
\r
73 -mkdir -p $TREE/etc/apache/conf.d
\r
74 -cat >> $TREE/etc/apache/conf.d/Rpad$conf_d_name << EOF
\r
75 -<Directory $RPAD/server*>
\r
76 - <IfModule mod_perl.c>
\r
77 - <Files *.pl> # requires mod_perl
\r
78 - SetHandler perl-script
\r
79 - PerlHandler Apache::Registry
\r
85 - AddHandler cgi-script .pl
\r
86 - <IfModule mod_expires.c>
\r
88 - ExpiresDefault "now plus 0 seconds"
\r
91 -AddType text/x-component .htc
\r
92 -AddType text/html .Rpad
\r
96 +# This installs the extra server files for Rpad on Debian.
97 +# The defaults are to install to /var/www/Rpad.
99 +# installRpadWWW.sh directory tree
101 +# installRpadWWW.sh /var/www/Rpad
102 +# installRpadWWW.sh /var/www/Rpad /testingdir
103 +# installRpadWWW.sh /var/www/anotherdir
107 +if [ $# -eq 1 ]; then
110 +if [ $# -eq 2 ]; then
115 +# copy the base files
117 +cp -r ../basehtml/* $RPAD
118 +cp -r ../basehtml/.RpadStartup.R $RPAD
120 +# fix the directory permissions
121 +chmod a+w $TREE$RPAD
122 +chmod a+w $TREE$RPAD/server
123 +chmod a+x $TREE$RPAD/server/*.pl
125 +# this link makes the help menu work
126 +ln -s /usr/lib/R $TREE$RPAD/R
128 +# make a name for the apache config file
129 +conf_d_name=`echo $RPAD | sed s^/^.^g`
131 +# apache configuration file (cgi or mod_perl)
132 +mkdir -p $TREE/etc/apache2/conf.d
133 +cat >> $TREE/etc/apache2/conf.d/Rpad$conf_d_name << EOF
134 +<Directory $RPAD/server*>
135 + <IfModule mod_perl.c>
136 + <Files *.pl> # requires mod_perl
137 + SetHandler perl-script
138 + PerlResponseHandler ModPerl::PerlRun
139 + PerlOptions +ParseHeaders
140 + Options -Indexes +ExecCGI
144 + AddHandler cgi-script .pl
145 + <IfModule mod_expires.c>
147 + ExpiresDefault "now plus 0 seconds"
150 +AddType text/x-component .htc
151 +AddType text/html .Rpad
154 +# apache2 configuration file (cgi or mod_perl)
155 +mkdir -p $TREE/etc/apache/conf.d
156 +cat >> $TREE/etc/apache/conf.d/Rpad$conf_d_name << EOF
157 +<Directory $RPAD/server*>
158 + <IfModule mod_perl.c>
159 + <Files *.pl> # requires mod_perl
160 + SetHandler perl-script
161 + PerlHandler Apache::Registry
167 + AddHandler cgi-script .pl
168 + <IfModule mod_expires.c>
170 + ExpiresDefault "now plus 0 seconds"
173 +AddType text/x-component .htc
174 +AddType text/html .Rpad