Package: routino / 3.2-5

web_path Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
Description: Fix for wrong paths in web app
 During the build process, the default paths need to be used for
 update-profiles.pl to succeed. After installation the custom paths
 are used instead.
Author: Uwe Steinmann <uwe@steinmann.cx>, Bas Couwenberg <sebastic@debian.org>
Forwarded: not-needed

--- a/web/www/routino/paths.pl
+++ b/web/www/routino/paths.pl
@@ -23,9 +23,11 @@
 
 # EDIT THIS to set the root directory for the non-web data files.
 $root_dir="../..";
+$root_dir="/var/lib/routino"	if(!$ENV{MODE} || $ENV{MODE} ne 'build');
 
 # EDIT THIS to change the location of the individual directories.
 $bin_dir="$root_dir/bin";
+$bin_dir="/usr/bin"		if(!$ENV{MODE} || $ENV{MODE} ne 'build');
 $data_dir="$root_dir/data";
 $results_dir="$root_dir/results";
 
--- a/web/Makefile
+++ b/web/Makefile
@@ -104,7 +104,7 @@ all-profiles: all-bin all-data
 	     [ $(WEBDATADIR)/profiles.xml -nt $(WEBWWWDIR)/profiles.pl ] || \
 	     [ $(WEBDATADIR)/profiles.xml -nt $(WEBWWWDIR)/profiles.js ]; then \
 	    echo update-profiles.pl ;\
-	    ( cd $(WEBWWWDIR) ; perl update-profiles.pl ) ;\
+	    ( cd $(WEBWWWDIR) ; MODE=build perl update-profiles.pl ) ;\
 	 fi
 
 ####
@@ -137,15 +137,15 @@ endif
 
 $(WEBWWWDIR)/router.html.en: $(WEBTRANSDIR)/router.html $(TRANS_FILES) $(WEBTRANSDIR)/translate.pl
 	@echo translate.pl
-	@cd $(WEBTRANSDIR) && perl translate.pl
+	@cd $(WEBTRANSDIR) && MODE=build perl translate.pl
 
 $(WEBWWWDIR)/visualiser.html.en: $(WEBTRANSDIR)/visualiser.html $(TRANS_FILES) $(WEBTRANSDIR)/translate.pl
 	@echo translate.pl
-	@cd $(WEBTRANSDIR) && perl translate.pl
+	@cd $(WEBTRANSDIR) && MODE=build perl translate.pl
 
 $(XMLDIR)/routino-translations.xml: $(WEBTRANSDIR)/translations-head.xml $(WEBTRANSDIR)/translations-body.xml $(WEBTRANSDIR)/translations-tail.xml $(TRANS_FILES) $(WEBTRANSDIR)/translate.pl
 	@echo translate.pl
-	@cd $(WEBTRANSDIR) && perl translate.pl
+	@cd $(WEBTRANSDIR) && MODE=build perl translate.pl
 
 ####
 
@@ -153,7 +153,7 @@ all-icons: $(WEBICONDIR)/ball-0.png
 
 $(WEBICONDIR)/ball-0.png: $(WEBICONDIR)/create-icons.pl
 	@echo create-icons.pl
-	@cd $(WEBICONDIR) && perl create-icons.pl
+	@cd $(WEBICONDIR) && MODE=build perl create-icons.pl
 
 ####