1 ###############################################################################
3 # Westferry - The IPFire web user interface #
4 # Copyright (C) 2015 IPFire development team #
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. #
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. #
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/>. #
19 ###############################################################################
21 ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
22 AM_MAKEFLAGS = --no-print-directory
23 AUTOMAKE_OPTIONS = color-tests
25 # remove target it the command fails
28 # keep itermediate files
33 pythondir = $(pyexecdir)
35 configsdir = $(sysconfdir)/westferry
37 # Directories for static files
38 webrootdir = $(datadir)/westferry/webroot
39 webroot_cssdir = $(webrootdir)/css
40 webroot_fontsdir = $(webrootdir)/fonts
41 webroot_scriptsdir = $(webrootdir)/scripts
42 webroot_imagesdir = $(webrootdir)/images
50 @INTLTOOL_POLICY_RULE@
54 $(MAKE) -C po update-po
56 DISTCHECK_CONFIGURE_FLAGS = \
57 --with-systemdsystemunitdir=$$dc_install_base/$(systemdsystemunitdir)
59 # ------------------------------------------------------------------------------
61 AM_V_XSLT = $(AM_V_XSLT_$(V))
62 AM_V_XSLT_ = $(AM_V_XSLT_$(AM_DEFAULT_VERBOSITY))
63 AM_V_XSLT_0 = @echo " XSLT " $@;
65 # ------------------------------------------------------------------------------
70 # ------------------------------------------------------------------------------
76 src/scripts/westferry.in
85 src/westferry/__init__.py \
86 src/westferry/constants.py \
87 src/westferry/application.py \
88 src/westferry/i18n.py \
89 src/westferry/services.py
91 westferrydir = $(pythondir)/westferry
94 src/westferry/constants.py.in
97 src/westferry/constants.py
99 westferry_backend_PYTHON = \
100 src/westferry/backend/__init__.py \
101 src/westferry/backend/__version__.py \
102 src/westferry/backend/base.py \
103 src/westferry/backend/graphs.py \
104 src/westferry/backend/main.py \
105 src/westferry/backend/system.py
107 westferry_backenddir = $(pythondir)/westferry/backend
109 westferry_backend_forms_PYTHON = \
110 src/westferry/backend/forms/__init__.py \
111 src/westferry/backend/forms/base.py \
112 src/westferry/backend/forms/choice.py \
113 src/westferry/backend/forms/main.py \
114 src/westferry/backend/forms/text.py \
115 src/westferry/backend/forms/yesno.py
117 westferry_backend_formsdir = $(westferry_backenddir)/forms
119 westferry_handlers_PYTHON = \
120 src/westferry/handlers/__init__.py \
121 src/westferry/handlers/analytics.py \
122 src/westferry/handlers/base.py \
123 src/westferry/handlers/demo.py \
124 src/westferry/handlers/index.py
126 westferry_handlersdir = $(pythondir)/westferry/handlers
128 westferry_ui_PYTHON = \
129 src/westferry/ui/__init__.py \
130 src/westferry/ui/base.py \
131 src/westferry/ui/boxes.py \
132 src/westferry/ui/forms.py \
133 src/westferry/ui/graphs.py \
134 src/westferry/ui/menu.py \
135 src/westferry/ui/tabs.py \
136 src/westferry/ui/utils.py
138 westferry_uidir = $(pythondir)/westferry/ui
140 # - templates ------------------------------------------------------------------
142 templatesdir = $(datadir)/westferry/templates
144 dist_templates_DATA = \
145 src/templates/base.html \
146 src/templates/default.html \
147 src/templates/graphs.html
149 templates_demodir = $(templatesdir)/demo
151 dist_templates_demo_DATA = \
152 src/templates/demo/index.html
154 templates_modulesdir = $(templatesdir)/modules
156 dist_templates_modules_DATA = \
157 src/templates/modules/box.html \
158 src/templates/modules/tabs.html
160 templates_modules_formsdir = $(templates_modulesdir)/forms
162 dist_templates_modules_forms_DATA = \
163 src/templates/modules/forms/elements.html \
164 src/templates/modules/forms/fieldset.html \
165 src/templates/modules/forms/index.html
167 templates_modules_forms_inputsdir = $(templates_modules_formsdir)/inputs
169 dist_templates_modules_forms_inputs_DATA = \
170 src/templates/modules/forms/inputs/base.html \
171 src/templates/modules/forms/inputs/checkbox.html \
172 src/templates/modules/forms/inputs/text.html \
173 src/templates/modules/forms/inputs/textarea.html
175 templates_modules_graphsdir = $(templates_modulesdir)/graphs
177 dist_templates_modules_graphs_DATA = \
178 src/templates/modules/graphs/box.html
180 templates_modules_menudir = $(templates_modulesdir)/menu
182 dist_templates_modules_menu_DATA = \
183 src/templates/modules/menu/sidebar.html \
184 src/templates/modules/menu/sidebar-link.html
186 ui_modulesdir = $(datadir)/westferry/templates/modules
190 dist_webroot_css_DATA = \
191 src/styles/westferry.css
194 src/styles/_fonts.scss \
195 src/styles/westferry.scss
198 src/styles/westferry.css
200 dist_webroot_fonts_DATA = \
201 src/third-party/fonts/ofl/prompt/OFL.txt \
202 src/third-party/fonts/ofl/prompt/Prompt-Black.ttf \
203 src/third-party/fonts/ofl/prompt/Prompt-BlackItalic.ttf \
204 src/third-party/fonts/ofl/prompt/Prompt-Bold.ttf \
205 src/third-party/fonts/ofl/prompt/Prompt-BoldItalic.ttf \
206 src/third-party/fonts/ofl/prompt/Prompt-ExtraBold.ttf \
207 src/third-party/fonts/ofl/prompt/Prompt-ExtraBoldItalic.ttf \
208 src/third-party/fonts/ofl/prompt/Prompt-ExtraLight.ttf \
209 src/third-party/fonts/ofl/prompt/Prompt-ExtraLightItalic.ttf \
210 src/third-party/fonts/ofl/prompt/Prompt-Italic.ttf \
211 src/third-party/fonts/ofl/prompt/Prompt-Light.ttf \
212 src/third-party/fonts/ofl/prompt/Prompt-LightItalic.ttf \
213 src/third-party/fonts/ofl/prompt/Prompt-Medium.ttf \
214 src/third-party/fonts/ofl/prompt/Prompt-MediumItalic.ttf \
215 src/third-party/fonts/ofl/prompt/Prompt-Regular.ttf \
216 src/third-party/fonts/ofl/prompt/Prompt-SemiBold.ttf \
217 src/third-party/fonts/ofl/prompt/Prompt-SemiBoldItalic.ttf \
218 src/third-party/fonts/ofl/prompt/Prompt-Thin.ttf \
219 src/third-party/fonts/ofl/prompt/Prompt-ThinItalic.ttf
221 webroot_scripts_DATA = \
222 src/third-party/jquery.min.js \
223 src/scripts/foundation.min.js \
224 src/scripts/westferry.min.js
227 src/scripts/westferry.js
230 src/third-party/jquery.min.js \
231 src/scripts/foundation.min.js \
232 src/scripts/westferry.min.js
234 # - third party ----------------------------------------------------------------
237 src/third-party/foundation-sites \
238 src/third-party/jquery.js
240 # ------------------------------------------------------------------------------
245 MANPAGES_XML = $(patsubst %.1,%.xml,$(patsubst %.5,%.xml,$(MANPAGES)))
246 MANPAGES_HTML = $(patsubst %.xml,%.html,$(MANPAGES_XML))
248 man: $(MANPAGES) $(MANPAGES_HTML)
266 --stringparam man.output.quietly 1 \
267 --stringparam funcsynopsis.style ansi \
268 --stringparam man.th.extra1.suppress 1 \
269 --stringparam man.authors.section.enabled 1 \
270 --stringparam man.copyright.section.enabled 1
272 XSLTPROC_COMMAND_MAN = \
273 $(AM_V_XSLT)$(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) \
274 http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $<
276 XSLTPROC_COMMAND_HTML = \
277 $(AM_V_XSLT)$(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) $(srcdir)/man/custom-html.xsl $<
280 $(XSLTPROC_COMMAND_MAN)
283 $(XSLTPROC_COMMAND_MAN)
285 man/%.html: man/%.xml man/custom-html.xsl
286 $(XSLTPROC_COMMAND_HTML)
290 # ------------------------------------------------------------------------------
293 systemdsystemunit_DATA = \
294 src/systemd/westferry.service
297 $(systemdsystemunit_DATA)
300 $(systemdsystemunitdir)
304 src/systemd/westferry.service.in
306 # ------------------------------------------------------------------------------
309 '|PACKAGE_NAME=$(PACKAGE_NAME)|' \
310 '|PACKAGE_VERSION=$(PACKAGE_VERSION)|' \
311 '|configsdir=$(configsdir)|' \
312 '|bindir=$(bindir)|' \
313 '|datadir=$(datadir)|' \
314 '|templatesdir=$(templatesdir)|' \
315 '|webrootdir=$(webrootdir)|'
318 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
319 $(SED) $(subst '|,-e 's|@,$(subst =,\@|,$(subst |',|g',$(substitutions)))) \
323 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
324 $(UGLIFYJS) --compress --mangle -- $< > $@
330 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
331 $(SASSC) --style compressed $< > $@
336 src/scripts/foundation.min.js: src/third-party/foundation-sites/dist/js/foundation.js
339 src/scripts/westferry: src/scripts/westferry.in
342 src/systemd/%: src/systemd/%.in