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