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