]> git.ipfire.org Git - pbs.git/blob - Makefile.am
builders: Refactor detail page and add live statistics
[pbs.git] / Makefile.am
1 ###############################################################################
2 # #
3 # Pakfire - The IPFire package management system #
4 # Copyright (C) 2017 Pakfire 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)/pakfire
34
35 configsdir = $(sysconfdir)/pakfire
36 crondir = $(sysconfdir)/cron.d
37
38 BUILT_SOURCES =
39 CLEANFILES =
40 DISTCLEANFILES =
41 EXTRA_DIST =
42 INSTALL_DIRS =
43 noinst_DATA =
44
45 @INTLTOOL_POLICY_RULE@
46
47 .PHONY: update-po
48 update-po: po/POTFILES.in
49 $(MAKE) -C po update-po
50
51 po/POTFILES.in: Makefile
52 find $(abs_srcdir)/src -not -path "$(abs_srcdir)/src/third-party/*" | \
53 grep -E "\.(html|py|txt)(\.in)?$$" | \
54 sed -e "s@$(abs_srcdir)/@@g" | \
55 LC_COLLATE=C sort > $@
56
57 DISTCHECK_CONFIGURE_FLAGS = \
58 --with-systemdsystemunitdir=$$dc_install_base/$(systemdsystemunitdir)
59
60 # ------------------------------------------------------------------------------
61
62 AM_V_XSLT = $(AM_V_XSLT_$(V))
63 AM_V_XSLT_ = $(AM_V_XSLT_$(AM_DEFAULT_VERBOSITY))
64 AM_V_XSLT_0 = @echo " XSLT " $@;
65
66 # ------------------------------------------------------------------------------
67
68 dist_doc_DATA = \
69 COPYING \
70 README
71
72 # ------------------------------------------------------------------------------
73
74 dist_bin_SCRIPTS = \
75 src/scripts/pakfire-build-service \
76 src/scripts/pakfire-web
77
78 dist_configs_DATA = \
79 pbs.conf.sample
80
81 buildservice_PYTHON = \
82 src/buildservice/__init__.py \
83 src/buildservice/__version__.py \
84 src/buildservice/aws.py \
85 src/buildservice/base.py \
86 src/buildservice/bugtracker.py \
87 src/buildservice/builders.py \
88 src/buildservice/builds.py \
89 src/buildservice/cache.py \
90 src/buildservice/config.py \
91 src/buildservice/constants.py \
92 src/buildservice/database.py \
93 src/buildservice/decorators.py \
94 src/buildservice/distribution.py \
95 src/buildservice/errors.py \
96 src/buildservice/events.py \
97 src/buildservice/git.py \
98 src/buildservice/jobs.py \
99 src/buildservice/keys.py \
100 src/buildservice/logstreams.py \
101 src/buildservice/messages.py \
102 src/buildservice/mirrors.py \
103 src/buildservice/misc.py \
104 src/buildservice/packages.py \
105 src/buildservice/repository.py \
106 src/buildservice/sessions.py \
107 src/buildservice/settings.py \
108 src/buildservice/sources.py \
109 src/buildservice/uploads.py \
110 src/buildservice/users.py
111
112 buildservicedir = $(pythondir)/buildservice
113
114 BUILT_SOURCES += \
115 src/buildservice/constants.py
116
117 EXTRA_DIST += \
118 src/buildservice/constants.py.in
119
120 CLEANFILES += \
121 src/buildservice/constants.py
122
123 web_PYTHON = \
124 src/web/__init__.py \
125 src/web/auth.py \
126 src/web/base.py \
127 src/web/bugs.py \
128 src/web/builders.py \
129 src/web/builds.py \
130 src/web/distributions.py \
131 src/web/errors.py \
132 src/web/events.py \
133 src/web/handlers.py \
134 src/web/jobs.py \
135 src/web/keys.py \
136 src/web/mirrors.py \
137 src/web/packages.py \
138 src/web/repos.py \
139 src/web/search.py \
140 src/web/ui_modules.py \
141 src/web/uploads.py \
142 src/web/users.py
143
144 webdir = $(buildservicedir)/web
145
146 # ------------------------------------------------------------------------------
147
148 dist_templates_DATA = \
149 src/templates/base.html \
150 src/templates/index.html \
151 src/templates/jobs-buildroot.html \
152 src/templates/log.html \
153 src/templates/login.html \
154 src/templates/queue.html \
155 src/templates/search.html
156
157 templatesdir = $(datadir)/templates
158
159 templates_bugsdir = $(templatesdir)/bugs
160
161 dist_templates_bugs_modules_DATA = \
162 src/templates/bugs/modules/list.html
163
164 templates_bugs_modulesdir = $(templates_bugsdir)/modules
165
166 dist_templates_builders_DATA = \
167 src/templates/builders/delete.html \
168 src/templates/builders/detail.html \
169 src/templates/builders/edit.html \
170 src/templates/builders/list.html \
171 src/templates/builders/new.html
172
173 templates_buildersdir = $(templatesdir)/builders
174
175 dist_templates_builders_modules_DATA = \
176 src/templates/builders/modules/stats.html
177
178 templates_builders_modulesdir = $(templates_buildersdir)/modules
179
180 dist_templates_builds_DATA = \
181 src/templates/builds/delete.html \
182 src/templates/builds/index.html \
183 src/templates/builds/show.html
184
185 templates_buildsdir = $(templatesdir)/builds
186
187 dist_templates_builds_messages_DATA = \
188 src/templates/builds/messages/comment.txt \
189 src/templates/builds/messages/failed.txt \
190 src/templates/builds/messages/finished.txt
191
192 templates_builds_messagesdir = $(templates_buildsdir)/messages
193
194 dist_templates_builds_modules_DATA = \
195 src/templates/builds/modules/list.html
196
197 templates_builds_modulesdir = $(templates_buildsdir)/modules
198
199 dist_templates_distros_DATA = \
200 src/templates/distros/edit.html \
201 src/templates/distros/index.html \
202 src/templates/distros/show.html
203
204 templates_distrosdir = $(templatesdir)/distros
205
206 dist_templates_distros_modules_DATA = \
207 src/templates/distros/modules/list.html
208
209 templates_distros_modulesdir = $(templates_distrosdir)/modules
210
211 dist_templates_errors_DATA = \
212 src/templates/errors/error.html
213
214 templates_errorsdir = $(templatesdir)/errors
215
216 templates_eventsdir = $(templatesdir)/events
217
218 dist_templates_events_modules_DATA = \
219 src/templates/events/modules/list.html \
220 src/templates/events/modules/build-comment.html \
221 src/templates/events/modules/system-message.html \
222 src/templates/events/modules/user-message.html
223
224 templates_events_modulesdir = $(templates_eventsdir)/modules
225
226 dist_templates_jobs_DATA = \
227 src/templates/jobs/abort.html \
228 src/templates/jobs/log-stream.html \
229 src/templates/jobs/retry.html
230
231 templates_jobsdir = $(templatesdir)/jobs
232
233 dist_templates_jobs_messages_DATA = \
234 src/templates/jobs/messages/failed.txt
235
236 templates_jobs_messagesdir = $(templates_jobsdir)/messages
237
238 dist_templates_jobs_modules_DATA = \
239 src/templates/jobs/modules/list.html \
240 src/templates/jobs/modules/log-stream.html
241
242 templates_jobs_modulesdir = $(templates_jobsdir)/modules
243
244 templates_messagesdir = $(templatesdir)/messages
245
246 dist_templates_mirrors_DATA = \
247 src/templates/mirrors/delete.html \
248 src/templates/mirrors/detail.html \
249 src/templates/mirrors/edit.html \
250 src/templates/mirrors/list.html \
251 src/templates/mirrors/new.html
252
253 templates_mirrorsdir = $(templatesdir)/mirrors
254
255 dist_templates_modules_DATA = \
256 src/templates/modules/commits-table.html \
257 src/templates/modules/commit-message.html \
258 src/templates/modules/link-to-user.html \
259 src/templates/modules/packages-files-table.html \
260 src/templates/modules/source-table.html \
261 src/templates/modules/text.html
262
263 templates_modulesdir = $(templatesdir)/modules
264
265 dist_templates_repos_DATA = \
266 src/templates/repos/create-custom.html \
267 src/templates/repos/builds.html \
268 src/templates/repos/edit.html \
269 src/templates/repos/show.html
270
271 templates_reposdir = $(templatesdir)/repos
272
273 dist_templates_repos_modules_DATA = \
274 src/templates/repos/modules/list.html
275
276 templates_repos_modulesdir = $(templates_reposdir)/modules
277
278 dist_templates_packages_DATA = \
279 src/templates/packages/index.html \
280 src/templates/packages/name.html \
281 src/templates/packages/show.html \
282 src/templates/packages/view-file.html
283
284 templates_packagesdir = $(templatesdir)/packages
285
286 dist_templates_packages_modules_DATA = \
287 src/templates/packages/modules/dependencies.html \
288 src/templates/packages/modules/info.html
289
290 templates_packages_modulesdir = $(templates_packagesdir)/modules
291
292 dist_templates_users_DATA = \
293 src/templates/users/delete.html \
294 src/templates/users/edit.html \
295 src/templates/users/index.html \
296 src/templates/users/show.html
297
298 templates_usersdir = $(templatesdir)/users
299
300 dist_templates_users_messages_DATA = \
301 src/templates/users/messages/welcome.txt
302
303 templates_users_messagesdir = $(templates_usersdir)/messages
304
305 dist_templates_users_modules_DATA = \
306 src/templates/users/modules/list.html
307
308 templates_users_modulesdir = $(templates_usersdir)/modules
309
310 # ------------------------------------------------------------------------------
311 #
312 dist_static_DATA = \
313 src/static/favicon.ico \
314 src/static/robots.txt
315
316 staticdir = $(datadir)/static
317
318 static_css_DATA = \
319 src/static/css/site.css
320
321 static_cssdir = $(staticdir)/css
322
323 EXTRA_DIST += \
324 src/static/css/_fonts.scss \
325 src/static/css/_icons.scss \
326 src/static/css/site.scss
327
328 CLEANFILES += \
329 src/static/css/site.css
330
331 static_js_DATA = \
332 src/static/js/builders-stats.min.js \
333 src/static/js/jquery.min.js \
334 src/static/js/job-log-stream.min.js \
335 src/static/js/pbs.min.js
336
337 static_jsdir = $(staticdir)/js
338
339 EXTRA_DIST += \
340 src/static/js/builders-stats.js \
341 src/static/js/job-log-stream.js \
342 src/static/js/pbs.js
343
344 CLEANFILES += \
345 $(static_js_DATA)
346
347 dist_static_fonts_DATA = \
348 src/third-party/fonts/prompt/OFL.txt \
349 src/third-party/fonts/prompt/Prompt-Black.ttf \
350 src/third-party/fonts/prompt/Prompt-BlackItalic.ttf \
351 src/third-party/fonts/prompt/Prompt-Bold.ttf \
352 src/third-party/fonts/prompt/Prompt-BoldItalic.ttf \
353 src/third-party/fonts/prompt/Prompt-ExtraBold.ttf \
354 src/third-party/fonts/prompt/Prompt-ExtraBoldItalic.ttf \
355 src/third-party/fonts/prompt/Prompt-ExtraLight.ttf \
356 src/third-party/fonts/prompt/Prompt-ExtraLightItalic.ttf \
357 src/third-party/fonts/prompt/Prompt-Italic.ttf \
358 src/third-party/fonts/prompt/Prompt-Light.ttf \
359 src/third-party/fonts/prompt/Prompt-LightItalic.ttf \
360 src/third-party/fonts/prompt/Prompt-Medium.ttf \
361 src/third-party/fonts/prompt/Prompt-MediumItalic.ttf \
362 src/third-party/fonts/prompt/Prompt-Regular.ttf \
363 src/third-party/fonts/prompt/Prompt-SemiBold.ttf \
364 src/third-party/fonts/prompt/Prompt-SemiBoldItalic.ttf \
365 src/third-party/fonts/prompt/Prompt-Thin.ttf \
366 src/third-party/fonts/prompt/Prompt-ThinItalic.ttf \
367 src/third-party/Font-Awesome/webfonts/fa-brands-400.ttf \
368 src/third-party/Font-Awesome/webfonts/fa-brands-400.woff2 \
369 src/third-party/Font-Awesome/webfonts/fa-regular-400.ttf \
370 src/third-party/Font-Awesome/webfonts/fa-regular-400.woff2 \
371 src/third-party/Font-Awesome/webfonts/fa-solid-900.ttf \
372 src/third-party/Font-Awesome/webfonts/fa-solid-900.woff2
373
374 static_fontsdir = $(staticdir)/fonts
375
376 # ------------------------------------------------------------------------------
377
378 if HAVE_SYSTEMD
379 systemdsystemunit_DATA = \
380 src/systemd/pakfire-web.service
381
382 CLEANFILES += \
383 $(systemdsystemunit_DATA)
384
385 INSTALL_DIRS += \
386 $(systemdsystemunitdir)
387 endif
388
389 EXTRA_DIST += \
390 src/systemd/pakfire-web.service.in
391
392 dist_database_DATA = \
393 src/database.sql
394
395 databasedir = $(datadir)/database
396
397 dist_cron_DATA = \
398 src/crontab/pakfire-build-service
399
400 EXTRA_DIST += \
401 src/tools/dump-database-schema.sh
402
403 # ------------------------------------------------------------------------------
404
405 substitutions = \
406 '|PACKAGE_NAME=$(PACKAGE_NAME)|' \
407 '|PACKAGE_VERSION=$(PACKAGE_VERSION)|' \
408 '|configsdir=$(configsdir)|' \
409 '|bindir=$(bindir)|' \
410 '|datadir=$(datadir)|' \
411 '|localedir=$(localedir)|' \
412 '|templatesdir=$(templatesdir)|' \
413 '|staticdir=$(staticdir)|'
414
415 SED_PROCESS = \
416 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
417 $(SED) $(subst '|,-e 's|@,$(subst =,\@|,$(subst |',|g',$(substitutions)))) \
418 < $< > $@
419
420 UGLIFYJS_PROCESS = \
421 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
422 $(UGLIFYJS) --compress --mangle -- $< > $@
423
424 %: %.in Makefile
425 $(SED_PROCESS)
426
427 %.css: %.scss
428 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
429 $(SASSC) --style compressed $< > $@
430
431 src/static/css/highlight.css: Makefile
432 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
433 $(PYGMENTIZE) -S xcode -f html -a .highlight > $@
434
435 %.min.js: %.js
436 $(UGLIFYJS_PROCESS)
437
438 # ------------------------------------------------------------------------------
439
440 TESTS = \
441 $(dist_check_SCRIPTS)
442
443 TESTS_ENVIRONMENT = \
444 PYTHONPATH="$(abs_top_srcdir)/src" \
445 abs_top_srcdir="$(abs_top_srcdir)"
446
447 dist_check_SCRIPTS = \
448 tests/setup.py \
449 tests/build.py \
450 tests/builder.py \
451 tests/distro.py \
452 tests/message.py \
453 tests/package.py \
454 tests/repo.py \
455 tests/upload.py
456
457 EXTRA_DIST += \
458 tests/test.py
459
460 EXTRA_DIST += \
461 tests/data/beep-1.3-2.ip3.src.pfm \
462 tests/data/beep-1.3-2.ip3.x86_64.pfm