]> git.donarmstrong.com Git - cran2deb.git/blob - branch/double_build/inst/etc/patches/Rpad/01_installRpadWWW.sh_conversion.patch
split view of debian_dependency and blacklist_packages by system; preparation for...
[cran2deb.git] / branch / double_build / inst / etc / patches / Rpad / 01_installRpadWWW.sh_conversion.patch
1 #! /bin/sh /usr/share/dpatch/dpatch-run
2 ## 01_installRpadWWW.sh_conversion.dpatch by  <edd@xmcorsairs.wu-wien.ac.at>
3 ##
4 ## All lines beginning with `## DP:' are a description of the patch.
5 ## DP: dos to unix fileconversion
6
7 @DPATCH@
8
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
12 @@ -1,82 +1,82 @@
13 -#!/bin/sh\r
14 -# This installs the extra server files for Rpad on Debian.\r
15 -# The defaults are to install to /var/www/Rpad.\r
16 -# usage:\r
17 -#   installRpadWWW.sh directory tree\r
18 -# examples: \r
19 -#   installRpadWWW.sh /var/www/Rpad \r
20 -#   installRpadWWW.sh /var/www/Rpad /testingdir\r
21 -#   installRpadWWW.sh /var/www/anotherdir\r
22 -\r
23 -RPAD=/var/www/Rpad\r
24 -TREE=/.\r
25 -if [ $# -eq 1 ]; then\r
26 -  RPAD=$1\r
27 -fi\r
28 -if [ $# -eq 2 ]; then\r
29 -  RPAD=$1\r
30 -  TREE=$2\r
31 -fi\r
32 -\r
33 -# copy the base files\r
34 -mkdir -p $RPAD\r
35 -cp -r ../basehtml/* $RPAD\r
36 -cp -r ../basehtml/.RpadStartup.R $RPAD\r
37 -\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
42 -\r
43 -# this link makes the help menu work\r
44 -ln -s /usr/lib/R $TREE$RPAD/R\r
45 -\r
46 -# make a name for the apache config file\r
47 -conf_d_name=`echo $RPAD | sed s^/^.^g`\r
48 -\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
59 -    </Files>\r
60 -  </IfModule>\r
61 -  Options +ExecCGI\r
62 -  AddHandler cgi-script .pl\r
63 -  <IfModule mod_expires.c>\r
64 -    ExpiresActive on\r
65 -    ExpiresDefault "now plus 0 seconds"\r
66 -  </IfModule>\r
67 -</Directory>\r
68 -AddType text/x-component .htc\r
69 -AddType text/html .Rpad\r
70 -EOF\r
71 -\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
80 -      Options +ExecCGI\r
81 -      PerlSendHeader ON\r
82 -    </Files>\r
83 -  </IfModule>\r
84 -  Options +ExecCGI\r
85 -  AddHandler cgi-script .pl\r
86 -  <IfModule mod_expires.c>\r
87 -    ExpiresActive on\r
88 -    ExpiresDefault "now plus 0 seconds"\r
89 -  </IfModule>\r
90 -</Directory>\r
91 -AddType text/x-component .htc\r
92 -AddType text/html .Rpad\r
93 -EOF\r
94 -\r
95 +#!/bin/sh
96 +# This installs the extra server files for Rpad on Debian.
97 +# The defaults are to install to /var/www/Rpad.
98 +# usage:
99 +#   installRpadWWW.sh directory tree
100 +# examples: 
101 +#   installRpadWWW.sh /var/www/Rpad 
102 +#   installRpadWWW.sh /var/www/Rpad /testingdir
103 +#   installRpadWWW.sh /var/www/anotherdir
104 +
105 +RPAD=/var/www/Rpad
106 +TREE=/.
107 +if [ $# -eq 1 ]; then
108 +  RPAD=$1
109 +fi
110 +if [ $# -eq 2 ]; then
111 +  RPAD=$1
112 +  TREE=$2
113 +fi
114 +
115 +# copy the base files
116 +mkdir -p $RPAD
117 +cp -r ../basehtml/* $RPAD
118 +cp -r ../basehtml/.RpadStartup.R $RPAD
119 +
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
124 +
125 +# this link makes the help menu work
126 +ln -s /usr/lib/R $TREE$RPAD/R
127 +
128 +# make a name for the apache config file
129 +conf_d_name=`echo $RPAD | sed s^/^.^g`
130 +
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
141 +    </Files>
142 +  </IfModule>
143 +  Options +ExecCGI
144 +  AddHandler cgi-script .pl
145 +  <IfModule mod_expires.c>
146 +    ExpiresActive on
147 +    ExpiresDefault "now plus 0 seconds"
148 +  </IfModule>
149 +</Directory>
150 +AddType text/x-component .htc
151 +AddType text/html .Rpad
152 +EOF
153 +
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
162 +      Options +ExecCGI
163 +      PerlSendHeader ON
164 +    </Files>
165 +  </IfModule>
166 +  Options +ExecCGI
167 +  AddHandler cgi-script .pl
168 +  <IfModule mod_expires.c>
169 +    ExpiresActive on
170 +    ExpiresDefault "now plus 0 seconds"
171 +  </IfModule>
172 +</Directory>
173 +AddType text/x-component .htc
174 +AddType text/html .Rpad
175 +EOF
176 +