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