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