]> git.ipfire.org Git - people/mfischer/ipfire-2.x.git/blob - lfs/web-user-interface
kernel: update to 6.1.6
[people/mfischer/ipfire-2.x.git] / lfs / web-user-interface
1 ###############################################################################
2 # #
3 # IPFire.org - A linux based firewall #
4 # Copyright (C) 2007-2018 IPFire Team <info@ipfire.org> #
5 # #
6 # This program is free software: you can redistribute it and/or modify #
7 # it under the terms of the GNU General Public License as published by #
8 # the Free Software Foundation, either version 3 of the License, or #
9 # (at your option) any later version. #
10 # #
11 # This program is distributed in the hope that it will be useful, #
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of #
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
14 # GNU General Public License for more details. #
15 # #
16 # You should have received a copy of the GNU General Public License #
17 # along with this program. If not, see <http://www.gnu.org/licenses/>. #
18 # #
19 ###############################################################################
20
21
22 ###############################################################################
23 # Definitions
24 ###############################################################################
25
26 include Config
27
28 VER = ipfire
29
30 THISAPP = web-user-interface-$(VER)
31 DIR_APP = $(DIR_SRC)/$(THISAPP)
32 TARGET = $(DIR_INFO)/$(THISAPP)
33
34 ###############################################################################
35 # Top-level Rules
36 ###############################################################################
37
38 install: $(TARGET)
39
40 check:
41
42 download:
43
44 b2 :
45
46 ###############################################################################
47 # Installation Details
48 ###############################################################################
49
50 $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
51 @$(PREBUILD)
52
53 # Copy all html/cgi-bin files
54 mkdir -p /srv/web/ipfire/{cgi-bin,html}
55 mkdir -p /var/updatecache/{download,metadata}
56 cp -aR $(DIR_SRC)/html/* /srv/web/ipfire
57
58 # Add base64 encoded background image to Squid content access page
59 basedata="$$( base64 $(DIR_SRC)/html/html/images/background.gif | tr -d '\n' )"; \
60 sed -i "s|IMAGEDATAPLACEHOLDER|$${basedata}|g" \
61 /srv/web/ipfire/html/redirect-templates/legacy/template.html
62
63 # Change CONFIG_ROOT in cgi-scripts
64 for i in /srv/web/ipfire/cgi-bin/{*,logs.cgi/*,vpn.cgi/*}; do \
65 if [ -f $$i ]; then \
66 sed -i "s+CONFIG_ROOT+$(CONFIG_ROOT)+g" $$i; \
67 fi; \
68 done
69 chown -R root:root /srv/web/ipfire
70 chmod -R 755 /srv/web/ipfire/cgi-bin
71 chmod -R 644 /srv/web/ipfire/html
72 chmod 755 /srv/web/ipfire/html /srv/web/ipfire/html/{index.cgi,redirect.cgi,images,include,themes,themes/*,themes/*/*}
73
74 # Reset permissions of redirect templates and theme directories
75 find /srv/web/ipfire/html/{captive,redirect-templates,themes} -type d | xargs chmod -v 755
76
77 # Captive Portal CSS
78 ln -svf --relative /usr/share/bootstrap/css/bootstrap-grid.min.css \
79 /srv/web/ipfire/html/captive/assets/bootstrap-grid.min.css
80 ln -svf --relative /usr/share/bootstrap/css/bootstrap-grid.min.css.map \
81 /srv/web/ipfire/html/captive/assets/bootstrap-grid.min.css.map
82 ln -svf --relative /usr/share/bootstrap/css/bootstrap-reboot.min.css \
83 /srv/web/ipfire/html/captive/assets/bootstrap-reboot.min.css
84 ln -svf --relative /usr/share/bootstrap/css/bootstrap-reboot.min.css.map \
85 /srv/web/ipfire/html/captive/assets/bootstrap-reboot.min.css.map
86
87 # Captive Portal Fonts
88 ln -svf --relative /usr/share/fonts/Ubuntu-L.ttf \
89 /srv/web/ipfire/html/captive/assets/Ubuntu-L.ttf
90 ln -svf --relative /usr/share/fonts/Ubuntu-M.ttf \
91 /srv/web/ipfire/html/captive/assets/Ubuntu-M.ttf
92 ln -svf --relative /usr/share/fonts/Ubuntu-R.ttf \
93 /srv/web/ipfire/html/captive/assets/Ubuntu-R.ttf
94
95 @$(POSTBUILD)