]> git.ipfire.org Git - people/ms/westferry.git/blame - Makefile.am
UI: Implement top menu bar
[people/ms/westferry.git] / Makefile.am
CommitLineData
4f357333
MT
1###############################################################################
2# #
3# Westferry - The IPFire web user interface #
4# Copyright (C) 2015 IPFire development team #
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
21ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
22AM_MAKEFLAGS = --no-print-directory
23AUTOMAKE_OPTIONS = color-tests
24
25# remove target it the command fails
26.DELETE_ON_ERROR:
27
28# keep itermediate files
29.SECONDARY:
30
31SUBDIRS = . po
32
33pythondir = $(pyexecdir)
34
35configsdir = $(sysconfdir)/westferry
36
b0645c6e
MT
37# Directories for static files
38webrootdir = $(datadir)/westferry/webroot
39webroot_cssdir = $(webrootdir)/css
40webroot_fontsdir = $(webrootdir)/fonts
41webroot_scriptsdir = $(webrootdir)/scripts
42webroot_imagesdir = $(webrootdir)/images
43
4f357333
MT
44CLEANFILES =
45DISTCLEANFILES =
46EXTRA_DIST =
47INSTALL_DIRS =
48noinst_DATA =
49
50@INTLTOOL_POLICY_RULE@
51
52.PHONY: update-po
53update-po:
54 $(MAKE) -C po update-po
55
56DISTCHECK_CONFIGURE_FLAGS = \
57 --with-systemdsystemunitdir=$$dc_install_base/$(systemdsystemunitdir)
58
59# ------------------------------------------------------------------------------
60
61AM_V_XSLT = $(AM_V_XSLT_$(V))
62AM_V_XSLT_ = $(AM_V_XSLT_$(AM_DEFAULT_VERBOSITY))
63AM_V_XSLT_0 = @echo " XSLT " $@;
64
65# ------------------------------------------------------------------------------
66
67dist_doc_DATA = \
68 COPYING
69
70# ------------------------------------------------------------------------------
71
72bin_SCRIPTS = \
73 src/scripts/westferry
74
75EXTRA_DIST += \
76 src/scripts/westferry.in
77
78CLEANFILES += \
79 src/scripts/westferry
80
81dist_configs_DATA = \
82 westferry.conf.sample
83
84westferry_PYTHON = \
9877dda9 85 src/westferry/__init__.py \
b0645c6e 86 src/westferry/constants.py \
9877dda9 87 src/westferry/application.py \
3fc6d806 88 src/westferry/i18n.py \
208738dd 89 src/westferry/logging.py \
9877dda9 90 src/westferry/services.py
4f357333
MT
91
92westferrydir = $(pythondir)/westferry
93
b0645c6e
MT
94EXTRA_DIST += \
95 src/westferry/constants.py.in
96
97CLEANFILES += \
98 src/westferry/constants.py
99
4f357333 100westferry_backend_PYTHON = \
21a66327
MT
101 src/westferry/backend/__init__.py \
102 src/westferry/backend/__version__.py \
103 src/westferry/backend/base.py \
104 src/westferry/backend/graphs.py \
105 src/westferry/backend/main.py \
106 src/westferry/backend/system.py
4f357333
MT
107
108westferry_backenddir = $(pythondir)/westferry/backend
109
9877dda9
MT
110westferry_handlers_PYTHON = \
111 src/westferry/handlers/__init__.py \
21a66327 112 src/westferry/handlers/analytics.py \
9877dda9 113 src/westferry/handlers/base.py \
f33e1d2f 114 src/westferry/handlers/demo.py \
9877dda9
MT
115 src/westferry/handlers/index.py
116
117westferry_handlersdir = $(pythondir)/westferry/handlers
118
119westferry_ui_PYTHON = \
120 src/westferry/ui/__init__.py \
95da2e86 121 src/westferry/ui/base.py \
2ff1c21b 122 src/westferry/ui/boxes.py \
f33e1d2f 123 src/westferry/ui/forms.py \
03f518c7 124 src/westferry/ui/graphs.py \
95da2e86 125 src/westferry/ui/menu.py \
19514d9c 126 src/westferry/ui/tabs.py \
95da2e86 127 src/westferry/ui/utils.py
9877dda9
MT
128
129westferry_uidir = $(pythondir)/westferry/ui
130
95da2e86
MT
131# - templates ------------------------------------------------------------------
132
133templatesdir = $(datadir)/westferry/templates
134
135dist_templates_DATA = \
4cb418ce 136 src/templates/base.html \
19514d9c 137 src/templates/default.html \
4cb418ce 138 src/templates/graphs.html
ba309c2c
MT
139
140templates_demodir = $(templatesdir)/demo
141
142dist_templates_demo_DATA = \
ba309c2c 143 src/templates/demo/index.html
95da2e86
MT
144
145templates_modulesdir = $(templatesdir)/modules
146
2ff1c21b 147dist_templates_modules_DATA = \
19514d9c
MT
148 src/templates/modules/box.html \
149 src/templates/modules/tabs.html
03f518c7 150
f33e1d2f
MT
151templates_modules_formsdir = $(templates_modulesdir)/forms
152
153dist_templates_modules_forms_DATA = \
1b19941d 154 src/templates/modules/forms/elements.html \
f33e1d2f 155 src/templates/modules/forms/fieldset.html \
f33e1d2f
MT
156 src/templates/modules/forms/index.html
157
158templates_modules_forms_inputsdir = $(templates_modules_formsdir)/inputs
159
160dist_templates_modules_forms_inputs_DATA = \
161 src/templates/modules/forms/inputs/base.html \
162 src/templates/modules/forms/inputs/checkbox.html \
163 src/templates/modules/forms/inputs/text.html \
164 src/templates/modules/forms/inputs/textarea.html
165
03f518c7
MT
166templates_modules_graphsdir = $(templates_modulesdir)/graphs
167
168dist_templates_modules_graphs_DATA = \
06986af1 169 src/templates/modules/graphs/box.html
03f518c7 170
95da2e86
MT
171templates_modules_menudir = $(templates_modulesdir)/menu
172
173dist_templates_modules_menu_DATA = \
17eb42fd
MT
174 src/templates/modules/menu/dropdown.html \
175 src/templates/modules/menu/link.html \
a6144752 176 src/templates/modules/menu/sidebar.html \
17eb42fd 177 src/templates/modules/menu/topbar.html
95da2e86
MT
178
179ui_modulesdir = $(datadir)/westferry/templates/modules
180
181ui_modules_DATA =
182
183dist_webroot_css_DATA = \
184 src/styles/westferry.css
185
b0645c6e 186EXTRA_DIST += \
1db99dd4 187 src/styles/_fonts.scss \
df3a69ff 188 src/styles/westferry.scss
b0645c6e 189
df3a69ff
MT
190CLEANFILES += \
191 src/styles/westferry.css
b0645c6e 192
2a681509
MT
193dist_webroot_fonts_DATA = \
194 src/third-party/fonts/ofl/prompt/OFL.txt \
195 src/third-party/fonts/ofl/prompt/Prompt-Black.ttf \
196 src/third-party/fonts/ofl/prompt/Prompt-BlackItalic.ttf \
197 src/third-party/fonts/ofl/prompt/Prompt-Bold.ttf \
198 src/third-party/fonts/ofl/prompt/Prompt-BoldItalic.ttf \
199 src/third-party/fonts/ofl/prompt/Prompt-ExtraBold.ttf \
200 src/third-party/fonts/ofl/prompt/Prompt-ExtraBoldItalic.ttf \
201 src/third-party/fonts/ofl/prompt/Prompt-ExtraLight.ttf \
202 src/third-party/fonts/ofl/prompt/Prompt-ExtraLightItalic.ttf \
203 src/third-party/fonts/ofl/prompt/Prompt-Italic.ttf \
204 src/third-party/fonts/ofl/prompt/Prompt-Light.ttf \
205 src/third-party/fonts/ofl/prompt/Prompt-LightItalic.ttf \
206 src/third-party/fonts/ofl/prompt/Prompt-Medium.ttf \
207 src/third-party/fonts/ofl/prompt/Prompt-MediumItalic.ttf \
208 src/third-party/fonts/ofl/prompt/Prompt-Regular.ttf \
209 src/third-party/fonts/ofl/prompt/Prompt-SemiBold.ttf \
210 src/third-party/fonts/ofl/prompt/Prompt-SemiBoldItalic.ttf \
211 src/third-party/fonts/ofl/prompt/Prompt-Thin.ttf \
212 src/third-party/fonts/ofl/prompt/Prompt-ThinItalic.ttf
213
52b2d2ac
MT
214webroot_scripts_DATA = \
215 src/third-party/jquery.min.js \
216 src/scripts/foundation.min.js \
217 src/scripts/westferry.min.js
b0645c6e 218
30202071 219EXTRA_DIST += \
52b2d2ac 220 src/scripts/westferry.js
56020c3a 221
52b2d2ac
MT
222CLEANFILES += \
223 src/third-party/jquery.min.js \
224 src/scripts/foundation.min.js \
225 src/scripts/westferry.min.js
b0645c6e 226
52b2d2ac
MT
227# - third party ----------------------------------------------------------------
228
229EXTRA_DIST += \
230 src/third-party/foundation-sites \
231 src/third-party/jquery.js
b0645c6e 232
4f357333
MT
233# ------------------------------------------------------------------------------
234
235if ENABLE_MANPAGES
236MANPAGES =
237
238MANPAGES_XML = $(patsubst %.1,%.xml,$(patsubst %.5,%.xml,$(MANPAGES)))
239MANPAGES_HTML = $(patsubst %.xml,%.html,$(MANPAGES_XML))
240
241man: $(MANPAGES) $(MANPAGES_HTML)
242
243man_MANS = \
244 $(MANPAGES)
245
246noinst_DATA += \
247 $(MANPAGES_HTML)
248
249CLEANFILES += \
250 $(man_MANS) \
251 $(MANPAGES_HTML)
252
253EXTRA_DIST += \
254 $(MANPAGES_XML) \
255 man/custom-html.xsl
256
257XSLTPROC_FLAGS = \
258 --nonet \
259 --stringparam man.output.quietly 1 \
260 --stringparam funcsynopsis.style ansi \
261 --stringparam man.th.extra1.suppress 1 \
262 --stringparam man.authors.section.enabled 1 \
263 --stringparam man.copyright.section.enabled 1
264
265XSLTPROC_COMMAND_MAN = \
266 $(AM_V_XSLT)$(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) \
267 http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $<
268
269XSLTPROC_COMMAND_HTML = \
270 $(AM_V_XSLT)$(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) $(srcdir)/man/custom-html.xsl $<
271
272man/%.1: man/%.xml
273 $(XSLTPROC_COMMAND_MAN)
274
275man/%.5: man/%.xml
276 $(XSLTPROC_COMMAND_MAN)
277
278man/%.html: man/%.xml man/custom-html.xsl
279 $(XSLTPROC_COMMAND_HTML)
280
281endif
282
283# ------------------------------------------------------------------------------
284
285if HAVE_SYSTEMD
286systemdsystemunit_DATA = \
287 src/systemd/westferry.service
288
289CLEANFILES += \
290 $(systemdsystemunit_DATA)
291
292INSTALL_DIRS += \
293 $(systemdsystemunitdir)
294endif
295
296EXTRA_DIST += \
297 src/systemd/westferry.service.in
298
299# ------------------------------------------------------------------------------
300
301substitutions = \
302 '|PACKAGE_NAME=$(PACKAGE_NAME)|' \
303 '|PACKAGE_VERSION=$(PACKAGE_VERSION)|' \
304 '|configsdir=$(configsdir)|' \
b0645c6e
MT
305 '|bindir=$(bindir)|' \
306 '|datadir=$(datadir)|' \
95da2e86 307 '|templatesdir=$(templatesdir)|' \
b0645c6e 308 '|webrootdir=$(webrootdir)|'
4f357333
MT
309
310SED_PROCESS = \
311 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
312 $(SED) $(subst '|,-e 's|@,$(subst =,\@|,$(subst |',|g',$(substitutions)))) \
313 < $< > $@
314
52b2d2ac
MT
315UGLIFYJS_PROCESS = \
316 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
317 $(UGLIFYJS) --compress --mangle -- $< > $@
318
f75b6d41 319%.py: %.py.in
b0645c6e
MT
320 $(SED_PROCESS)
321
f75b6d41 322%.css: %.scss
942d841a
MT
323 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
324 $(SASSC) --style compressed $< > $@
325
f75b6d41 326%.min.js: %.js
52b2d2ac
MT
327 $(UGLIFYJS_PROCESS)
328
f75b6d41 329src/scripts/foundation.min.js: src/third-party/foundation-sites/dist/js/foundation.js
52b2d2ac
MT
330 $(UGLIFYJS_PROCESS)
331
f75b6d41 332src/scripts/westferry: src/scripts/westferry.in
4f357333
MT
333 $(SED_PROCESS)
334
f75b6d41 335src/systemd/%: src/systemd/%.in
4f357333 336 $(SED_PROCESS)