]> git.ipfire.org Git - people/ms/westferry.git/blame - Makefile.am
UI: Add tabs
[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 \
9877dda9 89 src/westferry/services.py
4f357333
MT
90
91westferrydir = $(pythondir)/westferry
92
b0645c6e
MT
93EXTRA_DIST += \
94 src/westferry/constants.py.in
95
96CLEANFILES += \
97 src/westferry/constants.py
98
4f357333 99westferry_backend_PYTHON = \
21a66327
MT
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
4f357333
MT
106
107westferry_backenddir = $(pythondir)/westferry/backend
108
f33e1d2f
MT
109westferry_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
116
117westferry_backend_formsdir = $(westferry_backenddir)/forms
118
9877dda9
MT
119westferry_handlers_PYTHON = \
120 src/westferry/handlers/__init__.py \
21a66327 121 src/westferry/handlers/analytics.py \
9877dda9 122 src/westferry/handlers/base.py \
f33e1d2f 123 src/westferry/handlers/demo.py \
9877dda9
MT
124 src/westferry/handlers/index.py
125
126westferry_handlersdir = $(pythondir)/westferry/handlers
127
128westferry_ui_PYTHON = \
129 src/westferry/ui/__init__.py \
95da2e86 130 src/westferry/ui/base.py \
2ff1c21b 131 src/westferry/ui/boxes.py \
f33e1d2f 132 src/westferry/ui/forms.py \
03f518c7 133 src/westferry/ui/graphs.py \
95da2e86 134 src/westferry/ui/menu.py \
19514d9c 135 src/westferry/ui/tabs.py \
95da2e86 136 src/westferry/ui/utils.py
9877dda9
MT
137
138westferry_uidir = $(pythondir)/westferry/ui
139
95da2e86
MT
140# - templates ------------------------------------------------------------------
141
142templatesdir = $(datadir)/westferry/templates
143
144dist_templates_DATA = \
4cb418ce 145 src/templates/base.html \
19514d9c 146 src/templates/default.html \
4cb418ce 147 src/templates/graphs.html
ba309c2c
MT
148
149templates_demodir = $(templatesdir)/demo
150
151dist_templates_demo_DATA = \
152 src/templates/demo/forms.html \
153 src/templates/demo/index.html
95da2e86
MT
154
155templates_modulesdir = $(templatesdir)/modules
156
2ff1c21b 157dist_templates_modules_DATA = \
19514d9c
MT
158 src/templates/modules/box.html \
159 src/templates/modules/tabs.html
03f518c7 160
f33e1d2f
MT
161templates_modules_formsdir = $(templates_modulesdir)/forms
162
163dist_templates_modules_forms_DATA = \
1b19941d 164 src/templates/modules/forms/elements.html \
f33e1d2f 165 src/templates/modules/forms/fieldset.html \
f33e1d2f
MT
166 src/templates/modules/forms/index.html
167
168templates_modules_forms_inputsdir = $(templates_modules_formsdir)/inputs
169
170dist_templates_modules_forms_inputs_DATA = \
171 src/templates/modules/forms/inputs/base.html \
172 src/templates/modules/forms/inputs/checkbox.html \
173 src/templates/modules/forms/inputs/text.html \
174 src/templates/modules/forms/inputs/textarea.html
175
03f518c7
MT
176templates_modules_graphsdir = $(templates_modulesdir)/graphs
177
178dist_templates_modules_graphs_DATA = \
06986af1 179 src/templates/modules/graphs/box.html
03f518c7 180
95da2e86
MT
181templates_modules_menudir = $(templates_modulesdir)/menu
182
183dist_templates_modules_menu_DATA = \
a6144752 184 src/templates/modules/menu/sidebar.html \
3c9a9d48 185 src/templates/modules/menu/sidebar-link.html
95da2e86
MT
186
187ui_modulesdir = $(datadir)/westferry/templates/modules
188
189ui_modules_DATA =
190
191dist_webroot_css_DATA = \
192 src/styles/westferry.css
193
b0645c6e 194EXTRA_DIST += \
1db99dd4 195 src/styles/_fonts.scss \
df3a69ff 196 src/styles/westferry.scss
b0645c6e 197
df3a69ff
MT
198CLEANFILES += \
199 src/styles/westferry.css
b0645c6e 200
2a681509
MT
201dist_webroot_fonts_DATA = \
202 src/third-party/fonts/ofl/prompt/OFL.txt \
203 src/third-party/fonts/ofl/prompt/Prompt-Black.ttf \
204 src/third-party/fonts/ofl/prompt/Prompt-BlackItalic.ttf \
205 src/third-party/fonts/ofl/prompt/Prompt-Bold.ttf \
206 src/third-party/fonts/ofl/prompt/Prompt-BoldItalic.ttf \
207 src/third-party/fonts/ofl/prompt/Prompt-ExtraBold.ttf \
208 src/third-party/fonts/ofl/prompt/Prompt-ExtraBoldItalic.ttf \
209 src/third-party/fonts/ofl/prompt/Prompt-ExtraLight.ttf \
210 src/third-party/fonts/ofl/prompt/Prompt-ExtraLightItalic.ttf \
211 src/third-party/fonts/ofl/prompt/Prompt-Italic.ttf \
212 src/third-party/fonts/ofl/prompt/Prompt-Light.ttf \
213 src/third-party/fonts/ofl/prompt/Prompt-LightItalic.ttf \
214 src/third-party/fonts/ofl/prompt/Prompt-Medium.ttf \
215 src/third-party/fonts/ofl/prompt/Prompt-MediumItalic.ttf \
216 src/third-party/fonts/ofl/prompt/Prompt-Regular.ttf \
217 src/third-party/fonts/ofl/prompt/Prompt-SemiBold.ttf \
218 src/third-party/fonts/ofl/prompt/Prompt-SemiBoldItalic.ttf \
219 src/third-party/fonts/ofl/prompt/Prompt-Thin.ttf \
220 src/third-party/fonts/ofl/prompt/Prompt-ThinItalic.ttf
221
52b2d2ac
MT
222webroot_scripts_DATA = \
223 src/third-party/jquery.min.js \
224 src/scripts/foundation.min.js \
225 src/scripts/westferry.min.js
b0645c6e 226
30202071 227EXTRA_DIST += \
52b2d2ac 228 src/scripts/westferry.js
56020c3a 229
52b2d2ac
MT
230CLEANFILES += \
231 src/third-party/jquery.min.js \
232 src/scripts/foundation.min.js \
233 src/scripts/westferry.min.js
b0645c6e 234
52b2d2ac
MT
235# - third party ----------------------------------------------------------------
236
237EXTRA_DIST += \
238 src/third-party/foundation-sites \
239 src/third-party/jquery.js
b0645c6e 240
4f357333
MT
241# ------------------------------------------------------------------------------
242
243if ENABLE_MANPAGES
244MANPAGES =
245
246MANPAGES_XML = $(patsubst %.1,%.xml,$(patsubst %.5,%.xml,$(MANPAGES)))
247MANPAGES_HTML = $(patsubst %.xml,%.html,$(MANPAGES_XML))
248
249man: $(MANPAGES) $(MANPAGES_HTML)
250
251man_MANS = \
252 $(MANPAGES)
253
254noinst_DATA += \
255 $(MANPAGES_HTML)
256
257CLEANFILES += \
258 $(man_MANS) \
259 $(MANPAGES_HTML)
260
261EXTRA_DIST += \
262 $(MANPAGES_XML) \
263 man/custom-html.xsl
264
265XSLTPROC_FLAGS = \
266 --nonet \
267 --stringparam man.output.quietly 1 \
268 --stringparam funcsynopsis.style ansi \
269 --stringparam man.th.extra1.suppress 1 \
270 --stringparam man.authors.section.enabled 1 \
271 --stringparam man.copyright.section.enabled 1
272
273XSLTPROC_COMMAND_MAN = \
274 $(AM_V_XSLT)$(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) \
275 http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $<
276
277XSLTPROC_COMMAND_HTML = \
278 $(AM_V_XSLT)$(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) $(srcdir)/man/custom-html.xsl $<
279
280man/%.1: man/%.xml
281 $(XSLTPROC_COMMAND_MAN)
282
283man/%.5: man/%.xml
284 $(XSLTPROC_COMMAND_MAN)
285
286man/%.html: man/%.xml man/custom-html.xsl
287 $(XSLTPROC_COMMAND_HTML)
288
289endif
290
291# ------------------------------------------------------------------------------
292
293if HAVE_SYSTEMD
294systemdsystemunit_DATA = \
295 src/systemd/westferry.service
296
297CLEANFILES += \
298 $(systemdsystemunit_DATA)
299
300INSTALL_DIRS += \
301 $(systemdsystemunitdir)
302endif
303
304EXTRA_DIST += \
305 src/systemd/westferry.service.in
306
307# ------------------------------------------------------------------------------
308
309substitutions = \
310 '|PACKAGE_NAME=$(PACKAGE_NAME)|' \
311 '|PACKAGE_VERSION=$(PACKAGE_VERSION)|' \
312 '|configsdir=$(configsdir)|' \
b0645c6e
MT
313 '|bindir=$(bindir)|' \
314 '|datadir=$(datadir)|' \
95da2e86 315 '|templatesdir=$(templatesdir)|' \
b0645c6e 316 '|webrootdir=$(webrootdir)|'
4f357333
MT
317
318SED_PROCESS = \
319 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
320 $(SED) $(subst '|,-e 's|@,$(subst =,\@|,$(subst |',|g',$(substitutions)))) \
321 < $< > $@
322
52b2d2ac
MT
323UGLIFYJS_PROCESS = \
324 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
325 $(UGLIFYJS) --compress --mangle -- $< > $@
326
f75b6d41 327%.py: %.py.in
b0645c6e
MT
328 $(SED_PROCESS)
329
f75b6d41 330%.css: %.scss
942d841a
MT
331 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
332 $(SASSC) --style compressed $< > $@
333
f75b6d41 334%.min.js: %.js
52b2d2ac
MT
335 $(UGLIFYJS_PROCESS)
336
f75b6d41 337src/scripts/foundation.min.js: src/third-party/foundation-sites/dist/js/foundation.js
52b2d2ac
MT
338 $(UGLIFYJS_PROCESS)
339
f75b6d41 340src/scripts/westferry: src/scripts/westferry.in
4f357333
MT
341 $(SED_PROCESS)
342
f75b6d41 343src/systemd/%: src/systemd/%.in
4f357333 344 $(SED_PROCESS)