]> git.ipfire.org Git - pbs.git/blob - Makefile.am
logstream: Fix sending the last messages
[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/httpclient.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/ratelimiter.py \
106 src/buildservice/releasemonitoring.py \
107 src/buildservice/repository.py \
108 src/buildservice/sessions.py \
109 src/buildservice/settings.py \
110 src/buildservice/sources.py \
111 src/buildservice/uploads.py \
112 src/buildservice/users.py
113
114 buildservicedir = $(pythondir)/buildservice
115
116 BUILT_SOURCES += \
117 src/buildservice/constants.py
118
119 EXTRA_DIST += \
120 src/buildservice/constants.py.in
121
122 CLEANFILES += \
123 src/buildservice/constants.py
124
125 web_PYTHON = \
126 src/web/__init__.py \
127 src/web/auth.py \
128 src/web/base.py \
129 src/web/bugs.py \
130 src/web/builders.py \
131 src/web/builds.py \
132 src/web/distributions.py \
133 src/web/errors.py \
134 src/web/events.py \
135 src/web/handlers.py \
136 src/web/jobs.py \
137 src/web/mirrors.py \
138 src/web/monitorings.py \
139 src/web/packages.py \
140 src/web/repos.py \
141 src/web/search.py \
142 src/web/sources.py \
143 src/web/ui_modules.py \
144 src/web/uploads.py \
145 src/web/users.py
146
147 webdir = $(buildservicedir)/web
148
149 # ------------------------------------------------------------------------------
150
151 dist_templates_DATA = \
152 src/templates/base.html \
153 src/templates/index.html \
154 src/templates/log.html \
155 src/templates/login.html \
156 src/templates/modal.html \
157 src/templates/search.html
158
159 templatesdir = $(datadir)/templates
160
161 templates_bugsdir = $(templatesdir)/bugs
162
163 dist_templates_bugs_modules_DATA = \
164 src/templates/bugs/modules/list.html
165
166 templates_bugs_modulesdir = $(templates_bugsdir)/modules
167
168 dist_templates_builders_DATA = \
169 src/templates/builders/create.html \
170 src/templates/builders/delete.html \
171 src/templates/builders/edit.html \
172 src/templates/builders/index.html \
173 src/templates/builders/show.html \
174 src/templates/builders/start.html \
175 src/templates/builders/stop.html
176
177 templates_buildersdir = $(templatesdir)/builders
178
179 dist_templates_builders_modules_DATA = \
180 src/templates/builders/modules/stats.html
181
182 templates_builders_modulesdir = $(templates_buildersdir)/modules
183
184 dist_templates_builds_DATA = \
185 src/templates/builds/bug.html \
186 src/templates/builds/bug-created.html \
187 src/templates/builds/clone.html \
188 src/templates/builds/delete.html \
189 src/templates/builds/index.html \
190 src/templates/builds/show.html
191
192 templates_buildsdir = $(templatesdir)/builds
193
194 dist_templates_builds_groups_DATA = \
195 src/templates/builds/groups/show.html
196
197 templates_builds_groupsdir = $(templates_buildsdir)/groups
198
199 dist_templates_builds_groups_modules_DATA = \
200 src/templates/builds/groups/modules/list.html
201
202 templates_builds_groups_modulesdir = $(templates_builds_groupsdir)/modules
203
204 dist_templates_builds_messages_DATA = \
205 src/templates/builds/messages/comment.txt \
206 src/templates/builds/messages/failed.txt \
207 src/templates/builds/messages/finished.txt \
208 src/templates/builds/messages/test-builds-failed.txt
209
210 templates_builds_messagesdir = $(templates_buildsdir)/messages
211
212 dist_templates_builds_modules_DATA = \
213 src/templates/builds/modules/list.html \
214 src/templates/builds/modules/watchers.html
215
216 templates_builds_modulesdir = $(templates_buildsdir)/modules
217
218 dist_templates_builds_repos_DATA = \
219 src/templates/builds/repos/add.html \
220 src/templates/builds/repos/remove.html
221
222 templates_builds_reposdir = $(templates_buildsdir)/repos
223
224 dist_templates_distros_DATA = \
225 src/templates/distros/edit.html \
226 src/templates/distros/index.html \
227 src/templates/distros/show.html
228
229 templates_distrosdir = $(templatesdir)/distros
230
231 dist_templates_distros_modules_DATA = \
232 src/templates/distros/modules/list.html
233
234 templates_distros_modulesdir = $(templates_distrosdir)/modules
235
236 dist_templates_distros_releases_DATA = \
237 src/templates/distros/releases/delete.html \
238 src/templates/distros/releases/edit.html \
239 src/templates/distros/releases/index.html \
240 src/templates/distros/releases/publish.html \
241 src/templates/distros/releases/show.html
242
243 templates_distros_releasesdir = $(templates_distrosdir)/releases
244
245 dist_templates_distros_releases_modules_DATA = \
246 src/templates/distros/releases/modules/list.html
247
248 templates_distros_releases_modulesdir = $(templates_distros_releasesdir)/modules
249
250 dist_templates_monitorings_DATA = \
251 src/templates/monitorings/delete.html \
252 src/templates/monitorings/edit.html \
253 src/templates/monitorings/show.html
254
255 templates_monitoringsdir = $(templatesdir)/monitorings
256
257 dist_templates_monitorings_modules_DATA = \
258 src/templates/monitorings/modules/releases-list.html
259
260 templates_monitorings_modulesdir = $(templates_monitoringsdir)/modules
261
262 dist_templates_errors_DATA = \
263 src/templates/errors/error.html
264
265 templates_errorsdir = $(templatesdir)/errors
266
267 templates_eventsdir = $(templatesdir)/events
268
269 dist_templates_events_modules_DATA = \
270 src/templates/events/modules/list.html \
271 src/templates/events/modules/build-comment.html \
272 src/templates/events/modules/system-message.html \
273 src/templates/events/modules/user-message.html
274
275 templates_events_modulesdir = $(templates_eventsdir)/modules
276
277 dist_templates_jobs_DATA = \
278 src/templates/jobs/abort.html \
279 src/templates/jobs/index.html \
280 src/templates/jobs/log-stream.html \
281 src/templates/jobs/queue.html \
282 src/templates/jobs/retry.html
283
284 templates_jobsdir = $(templatesdir)/jobs
285
286 dist_templates_jobs_messages_DATA = \
287 src/templates/jobs/messages/failed.txt
288
289 templates_jobs_messagesdir = $(templates_jobsdir)/messages
290
291 dist_templates_jobs_modules_DATA = \
292 src/templates/jobs/modules/list.html \
293 src/templates/jobs/modules/log-stream.html \
294 src/templates/jobs/modules/queue.html
295
296 templates_jobs_modulesdir = $(templates_jobsdir)/modules
297
298 templates_messagesdir = $(templatesdir)/messages
299
300 dist_templates_mirrors_DATA = \
301 src/templates/mirrors/delete.html \
302 src/templates/mirrors/edit.html \
303 src/templates/mirrors/index.html \
304 src/templates/mirrors/show.html
305
306 templates_mirrorsdir = $(templatesdir)/mirrors
307
308 dist_templates_mirrors_modules_DATA = \
309 src/templates/mirrors/modules/list.html
310
311 templates_mirrors_modulesdir = $(templates_mirrorsdir)/modules
312
313 dist_templates_modules_DATA = \
314 src/templates/modules/commit-message.html \
315 src/templates/modules/link-to-user.html \
316 src/templates/modules/packages-files-table.html \
317 src/templates/modules/text.html
318
319 templates_modulesdir = $(templatesdir)/modules
320
321 dist_templates_repos_DATA = \
322 src/templates/repos/create-custom.html \
323 src/templates/repos/builds.html \
324 src/templates/repos/delete.html \
325 src/templates/repos/edit.html \
326 src/templates/repos/show.html
327
328 templates_reposdir = $(templatesdir)/repos
329
330 dist_templates_repos_modules_DATA = \
331 src/templates/repos/modules/list.html
332
333 templates_repos_modulesdir = $(templates_reposdir)/modules
334
335 dist_templates_sources_DATA = \
336 src/templates/sources/commit.html \
337 src/templates/sources/show.html
338
339 templates_sourcesdir = $(templatesdir)/sources
340
341 dist_templates_sources_modules_DATA = \
342 src/templates/sources/modules/commits.html \
343 src/templates/sources/modules/list.html
344
345 templates_sources_modulesdir = $(templates_sourcesdir)/modules
346
347 dist_templates_packages_DATA = \
348 src/templates/packages/index.html \
349 src/templates/packages/show.html \
350 src/templates/packages/view-file.html
351
352 templates_packagesdir = $(templatesdir)/packages
353
354 dist_templates_packages_modules_DATA = \
355 src/templates/packages/modules/dependencies.html \
356 src/templates/packages/modules/info.html
357
358 templates_packages_modulesdir = $(templates_packagesdir)/modules
359
360 dist_templates_packages_name_DATA = \
361 src/templates/packages/name/builds.html \
362 src/templates/packages/name/index.html
363
364 templates_packages_namedir = $(templates_packagesdir)/name
365
366 dist_templates_users_DATA = \
367 src/templates/users/delete.html \
368 src/templates/users/edit.html \
369 src/templates/users/index.html \
370 src/templates/users/show.html \
371 src/templates/users/subscribe.html
372
373 templates_usersdir = $(templatesdir)/users
374
375 dist_templates_users_messages_DATA = \
376 src/templates/users/messages/welcome.txt
377
378 templates_users_messagesdir = $(templates_usersdir)/messages
379
380 dist_templates_users_modules_DATA = \
381 src/templates/users/modules/list.html \
382 src/templates/users/modules/push-subscribe-button.html
383
384 templates_users_modulesdir = $(templates_usersdir)/modules
385
386 # ------------------------------------------------------------------------------
387 #
388 dist_static_DATA = \
389 src/static/favicon.ico \
390 src/static/robots.txt
391
392 staticdir = $(datadir)/static
393
394 static_css_DATA = \
395 src/static/css/site.css
396
397 static_cssdir = $(staticdir)/css
398
399 EXTRA_DIST += \
400 src/static/css/_fonts.scss \
401 src/static/css/_icons.scss \
402 src/static/css/site.scss
403
404 CLEANFILES += \
405 src/static/css/site.css
406
407 static_js_DATA = \
408 src/static/js/builders-stats.min.js \
409 src/static/js/jquery.min.js \
410 src/static/js/job-log-stream.min.js \
411 src/static/js/notification-worker.min.js \
412 src/static/js/pbs.min.js \
413 src/static/js/user-push-subscribe-button.min.js
414
415 static_jsdir = $(staticdir)/js
416
417 EXTRA_DIST += \
418 src/static/js/builders-stats.js \
419 src/static/js/job-log-stream.js \
420 src/static/js/notification-worker.js \
421 src/static/js/pbs.js \
422 src/static/js/user-push-subscribe-button.js
423
424 CLEANFILES += \
425 $(static_js_DATA)
426
427 dist_static_fonts_DATA = \
428 src/third-party/fonts/prompt/OFL.txt \
429 src/third-party/fonts/prompt/Prompt-Black.ttf \
430 src/third-party/fonts/prompt/Prompt-BlackItalic.ttf \
431 src/third-party/fonts/prompt/Prompt-Bold.ttf \
432 src/third-party/fonts/prompt/Prompt-BoldItalic.ttf \
433 src/third-party/fonts/prompt/Prompt-ExtraBold.ttf \
434 src/third-party/fonts/prompt/Prompt-ExtraBoldItalic.ttf \
435 src/third-party/fonts/prompt/Prompt-ExtraLight.ttf \
436 src/third-party/fonts/prompt/Prompt-ExtraLightItalic.ttf \
437 src/third-party/fonts/prompt/Prompt-Italic.ttf \
438 src/third-party/fonts/prompt/Prompt-Light.ttf \
439 src/third-party/fonts/prompt/Prompt-LightItalic.ttf \
440 src/third-party/fonts/prompt/Prompt-Medium.ttf \
441 src/third-party/fonts/prompt/Prompt-MediumItalic.ttf \
442 src/third-party/fonts/prompt/Prompt-Regular.ttf \
443 src/third-party/fonts/prompt/Prompt-SemiBold.ttf \
444 src/third-party/fonts/prompt/Prompt-SemiBoldItalic.ttf \
445 src/third-party/fonts/prompt/Prompt-Thin.ttf \
446 src/third-party/fonts/prompt/Prompt-ThinItalic.ttf \
447 src/third-party/Font-Awesome/webfonts/fa-brands-400.ttf \
448 src/third-party/Font-Awesome/webfonts/fa-brands-400.woff2 \
449 src/third-party/Font-Awesome/webfonts/fa-regular-400.ttf \
450 src/third-party/Font-Awesome/webfonts/fa-regular-400.woff2 \
451 src/third-party/Font-Awesome/webfonts/fa-solid-900.ttf \
452 src/third-party/Font-Awesome/webfonts/fa-solid-900.woff2
453
454 static_fontsdir = $(staticdir)/fonts
455
456 # ------------------------------------------------------------------------------
457
458 if HAVE_SYSTEMD
459 systemdsystemunit_DATA = \
460 src/systemd/pakfire-web.service
461
462 CLEANFILES += \
463 $(systemdsystemunit_DATA)
464
465 INSTALL_DIRS += \
466 $(systemdsystemunitdir)
467 endif
468
469 EXTRA_DIST += \
470 src/systemd/pakfire-web.service.in
471
472 dist_database_DATA = \
473 src/database.sql
474
475 databasedir = $(datadir)/database
476
477 dist_cron_DATA = \
478 src/crontab/pakfire-build-service
479
480 EXTRA_DIST += \
481 src/tools/dump-database-schema.sh
482
483 # ------------------------------------------------------------------------------
484
485 substitutions = \
486 '|PACKAGE_NAME=$(PACKAGE_NAME)|' \
487 '|PACKAGE_VERSION=$(PACKAGE_VERSION)|' \
488 '|configsdir=$(configsdir)|' \
489 '|bindir=$(bindir)|' \
490 '|datadir=$(datadir)|' \
491 '|localedir=$(localedir)|' \
492 '|templatesdir=$(templatesdir)|' \
493 '|staticdir=$(staticdir)|'
494
495 SED_PROCESS = \
496 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
497 $(SED) $(subst '|,-e 's|@,$(subst =,\@|,$(subst |',|g',$(substitutions)))) \
498 < $< > $@
499
500 UGLIFYJS_PROCESS = \
501 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
502 $(UGLIFYJS) --compress --mangle -- $< > $@
503
504 %: %.in Makefile
505 $(SED_PROCESS)
506
507 %.css: %.scss
508 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
509 $(SASSC) --style compressed $< > $@
510
511 src/static/css/highlight.css: Makefile
512 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
513 $(PYGMENTIZE) -S xcode -f html -a .highlight > $@
514
515 %.min.js: %.js
516 $(UGLIFYJS_PROCESS)
517
518 # ------------------------------------------------------------------------------
519
520 TESTS = \
521 $(dist_check_SCRIPTS)
522
523 TESTS_ENVIRONMENT = \
524 PYTHONPATH="$(abs_top_srcdir)/src" \
525 abs_top_srcdir="$(abs_top_srcdir)"
526
527 dist_check_SCRIPTS = \
528 tests/setup.py \
529 tests/build.py \
530 tests/builder.py \
531 tests/distro.py \
532 tests/message.py \
533 tests/package.py \
534 tests/repo.py \
535 tests/upload.py
536
537 EXTRA_DIST += \
538 tests/test.py
539
540 EXTRA_DIST += \
541 tests/data/beep-1.3-2.ip3.src.pfm \
542 tests/data/beep-1.3-2.ip3.x86_64.pfm