]> git.ipfire.org Git - pbs.git/blame - Makefile.am
jobs: Update API
[pbs.git] / Makefile.am
CommitLineData
7c17bfff
MT
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
21ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
22AM_MAKEFLAGS = --no-print-directory
23AUTOMAKE_OPTIONS = color-tests
24
25# remove target it the command fails
26.DELETE_ON_ERROR:
27
28# keep itermediate files
29.SECONDARY:
30
31SUBDIRS = . po
32
33pythondir = $(pyexecdir)/pakfire
34
35configsdir = $(sysconfdir)/pakfire
09656f14 36crondir = $(sysconfdir)/cron.d
7c17bfff 37
3e8c8603 38BUILT_SOURCES =
7c17bfff
MT
39CLEANFILES =
40DISTCLEANFILES =
41EXTRA_DIST =
42INSTALL_DIRS =
43noinst_DATA =
44
45@INTLTOOL_POLICY_RULE@
46
47.PHONY: update-po
eb80d9fa 48update-po: po/POTFILES.in
7c17bfff
MT
49 $(MAKE) -C po update-po
50
eb80d9fa
MT
51po/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
7c17bfff
MT
57DISTCHECK_CONFIGURE_FLAGS = \
58 --with-systemdsystemunitdir=$$dc_install_base/$(systemdsystemunitdir)
59
60# ------------------------------------------------------------------------------
61
62AM_V_XSLT = $(AM_V_XSLT_$(V))
63AM_V_XSLT_ = $(AM_V_XSLT_$(AM_DEFAULT_VERBOSITY))
64AM_V_XSLT_0 = @echo " XSLT " $@;
65
66# ------------------------------------------------------------------------------
67
68dist_doc_DATA = \
d3e7a9fb
MT
69 COPYING \
70 README
7c17bfff
MT
71
72# ------------------------------------------------------------------------------
73
74dist_bin_SCRIPTS = \
43025dca 75 src/scripts/pakfire-build-service \
7c17bfff
MT
76 src/scripts/pakfire-web
77
78dist_configs_DATA = \
79 pbs.conf.sample
80
81buildservice_PYTHON = \
455cd7d1
MT
82 src/buildservice/__init__.py \
83 src/buildservice/__version__.py \
316268ce 84 src/buildservice/aws.py \
7c17bfff
MT
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 \
028b2057 90 src/buildservice/config.py \
7c17bfff
MT
91 src/buildservice/constants.py \
92 src/buildservice/database.py \
012035e0 93 src/buildservice/decorators.py \
7c17bfff 94 src/buildservice/distribution.py \
64991f9f 95 src/buildservice/errors.py \
0fb1e800 96 src/buildservice/events.py \
c162004b 97 src/buildservice/httpclient.py \
2a1e9ce2 98 src/buildservice/jobs.py \
7c17bfff 99 src/buildservice/keys.py \
cd142e52 100 src/buildservice/logstreams.py \
7c17bfff
MT
101 src/buildservice/messages.py \
102 src/buildservice/mirrors.py \
103 src/buildservice/misc.py \
104 src/buildservice/packages.py \
4f1cef10 105 src/buildservice/ratelimiter.py \
3d7f0b67 106 src/buildservice/releasemonitoring.py \
7c17bfff 107 src/buildservice/repository.py \
7c17bfff
MT
108 src/buildservice/sessions.py \
109 src/buildservice/settings.py \
110 src/buildservice/sources.py \
7c17bfff
MT
111 src/buildservice/uploads.py \
112 src/buildservice/users.py
113
114buildservicedir = $(pythondir)/buildservice
115
3e8c8603
MT
116BUILT_SOURCES += \
117 src/buildservice/constants.py
118
56cba8c7
MT
119EXTRA_DIST += \
120 src/buildservice/constants.py.in
121
122CLEANFILES += \
123 src/buildservice/constants.py
124
7c17bfff
MT
125web_PYTHON = \
126 src/web/__init__.py \
aa8d5ad3 127 src/web/auth.py \
0919f216 128 src/web/base.py \
df69af71 129 src/web/bugs.py \
eab000f0 130 src/web/builders.py \
98514762 131 src/web/builds.py \
5a1b8431 132 src/web/debuginfo.py \
8111065a 133 src/web/distributions.py \
5cf8c7ea 134 src/web/errors.py \
550e7194 135 src/web/events.py \
7c17bfff 136 src/web/handlers.py \
8f6d6505 137 src/web/jobs.py \
f44a3f0d 138 src/web/mirrors.py \
594b420f 139 src/web/monitorings.py \
e71f1b15 140 src/web/packages.py \
ed83541e 141 src/web/repos.py \
b8b310ec 142 src/web/search.py \
ea0a6063 143 src/web/sources.py \
fd902c1e 144 src/web/ui_modules.py \
f062b044 145 src/web/uploads.py \
156b826e 146 src/web/users.py
7c17bfff
MT
147
148webdir = $(buildservicedir)/web
149
150# ------------------------------------------------------------------------------
151
152dist_templates_DATA = \
7c17bfff 153 src/templates/base.html \
7c17bfff 154 src/templates/index.html \
7c17bfff
MT
155 src/templates/log.html \
156 src/templates/login.html \
9882803a 157 src/templates/modal.html \
d238f240 158 src/templates/search.html
7c17bfff
MT
159
160templatesdir = $(datadir)/templates
161
df69af71
MT
162templates_bugsdir = $(templatesdir)/bugs
163
164dist_templates_bugs_modules_DATA = \
165 src/templates/bugs/modules/list.html
166
167templates_bugs_modulesdir = $(templates_bugsdir)/modules
168
7c17bfff 169dist_templates_builders_DATA = \
1dd7d3a8 170 src/templates/builders/create.html \
7c17bfff 171 src/templates/builders/delete.html \
7c17bfff 172 src/templates/builders/edit.html \
7e5a1249 173 src/templates/builders/index.html \
75a23d24
MT
174 src/templates/builders/show.html \
175 src/templates/builders/start.html \
176 src/templates/builders/stop.html
7c17bfff
MT
177
178templates_buildersdir = $(templatesdir)/builders
179
e04bc130
MT
180dist_templates_builders_modules_DATA = \
181 src/templates/builders/modules/stats.html
182
183templates_builders_modulesdir = $(templates_buildersdir)/modules
184
7c17bfff 185dist_templates_builds_DATA = \
0eecd2b5 186 src/templates/builds/approve.html \
fd44f0a9
MT
187 src/templates/builds/bug.html \
188 src/templates/builds/bug-created.html \
9e2b040d 189 src/templates/builds/clone.html \
93b7ce5f 190 src/templates/builds/delete.html \
75f80d94 191 src/templates/builds/index.html \
f7bc5fb1 192 src/templates/builds/show.html
7c17bfff
MT
193
194templates_buildsdir = $(templatesdir)/builds
195
ccae1b76
MT
196dist_templates_builds_groups_DATA = \
197 src/templates/builds/groups/show.html
198
548cc46a
MT
199templates_builds_groupsdir = $(templates_buildsdir)/groups
200
201dist_templates_builds_groups_modules_DATA = \
202 src/templates/builds/groups/modules/list.html
203
204templates_builds_groups_modulesdir = $(templates_builds_groupsdir)/modules
205
72dae6ea 206dist_templates_builds_messages_DATA = \
9a83e901
MT
207 src/templates/builds/messages/comment.txt \
208 src/templates/builds/messages/failed.txt \
36edcaae
MT
209 src/templates/builds/messages/finished.txt \
210 src/templates/builds/messages/test-builds-failed.txt
72dae6ea
MT
211
212templates_builds_messagesdir = $(templates_buildsdir)/messages
213
79a4d9b2 214dist_templates_builds_modules_DATA = \
d542b33c
MT
215 src/templates/builds/modules/list.html \
216 src/templates/builds/modules/watchers.html
79a4d9b2
MT
217
218templates_builds_modulesdir = $(templates_buildsdir)/modules
219
5ff12a44 220dist_templates_builds_repos_DATA = \
4d27c302
MT
221 src/templates/builds/repos/add.html \
222 src/templates/builds/repos/remove.html
5ff12a44
MT
223
224templates_builds_reposdir = $(templates_buildsdir)/repos
225
5c833b1c 226dist_templates_distros_DATA = \
b5601528 227 src/templates/distros/edit.html \
9342fbce
MT
228 src/templates/distros/index.html \
229 src/templates/distros/show.html
5c833b1c
MT
230
231templates_distrosdir = $(templatesdir)/distros
232
5153597e
MT
233dist_templates_distros_modules_DATA = \
234 src/templates/distros/modules/list.html
235
236templates_distros_modulesdir = $(templates_distrosdir)/modules
237
7e1322ca 238dist_templates_distros_releases_DATA = \
54ff547f 239 src/templates/distros/releases/delete.html \
b270cf73 240 src/templates/distros/releases/edit.html \
7e1322ca 241 src/templates/distros/releases/index.html \
31ff4bff 242 src/templates/distros/releases/publish.html \
7e1322ca
MT
243 src/templates/distros/releases/show.html
244
245templates_distros_releasesdir = $(templates_distrosdir)/releases
246
247dist_templates_distros_releases_modules_DATA = \
248 src/templates/distros/releases/modules/list.html
249
250templates_distros_releases_modulesdir = $(templates_distros_releasesdir)/modules
251
594b420f 252dist_templates_monitorings_DATA = \
91d9818d
MT
253 src/templates/monitorings/delete.html \
254 src/templates/monitorings/edit.html \
594b420f
MT
255 src/templates/monitorings/show.html
256
257templates_monitoringsdir = $(templatesdir)/monitorings
258
259dist_templates_monitorings_modules_DATA = \
260 src/templates/monitorings/modules/releases-list.html
261
262templates_monitorings_modulesdir = $(templates_monitoringsdir)/modules
263
7c17bfff 264dist_templates_errors_DATA = \
7ec8e0d3 265 src/templates/errors/error.html
7c17bfff
MT
266
267templates_errorsdir = $(templatesdir)/errors
268
550e7194
MT
269templates_eventsdir = $(templatesdir)/events
270
271dist_templates_events_modules_DATA = \
272 src/templates/events/modules/list.html \
6f76c9f8 273 src/templates/events/modules/build-comment.html \
550e7194
MT
274 src/templates/events/modules/system-message.html \
275 src/templates/events/modules/user-message.html
276
277templates_events_modulesdir = $(templates_eventsdir)/modules
278
660ef718 279dist_templates_jobs_DATA = \
cd142e52 280 src/templates/jobs/abort.html \
d1f9279a 281 src/templates/jobs/index.html \
f66d485f 282 src/templates/jobs/log-stream.html \
afc9fdf8 283 src/templates/jobs/queue.html \
f66d485f 284 src/templates/jobs/retry.html
660ef718 285
558b95bd
MT
286templates_jobsdir = $(templatesdir)/jobs
287
288dist_templates_jobs_messages_DATA = \
289 src/templates/jobs/messages/failed.txt
290
291templates_jobs_messagesdir = $(templates_jobsdir)/messages
292
1ef8936f 293dist_templates_jobs_modules_DATA = \
cd142e52 294 src/templates/jobs/modules/list.html \
9581d04e
MT
295 src/templates/jobs/modules/log-stream.html \
296 src/templates/jobs/modules/queue.html
1ef8936f
MT
297
298templates_jobs_modulesdir = $(templates_jobsdir)/modules
299
68dd077d
MT
300templates_messagesdir = $(templatesdir)/messages
301
d72a55be
MT
302dist_templates_mirrors_DATA = \
303 src/templates/mirrors/delete.html \
d72a55be 304 src/templates/mirrors/edit.html \
1523bc41
MT
305 src/templates/mirrors/index.html \
306 src/templates/mirrors/show.html
d72a55be
MT
307
308templates_mirrorsdir = $(templatesdir)/mirrors
309
1523bc41
MT
310dist_templates_mirrors_modules_DATA = \
311 src/templates/mirrors/modules/list.html
312
313templates_mirrors_modulesdir = $(templates_mirrorsdir)/modules
314
7c17bfff 315dist_templates_modules_DATA = \
c6e799b4 316 src/templates/modules/commit-message.html \
8dc6f5a4 317 src/templates/modules/link-to-user.html \
7c17bfff 318 src/templates/modules/packages-files-table.html \
dc8a8ee7 319 src/templates/modules/text.html
7c17bfff
MT
320
321templates_modulesdir = $(templatesdir)/modules
322
b32e8958 323dist_templates_repos_DATA = \
98ee6714 324 src/templates/repos/create-custom.html \
b32e8958 325 src/templates/repos/builds.html \
05db2aeb 326 src/templates/repos/delete.html \
0bcebf53 327 src/templates/repos/edit.html \
b32e8958
MT
328 src/templates/repos/show.html
329
ed83541e
MT
330templates_reposdir = $(templatesdir)/repos
331
332dist_templates_repos_modules_DATA = \
333 src/templates/repos/modules/list.html
334
335templates_repos_modulesdir = $(templates_reposdir)/modules
336
ea0a6063 337dist_templates_sources_DATA = \
a9d87299 338 src/templates/sources/commit.html \
ea0a6063
MT
339 src/templates/sources/show.html
340
341templates_sourcesdir = $(templatesdir)/sources
342
343dist_templates_sources_modules_DATA = \
9826b58c 344 src/templates/sources/modules/commits.html \
ea0a6063
MT
345 src/templates/sources/modules/list.html
346
347templates_sources_modulesdir = $(templates_sourcesdir)/modules
348
7c17bfff 349dist_templates_packages_DATA = \
b5800237 350 src/templates/packages/index.html \
d9f76034 351 src/templates/packages/show.html \
7c17bfff
MT
352 src/templates/packages/view-file.html
353
354templates_packagesdir = $(templatesdir)/packages
355
d9f76034 356dist_templates_packages_modules_DATA = \
66a6e7db 357 src/templates/packages/modules/dependencies.html \
d9f76034
MT
358 src/templates/packages/modules/info.html
359
360templates_packages_modulesdir = $(templates_packagesdir)/modules
361
0e794d55 362dist_templates_packages_name_DATA = \
a3e946d8 363 src/templates/packages/name/builds.html \
0e794d55
MT
364 src/templates/packages/name/index.html
365
366templates_packages_namedir = $(templates_packagesdir)/name
367
5fc0715d 368dist_templates_users_DATA = \
6c41a6f6 369 src/templates/users/delete.html \
631ca6d8 370 src/templates/users/edit.html \
57718fd9 371 src/templates/users/index.html \
d48f75f7
MT
372 src/templates/users/show.html \
373 src/templates/users/subscribe.html
5fc0715d
MT
374
375templates_usersdir = $(templatesdir)/users
376
18132fad
MT
377dist_templates_users_messages_DATA = \
378 src/templates/users/messages/welcome.txt
379
380templates_users_messagesdir = $(templates_usersdir)/messages
381
57718fd9 382dist_templates_users_modules_DATA = \
d48f75f7
MT
383 src/templates/users/modules/list.html \
384 src/templates/users/modules/push-subscribe-button.html
57718fd9
MT
385
386templates_users_modulesdir = $(templates_usersdir)/modules
387
7c17bfff
MT
388# ------------------------------------------------------------------------------
389#
390dist_static_DATA = \
391 src/static/favicon.ico \
392 src/static/robots.txt
393
394staticdir = $(datadir)/static
395
ee08328e
MT
396static_css_DATA = \
397 src/static/css/site.css
7c17bfff
MT
398
399static_cssdir = $(staticdir)/css
400
ee08328e
MT
401EXTRA_DIST += \
402 src/static/css/_fonts.scss \
85cd4dbd 403 src/static/css/_icons.scss \
ee08328e
MT
404 src/static/css/site.scss
405
406CLEANFILES += \
407 src/static/css/site.css
408
ee08328e 409static_js_DATA = \
e04bc130 410 src/static/js/builders-stats.min.js \
c85a832d 411 src/static/js/jquery.min.js \
cd142e52 412 src/static/js/job-log-stream.min.js \
d48f75f7
MT
413 src/static/js/notification-worker.min.js \
414 src/static/js/pbs.min.js \
415 src/static/js/user-push-subscribe-button.min.js
7c17bfff
MT
416
417static_jsdir = $(staticdir)/js
418
cd142e52 419EXTRA_DIST += \
e04bc130 420 src/static/js/builders-stats.js \
79d42c5d 421 src/static/js/job-log-stream.js \
d48f75f7
MT
422 src/static/js/notification-worker.js \
423 src/static/js/pbs.js \
424 src/static/js/user-push-subscribe-button.js
cd142e52 425
ee08328e 426CLEANFILES += \
79d42c5d 427 $(static_js_DATA)
ee08328e 428
0d995d8d
MT
429dist_static_fonts_DATA = \
430 src/third-party/fonts/prompt/OFL.txt \
431 src/third-party/fonts/prompt/Prompt-Black.ttf \
432 src/third-party/fonts/prompt/Prompt-BlackItalic.ttf \
433 src/third-party/fonts/prompt/Prompt-Bold.ttf \
434 src/third-party/fonts/prompt/Prompt-BoldItalic.ttf \
435 src/third-party/fonts/prompt/Prompt-ExtraBold.ttf \
436 src/third-party/fonts/prompt/Prompt-ExtraBoldItalic.ttf \
437 src/third-party/fonts/prompt/Prompt-ExtraLight.ttf \
438 src/third-party/fonts/prompt/Prompt-ExtraLightItalic.ttf \
439 src/third-party/fonts/prompt/Prompt-Italic.ttf \
440 src/third-party/fonts/prompt/Prompt-Light.ttf \
441 src/third-party/fonts/prompt/Prompt-LightItalic.ttf \
442 src/third-party/fonts/prompt/Prompt-Medium.ttf \
443 src/third-party/fonts/prompt/Prompt-MediumItalic.ttf \
444 src/third-party/fonts/prompt/Prompt-Regular.ttf \
445 src/third-party/fonts/prompt/Prompt-SemiBold.ttf \
446 src/third-party/fonts/prompt/Prompt-SemiBoldItalic.ttf \
447 src/third-party/fonts/prompt/Prompt-Thin.ttf \
85cd4dbd
MT
448 src/third-party/fonts/prompt/Prompt-ThinItalic.ttf \
449 src/third-party/Font-Awesome/webfonts/fa-brands-400.ttf \
450 src/third-party/Font-Awesome/webfonts/fa-brands-400.woff2 \
451 src/third-party/Font-Awesome/webfonts/fa-regular-400.ttf \
452 src/third-party/Font-Awesome/webfonts/fa-regular-400.woff2 \
453 src/third-party/Font-Awesome/webfonts/fa-solid-900.ttf \
454 src/third-party/Font-Awesome/webfonts/fa-solid-900.woff2
0d995d8d
MT
455
456static_fontsdir = $(staticdir)/fonts
457
7c17bfff
MT
458# ------------------------------------------------------------------------------
459
460if HAVE_SYSTEMD
461systemdsystemunit_DATA = \
2105299c 462 src/systemd/pakfire-web.service
7c17bfff
MT
463
464CLEANFILES += \
465 $(systemdsystemunit_DATA)
466
467INSTALL_DIRS += \
468 $(systemdsystemunitdir)
469endif
470
471EXTRA_DIST += \
2105299c 472 src/systemd/pakfire-web.service.in
7c17bfff
MT
473
474dist_database_DATA = \
475 src/database.sql
476
477databasedir = $(datadir)/database
478
09656f14 479dist_cron_DATA = \
7c17bfff
MT
480 src/crontab/pakfire-build-service
481
d3e7a9fb 482EXTRA_DIST += \
0d897466 483 src/tools/dump-database-schema.sh
d3e7a9fb 484
7c17bfff
MT
485# ------------------------------------------------------------------------------
486
487substitutions = \
488 '|PACKAGE_NAME=$(PACKAGE_NAME)|' \
489 '|PACKAGE_VERSION=$(PACKAGE_VERSION)|' \
490 '|configsdir=$(configsdir)|' \
56cba8c7 491 '|bindir=$(bindir)|' \
2b5a3b4d 492 '|datadir=$(datadir)|' \
027a662e
MT
493 '|localedir=$(localedir)|' \
494 '|templatesdir=$(templatesdir)|' \
495 '|staticdir=$(staticdir)|'
7c17bfff
MT
496
497SED_PROCESS = \
498 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
499 $(SED) $(subst '|,-e 's|@,$(subst =,\@|,$(subst |',|g',$(substitutions)))) \
500 < $< > $@
501
73eadbe5
MT
502UGLIFYJS_PROCESS = \
503 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
504 $(UGLIFYJS) --compress --mangle -- $< > $@
505
7c17bfff
MT
506%: %.in Makefile
507 $(SED_PROCESS)
73eadbe5
MT
508
509%.css: %.scss
510 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
511 $(SASSC) --style compressed $< > $@
512
a2c89f4c
MT
513src/static/css/highlight.css: Makefile
514 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
515 $(PYGMENTIZE) -S xcode -f html -a .highlight > $@
516
73eadbe5
MT
517%.min.js: %.js
518 $(UGLIFYJS_PROCESS)
ee08328e 519
67704209
MT
520# ------------------------------------------------------------------------------
521
522TESTS = \
523 $(dist_check_SCRIPTS)
524
525TESTS_ENVIRONMENT = \
526 PYTHONPATH="$(abs_top_srcdir)/src" \
527 abs_top_srcdir="$(abs_top_srcdir)"
528
529dist_check_SCRIPTS = \
f9a38dd2 530 tests/setup.py \
01de82e0 531 tests/build.py \
890486ab 532 tests/builder.py \
5ac581c0 533 tests/distro.py \
18132fad 534 tests/message.py \
4a5f100f 535 tests/package.py \
559967f7
MT
536 tests/repo.py \
537 tests/upload.py
67704209
MT
538
539EXTRA_DIST += \
540 tests/test.py
a9388064
MT
541
542EXTRA_DIST += \
7840cb39 543 tests/data/beep-1.3-2.ip3.src.pfm \
a9388064 544 tests/data/beep-1.3-2.ip3.x86_64.pfm