]> git.ipfire.org Git - people/ms/westferry.git/blob - Makefile.am
UI: Add boxes
[people/ms/westferry.git] / Makefile.am
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
21 ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
22 AM_MAKEFLAGS = --no-print-directory
23 AUTOMAKE_OPTIONS = color-tests
24
25 # remove target it the command fails
26 .DELETE_ON_ERROR:
27
28 # keep itermediate files
29 .SECONDARY:
30
31 SUBDIRS = . po
32
33 pythondir = $(pyexecdir)
34
35 configsdir = $(sysconfdir)/westferry
36
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
43
44 CLEANFILES =
45 DISTCLEANFILES =
46 EXTRA_DIST =
47 INSTALL_DIRS =
48 noinst_DATA =
49
50 @INTLTOOL_POLICY_RULE@
51
52 .PHONY: update-po
53 update-po:
54 $(MAKE) -C po update-po
55
56 DISTCHECK_CONFIGURE_FLAGS = \
57 --with-systemdsystemunitdir=$$dc_install_base/$(systemdsystemunitdir)
58
59 # ------------------------------------------------------------------------------
60
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 " $@;
64
65 # ------------------------------------------------------------------------------
66
67 dist_doc_DATA = \
68 COPYING
69
70 # ------------------------------------------------------------------------------
71
72 bin_SCRIPTS = \
73 src/scripts/westferry
74
75 EXTRA_DIST += \
76 src/scripts/westferry.in
77
78 CLEANFILES += \
79 src/scripts/westferry
80
81 dist_configs_DATA = \
82 westferry.conf.sample
83
84 westferry_PYTHON = \
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
90
91 westferrydir = $(pythondir)/westferry
92
93 EXTRA_DIST += \
94 src/westferry/constants.py.in
95
96 CLEANFILES += \
97 src/westferry/constants.py
98
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
106
107 westferry_backenddir = $(pythondir)/westferry/backend
108
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
116
117 westferry_backend_formsdir = $(westferry_backenddir)/forms
118
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
125
126 westferry_handlersdir = $(pythondir)/westferry/handlers
127
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/utils.py
136
137 westferry_uidir = $(pythondir)/westferry/ui
138
139 # - templates ------------------------------------------------------------------
140
141 templatesdir = $(datadir)/westferry/templates
142
143 dist_templates_DATA = \
144 src/templates/base.html \
145 src/templates/graphs.html
146
147 templates_demodir = $(templatesdir)/demo
148
149 dist_templates_demo_DATA = \
150 src/templates/demo/forms.html \
151 src/templates/demo/index.html
152
153 templates_modulesdir = $(templatesdir)/modules
154
155 dist_templates_modules_DATA = \
156 src/templates/modules/box.html
157
158 templates_modules_formsdir = $(templates_modulesdir)/forms
159
160 dist_templates_modules_forms_DATA = \
161 src/templates/modules/forms/elements.html \
162 src/templates/modules/forms/fieldset.html \
163 src/templates/modules/forms/index.html
164
165 templates_modules_forms_inputsdir = $(templates_modules_formsdir)/inputs
166
167 dist_templates_modules_forms_inputs_DATA = \
168 src/templates/modules/forms/inputs/base.html \
169 src/templates/modules/forms/inputs/checkbox.html \
170 src/templates/modules/forms/inputs/text.html \
171 src/templates/modules/forms/inputs/textarea.html
172
173 templates_modules_graphsdir = $(templates_modulesdir)/graphs
174
175 dist_templates_modules_graphs_DATA = \
176 src/templates/modules/graphs/box.html \
177 src/templates/modules/graphs/preview.html \
178 src/templates/modules/graphs/thumbnail.html \
179 src/templates/modules/graphs/thumbnail-bar.html
180
181 templates_modules_menudir = $(templates_modulesdir)/menu
182
183 dist_templates_modules_menu_DATA = \
184 src/templates/modules/menu/sidebar.html \
185 src/templates/modules/menu/sidebar-link.html
186
187 ui_modulesdir = $(datadir)/westferry/templates/modules
188
189 ui_modules_DATA =
190
191 dist_webroot_css_DATA = \
192 src/styles/westferry.css
193
194 EXTRA_DIST += \
195 src/styles/_fonts.scss \
196 src/styles/westferry.scss
197
198 CLEANFILES += \
199 src/styles/westferry.css
200
201 dist_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
222 webroot_scripts_DATA = \
223 src/third-party/jquery.min.js \
224 src/scripts/foundation.min.js \
225 src/scripts/westferry.min.js
226
227 EXTRA_DIST += \
228 src/scripts/westferry.js
229
230 CLEANFILES += \
231 src/third-party/jquery.min.js \
232 src/scripts/foundation.min.js \
233 src/scripts/westferry.min.js
234
235 # - third party ----------------------------------------------------------------
236
237 EXTRA_DIST += \
238 src/third-party/foundation-sites \
239 src/third-party/jquery.js
240
241 # ------------------------------------------------------------------------------
242
243 if ENABLE_MANPAGES
244 MANPAGES =
245
246 MANPAGES_XML = $(patsubst %.1,%.xml,$(patsubst %.5,%.xml,$(MANPAGES)))
247 MANPAGES_HTML = $(patsubst %.xml,%.html,$(MANPAGES_XML))
248
249 man: $(MANPAGES) $(MANPAGES_HTML)
250
251 man_MANS = \
252 $(MANPAGES)
253
254 noinst_DATA += \
255 $(MANPAGES_HTML)
256
257 CLEANFILES += \
258 $(man_MANS) \
259 $(MANPAGES_HTML)
260
261 EXTRA_DIST += \
262 $(MANPAGES_XML) \
263 man/custom-html.xsl
264
265 XSLTPROC_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
273 XSLTPROC_COMMAND_MAN = \
274 $(AM_V_XSLT)$(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) \
275 http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $<
276
277 XSLTPROC_COMMAND_HTML = \
278 $(AM_V_XSLT)$(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) $(srcdir)/man/custom-html.xsl $<
279
280 man/%.1: man/%.xml
281 $(XSLTPROC_COMMAND_MAN)
282
283 man/%.5: man/%.xml
284 $(XSLTPROC_COMMAND_MAN)
285
286 man/%.html: man/%.xml man/custom-html.xsl
287 $(XSLTPROC_COMMAND_HTML)
288
289 endif
290
291 # ------------------------------------------------------------------------------
292
293 if HAVE_SYSTEMD
294 systemdsystemunit_DATA = \
295 src/systemd/westferry.service
296
297 CLEANFILES += \
298 $(systemdsystemunit_DATA)
299
300 INSTALL_DIRS += \
301 $(systemdsystemunitdir)
302 endif
303
304 EXTRA_DIST += \
305 src/systemd/westferry.service.in
306
307 # ------------------------------------------------------------------------------
308
309 substitutions = \
310 '|PACKAGE_NAME=$(PACKAGE_NAME)|' \
311 '|PACKAGE_VERSION=$(PACKAGE_VERSION)|' \
312 '|configsdir=$(configsdir)|' \
313 '|bindir=$(bindir)|' \
314 '|datadir=$(datadir)|' \
315 '|templatesdir=$(templatesdir)|' \
316 '|webrootdir=$(webrootdir)|'
317
318 SED_PROCESS = \
319 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
320 $(SED) $(subst '|,-e 's|@,$(subst =,\@|,$(subst |',|g',$(substitutions)))) \
321 < $< > $@
322
323 UGLIFYJS_PROCESS = \
324 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
325 $(UGLIFYJS) --compress --mangle -- $< > $@
326
327 %.py: %.py.in
328 $(SED_PROCESS)
329
330 %.css: %.scss
331 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
332 $(SASSC) --style compressed $< > $@
333
334 %.min.js: %.js
335 $(UGLIFYJS_PROCESS)
336
337 src/scripts/foundation.min.js: src/third-party/foundation-sites/dist/js/foundation.js
338 $(UGLIFYJS_PROCESS)
339
340 src/scripts/westferry: src/scripts/westferry.in
341 $(SED_PROCESS)
342
343 src/systemd/%: src/systemd/%.in
344 $(SED_PROCESS)