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