]> git.ipfire.org Git - people/ms/westferry.git/blame - Makefile.am
Add a very basic website template
[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
MT
87 src/westferry/application.py \
88 src/westferry/services.py
4f357333
MT
89
90westferrydir = $(pythondir)/westferry
91
b0645c6e
MT
92EXTRA_DIST += \
93 src/westferry/constants.py.in
94
95CLEANFILES += \
96 src/westferry/constants.py
97
4f357333
MT
98westferry_backend_PYTHON = \
99 src/westferry/backend/__version__.py
100
101westferry_backenddir = $(pythondir)/westferry/backend
102
9877dda9
MT
103westferry_handlers_PYTHON = \
104 src/westferry/handlers/__init__.py \
105 src/westferry/handlers/base.py \
106 src/westferry/handlers/index.py
107
108westferry_handlersdir = $(pythondir)/westferry/handlers
109
110westferry_ui_PYTHON = \
111 src/westferry/ui/__init__.py \
95da2e86
MT
112 src/westferry/ui/base.py \
113 src/westferry/ui/menu.py \
114 src/westferry/ui/utils.py
9877dda9
MT
115
116westferry_uidir = $(pythondir)/westferry/ui
117
95da2e86
MT
118# - templates ------------------------------------------------------------------
119
120templatesdir = $(datadir)/westferry/templates
121
122dist_templates_DATA = \
123 src/templates/base.html
124
125templates_modulesdir = $(templatesdir)/modules
126
127templates_modules_menudir = $(templates_modulesdir)/menu
128
129dist_templates_modules_menu_DATA = \
130 src/templates/modules/menu/sidebar.html
131
132ui_modulesdir = $(datadir)/westferry/templates/modules
133
134ui_modules_DATA =
135
136dist_webroot_css_DATA = \
137 src/styles/westferry.css
138
b0645c6e
MT
139# - third party ----------------------------------------------------------------
140
141# We currently ship a copy of Bootstrap which eventually has to go away
142
95da2e86 143dist_webroot_css_DATA += \
b0645c6e
MT
144 src/third-party/bootstrap/css/bootstrap.min.css
145
146EXTRA_DIST += \
147 src/third-party/bootstrap/css/bootstrap.css \
148 src/third-party/bootstrap/css/bootstrap-theme.css \
149 src/third-party/bootstrap/css/bootstrap-theme.css.map \
150 src/third-party/bootstrap/css/bootstrap.min.css \
151 src/third-party/bootstrap/css/bootstrap-theme.min.css \
152 src/third-party/bootstrap/css/bootstrap.css.map
153
154dist_webroot_fonts_DATA = \
155 src/third-party/bootstrap/fonts/glyphicons-halflings-regular.ttf \
156 src/third-party/bootstrap/fonts/glyphicons-halflings-regular.svg \
157 src/third-party/bootstrap/fonts/glyphicons-halflings-regular.woff \
158 src/third-party/bootstrap/fonts/glyphicons-halflings-regular.eot \
159 src/third-party/bootstrap/fonts/glyphicons-halflings-regular.woff2
160
161dist_webroot_scripts_DATA = \
162 src/third-party/bootstrap/js/bootstrap.min.js
163
164EXTRA_DIST += \
165 src/third-party/bootstrap/js/npm.js \
166 src/third-party/bootstrap/js/bootstrap.js
167
168# Also shipping jQuery
169
95da2e86 170dist_webroot_scripts_DATA += \
b0645c6e
MT
171 src/third-party/jquery.min.js
172
4f357333
MT
173# ------------------------------------------------------------------------------
174
175if ENABLE_MANPAGES
176MANPAGES =
177
178MANPAGES_XML = $(patsubst %.1,%.xml,$(patsubst %.5,%.xml,$(MANPAGES)))
179MANPAGES_HTML = $(patsubst %.xml,%.html,$(MANPAGES_XML))
180
181man: $(MANPAGES) $(MANPAGES_HTML)
182
183man_MANS = \
184 $(MANPAGES)
185
186noinst_DATA += \
187 $(MANPAGES_HTML)
188
189CLEANFILES += \
190 $(man_MANS) \
191 $(MANPAGES_HTML)
192
193EXTRA_DIST += \
194 $(MANPAGES_XML) \
195 man/custom-html.xsl
196
197XSLTPROC_FLAGS = \
198 --nonet \
199 --stringparam man.output.quietly 1 \
200 --stringparam funcsynopsis.style ansi \
201 --stringparam man.th.extra1.suppress 1 \
202 --stringparam man.authors.section.enabled 1 \
203 --stringparam man.copyright.section.enabled 1
204
205XSLTPROC_COMMAND_MAN = \
206 $(AM_V_XSLT)$(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) \
207 http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $<
208
209XSLTPROC_COMMAND_HTML = \
210 $(AM_V_XSLT)$(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) $(srcdir)/man/custom-html.xsl $<
211
212man/%.1: man/%.xml
213 $(XSLTPROC_COMMAND_MAN)
214
215man/%.5: man/%.xml
216 $(XSLTPROC_COMMAND_MAN)
217
218man/%.html: man/%.xml man/custom-html.xsl
219 $(XSLTPROC_COMMAND_HTML)
220
221endif
222
223# ------------------------------------------------------------------------------
224
225if HAVE_SYSTEMD
226systemdsystemunit_DATA = \
227 src/systemd/westferry.service
228
229CLEANFILES += \
230 $(systemdsystemunit_DATA)
231
232INSTALL_DIRS += \
233 $(systemdsystemunitdir)
234endif
235
236EXTRA_DIST += \
237 src/systemd/westferry.service.in
238
239# ------------------------------------------------------------------------------
240
241substitutions = \
242 '|PACKAGE_NAME=$(PACKAGE_NAME)|' \
243 '|PACKAGE_VERSION=$(PACKAGE_VERSION)|' \
244 '|configsdir=$(configsdir)|' \
b0645c6e
MT
245 '|bindir=$(bindir)|' \
246 '|datadir=$(datadir)|' \
95da2e86 247 '|templatesdir=$(templatesdir)|' \
b0645c6e 248 '|webrootdir=$(webrootdir)|'
4f357333
MT
249
250SED_PROCESS = \
251 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
252 $(SED) $(subst '|,-e 's|@,$(subst =,\@|,$(subst |',|g',$(substitutions)))) \
253 < $< > $@
254
b0645c6e
MT
255%.py: %.py.in Makefile
256 $(SED_PROCESS)
257
4f357333
MT
258src/scripts/westferry: src/scripts/westferry.in Makefile
259 $(SED_PROCESS)
260
261src/systemd/%: src/systemd/%.in Makefile
262 $(SED_PROCESS)