core130: ship setup binary
[ipfire-2.x.git] / lfs / web-user-interface
CommitLineData
afdf1483
MT
1###############################################################################
2# #
3# IPFire.org - A linux based firewall #
eee037b8 4# Copyright (C) 2007-2018 IPFire Team <info@ipfire.org> #
afdf1483
MT
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
26include Config
27
28VER = ipfire
29
30THISAPP = web-user-interface-$(VER)
31DIR_APP = $(DIR_SRC)/$(THISAPP)
32TARGET = $(DIR_INFO)/$(THISAPP)
33
34###############################################################################
35# Top-level Rules
36###############################################################################
37
38install: $(TARGET)
39
40check:
41
42download:
43
44md5:
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
b67e79a4
PM
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
afdf1483
MT
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
5c6ae344 72 chmod 755 /srv/web/ipfire/html /srv/web/ipfire/html/{index.cgi,redirect.cgi,images,include,themes,themes/*,themes/*/*}
afdf1483
MT
73 ln -svf ipfire /srv/web/ipfire/html/themes/ipfire-rounded
74
75 # Reset permissions of redirect templates and theme directories
445b43f8 76 find /srv/web/ipfire/html/{captive,redirect-templates,themes} -type d | xargs chmod -v 755
48fb1d3b
MT
77
78 # Captive Portal CSS
79 ln -svf --relative /usr/share/bootstrap/css/bootstrap-grid.min.css \
80 /srv/web/ipfire/html/captive/assets/bootstrap-grid.min.css
02de682e
MT
81 ln -svf --relative /usr/share/bootstrap/css/bootstrap-grid.min.css.map \
82 /srv/web/ipfire/html/captive/assets/bootstrap-grid.min.css.map
48fb1d3b
MT
83 ln -svf --relative /usr/share/bootstrap/css/bootstrap-reboot.min.css \
84 /srv/web/ipfire/html/captive/assets/bootstrap-reboot.min.css
02de682e
MT
85 ln -svf --relative /usr/share/bootstrap/css/bootstrap-reboot.min.css.map \
86 /srv/web/ipfire/html/captive/assets/bootstrap-reboot.min.css.map
48fb1d3b 87
1f06098b
MT
88 # Captive Portal Fonts
89 ln -svf --relative /usr/share/fonts/Ubuntu-L.ttf \
90 /srv/web/ipfire/html/captive/assets/Ubuntu-L.ttf
91 ln -svf --relative /usr/share/fonts/Ubuntu-M.ttf \
92 /srv/web/ipfire/html/captive/assets/Ubuntu-M.ttf
93 ln -svf --relative /usr/share/fonts/Ubuntu-R.ttf \
94 /srv/web/ipfire/html/captive/assets/Ubuntu-R.ttf
95
afdf1483 96 @$(POSTBUILD)