Debian Codegraph @

debian/patches/web_path

raw
1 Description: Fix for wrong paths in web app
2 During the build process, the default paths need to be used for
3 update-profiles.pl to succeed. After installation the custom paths
4 are used instead.
5 Author: Uwe Steinmann <[email protected]>, Bas Couwenberg <[email protected]>
6 Forwarded: not-needed
7
8 --- a/web/www/routino/paths.pl
9 +++ b/web/www/routino/paths.pl
10 @@ -23,9 +23,11 @@
11
12 # EDIT THIS to set the root directory for the non-web data files.
13 $root_dir="../..";
14 +$root_dir="/var/lib/routino" if(!$ENV{MODE} || $ENV{MODE} ne 'build');
15
16 # EDIT THIS to change the location of the individual directories.
17 $bin_dir="$root_dir/bin";
18 +$bin_dir="/usr/bin" if(!$ENV{MODE} || $ENV{MODE} ne 'build');
19 $data_dir="$root_dir/data";
20 $results_dir="$root_dir/results";
21
22 --- a/web/Makefile
23 +++ b/web/Makefile
24 @@ -104,7 +104,7 @@ all-profiles: all-bin all-data
25 [ $(WEBDATADIR)/profiles.xml -nt $(WEBWWWDIR)/profiles.pl ] || \
26 [ $(WEBDATADIR)/profiles.xml -nt $(WEBWWWDIR)/profiles.js ]; then \
27 echo update-profiles.pl ;\
28 - ( cd $(WEBWWWDIR) ; perl update-profiles.pl ) ;\
29 + ( cd $(WEBWWWDIR) ; MODE=build perl update-profiles.pl ) ;\
30 fi
31
32 ####
33 @@ -137,15 +137,15 @@ endif
34
35 $(WEBWWWDIR)/router.html.en: $(WEBTRANSDIR)/router.html $(TRANS_FILES) $(WEBTRANSDIR)/translate.pl
36 @echo translate.pl
37 - @cd $(WEBTRANSDIR) && perl translate.pl
38 + @cd $(WEBTRANSDIR) && MODE=build perl translate.pl
39
40 $(WEBWWWDIR)/visualiser.html.en: $(WEBTRANSDIR)/visualiser.html $(TRANS_FILES) $(WEBTRANSDIR)/translate.pl
41 @echo translate.pl
42 - @cd $(WEBTRANSDIR) && perl translate.pl
43 + @cd $(WEBTRANSDIR) && MODE=build perl translate.pl
44
45 $(XMLDIR)/routino-translations.xml: $(WEBTRANSDIR)/translations-head.xml $(WEBTRANSDIR)/translations-body.xml $(WEBTRANSDIR)/translations-tail.xml $(TRANS_FILES) $(WEBTRANSDIR)/translate.pl
46 @echo translate.pl
47 - @cd $(WEBTRANSDIR) && perl translate.pl
48 + @cd $(WEBTRANSDIR) && MODE=build perl translate.pl
49
50 ####
51
52 @@ -153,7 +153,7 @@ all-icons: $(WEBICONDIR)/ball-0.png
53
54 $(WEBICONDIR)/ball-0.png: $(WEBICONDIR)/create-icons.pl
55 @echo create-icons.pl
56 - @cd $(WEBICONDIR) && perl create-icons.pl
57 + @cd $(WEBICONDIR) && MODE=build perl create-icons.pl
58
59 ####
60