]> git.ipfire.org Git - pbs.git/blob - Makefile.am
builds: Unify failure/finished methods
[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-hub \
77 src/scripts/pakfire-web
78
79 dist_configs_DATA = \
80 pbs.conf.sample
81
82 buildservice_PYTHON = \
83 src/buildservice/__init__.py \
84 src/buildservice/__version__.py \
85 src/buildservice/aws.py \
86 src/buildservice/base.py \
87 src/buildservice/bugtracker.py \
88 src/buildservice/builders.py \
89 src/buildservice/builds.py \
90 src/buildservice/cache.py \
91 src/buildservice/config.py \
92 src/buildservice/constants.py \
93 src/buildservice/database.py \
94 src/buildservice/decorators.py \
95 src/buildservice/distribution.py \
96 src/buildservice/events.py \
97 src/buildservice/git.py \
98 src/buildservice/jobqueue.py \
99 src/buildservice/jobs.py \
100 src/buildservice/keys.py \
101 src/buildservice/ldap.py \
102 src/buildservice/messages.py \
103 src/buildservice/mirrors.py \
104 src/buildservice/misc.py \
105 src/buildservice/packages.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 hub_PYTHON = \
125 src/hub/__init__.py \
126 src/hub/builds.py \
127 src/hub/handlers.py \
128 src/hub/jobs.py \
129 src/hub/queue.py \
130 src/hub/uploads.py
131
132 hubdir = $(buildservicedir)/hub
133
134 web_PYTHON = \
135 src/web/__init__.py \
136 src/web/auth.py \
137 src/web/base.py \
138 src/web/bugs.py \
139 src/web/builders.py \
140 src/web/builds.py \
141 src/web/distributions.py \
142 src/web/errors.py \
143 src/web/events.py \
144 src/web/handlers.py \
145 src/web/jobs.py \
146 src/web/keys.py \
147 src/web/mirrors.py \
148 src/web/packages.py \
149 src/web/repos.py \
150 src/web/search.py \
151 src/web/ui_modules.py \
152 src/web/users.py
153
154 webdir = $(buildservicedir)/web
155
156 # ------------------------------------------------------------------------------
157
158 dist_templates_DATA = \
159 src/templates/base.html \
160 src/templates/build-delete.html \
161 src/templates/build-manage.html \
162 src/templates/build-schedule-test.html \
163 src/templates/build-state.html \
164 src/templates/builds-watchers-add.html \
165 src/templates/builds-watchers-list.html \
166 src/templates/distro-edit.html \
167 src/templates/distro-source-commit-detail.html \
168 src/templates/distro-source-commit-reset.html \
169 src/templates/distro-source-commits.html \
170 src/templates/distro-source-detail.html \
171 src/templates/distro-update-detail.html \
172 src/templates/distro-update-edit.html \
173 src/templates/file-detail.html \
174 src/templates/index.html \
175 src/templates/jobs-abort.html \
176 src/templates/jobs-buildroot.html \
177 src/templates/log.html \
178 src/templates/login.html \
179 src/templates/package-properties.html \
180 src/templates/queue.html \
181 src/templates/search.html \
182 src/templates/source-list.html
183
184 templatesdir = $(datadir)/templates
185
186 templates_bugsdir = $(templatesdir)/bugs
187
188 dist_templates_bugs_modules_DATA = \
189 src/templates/bugs/modules/list.html
190
191 templates_bugs_modulesdir = $(templates_bugsdir)/modules
192
193 dist_templates_builders_DATA = \
194 src/templates/builders/delete.html \
195 src/templates/builders/detail.html \
196 src/templates/builders/edit.html \
197 src/templates/builders/list.html \
198 src/templates/builders/new.html
199
200 templates_buildersdir = $(templatesdir)/builders
201
202 dist_templates_builds_DATA = \
203 src/templates/builds/index.html \
204 src/templates/builds/show.html
205
206 templates_buildsdir = $(templatesdir)/builds
207
208 dist_templates_builds_messages_DATA = \
209 src/templates/builds/messages/comment.txt \
210 src/templates/builds/messages/failed.txt \
211 src/templates/builds/messages/finished.txt
212
213 templates_builds_messagesdir = $(templates_buildsdir)/messages
214
215 dist_templates_builds_modules_DATA = \
216 src/templates/builds/modules/list.html
217
218 templates_builds_modulesdir = $(templates_buildsdir)/modules
219
220 dist_templates_distros_DATA = \
221 src/templates/distros/index.html \
222 src/templates/distros/show.html
223
224 templates_distrosdir = $(templatesdir)/distros
225
226 dist_templates_errors_DATA = \
227 src/templates/errors/error.html \
228 src/templates/errors/error-400.html \
229 src/templates/errors/error-403.html \
230 src/templates/errors/error-404.html
231
232 templates_errorsdir = $(templatesdir)/errors
233
234 templates_eventsdir = $(templatesdir)/events
235
236 dist_templates_events_modules_DATA = \
237 src/templates/events/modules/list.html \
238 src/templates/events/modules/build-comment.html \
239 src/templates/events/modules/system-message.html \
240 src/templates/events/modules/user-message.html
241
242 templates_events_modulesdir = $(templates_eventsdir)/modules
243
244 templates_jobsdir = $(templatesdir)/jobs
245
246 dist_templates_jobs_messages_DATA = \
247 src/templates/jobs/messages/failed.txt
248
249 templates_jobs_messagesdir = $(templates_jobsdir)/messages
250
251 templates_messagesdir = $(templatesdir)/messages
252
253 dist_templates_messages_users_DATA = \
254 src/templates/messages/users/email-activation.markdown
255
256 templates_messages_usersdir = $(templates_messagesdir)/users
257
258 dist_templates_mirrors_DATA = \
259 src/templates/mirrors/delete.html \
260 src/templates/mirrors/detail.html \
261 src/templates/mirrors/edit.html \
262 src/templates/mirrors/list.html \
263 src/templates/mirrors/new.html
264
265 templates_mirrorsdir = $(templatesdir)/mirrors
266
267 dist_templates_modules_DATA = \
268 src/templates/modules/build-headline.html \
269 src/templates/modules/build-offset.html \
270 src/templates/modules/build-state-warnings.html \
271 src/templates/modules/build-table.html \
272 src/templates/modules/commits-table.html \
273 src/templates/modules/commit-message.html \
274 src/templates/modules/files-table.html \
275 src/templates/modules/link-to-user.html \
276 src/templates/modules/log-files-table.html \
277 src/templates/modules/modal-base.html \
278 src/templates/modules/modal-build-comment.html \
279 src/templates/modules/modal-build-push.html \
280 src/templates/modules/modal-build-unpush.html \
281 src/templates/modules/packages-files-table.html \
282 src/templates/modules/source-table.html \
283 src/templates/modules/text.html
284
285 templates_modulesdir = $(templatesdir)/modules
286
287 dist_templates_modules_jobs_DATA = \
288 src/templates/modules/jobs/list.html \
289 src/templates/modules/jobs/status.html
290
291 templates_modules_jobsdir = $(templates_modulesdir)/jobs
292
293 dist_templates_modules_select_DATA = \
294 src/templates/modules/select/locale.html \
295 src/templates/modules/select/timezone.html
296
297 templates_modules_selectdir = $(templates_modulesdir)/select
298
299 dist_templates_repos_DATA = \
300 src/templates/repos/create-custom.html \
301 src/templates/repos/builds.html \
302 src/templates/repos/edit.html \
303 src/templates/repos/show.html
304
305 templates_reposdir = $(templatesdir)/repos
306
307 dist_templates_repos_modules_DATA = \
308 src/templates/repos/modules/list.html
309
310 templates_repos_modulesdir = $(templates_reposdir)/modules
311
312 dist_templates_packages_DATA = \
313 src/templates/packages/index.html \
314 src/templates/packages/name.html \
315 src/templates/packages/show.html \
316 src/templates/packages/view-file.html
317
318 templates_packagesdir = $(templatesdir)/packages
319
320 dist_templates_packages_modules_DATA = \
321 src/templates/packages/modules/dependencies.html \
322 src/templates/packages/modules/info.html
323
324 templates_packages_modulesdir = $(templates_packagesdir)/modules
325
326 dist_templates_users_DATA = \
327 src/templates/users/delete.html \
328 src/templates/users/edit.html \
329 src/templates/users/index.html \
330 src/templates/users/show.html
331
332 templates_usersdir = $(templatesdir)/users
333
334 dist_templates_users_modules_DATA = \
335 src/templates/users/modules/list.html
336
337 templates_users_modulesdir = $(templates_usersdir)/modules
338
339 # ------------------------------------------------------------------------------
340 #
341 dist_static_DATA = \
342 src/static/favicon.ico \
343 src/static/robots.txt
344
345 staticdir = $(datadir)/static
346
347 static_css_DATA = \
348 src/static/css/highlight.css \
349 src/static/css/site.css
350
351 static_cssdir = $(staticdir)/css
352
353 EXTRA_DIST += \
354 src/static/css/_fonts.scss \
355 src/static/css/_icons.scss \
356 src/static/css/site.scss
357
358 CLEANFILES += \
359 src/static/css/site.css
360
361 static_js_DATA = \
362 src/static/js/foundation.min.js \
363 src/static/js/jquery.min.js \
364 src/static/js/pbs.js \
365 src/static/js/prettify.js
366
367 static_jsdir = $(staticdir)/js
368
369 CLEANFILES += \
370 src/static/js/foundation.min.js \
371 src/static/js/jquery.min.js
372
373 dist_static_fonts_DATA = \
374 src/third-party/fonts/prompt/OFL.txt \
375 src/third-party/fonts/prompt/Prompt-Black.ttf \
376 src/third-party/fonts/prompt/Prompt-BlackItalic.ttf \
377 src/third-party/fonts/prompt/Prompt-Bold.ttf \
378 src/third-party/fonts/prompt/Prompt-BoldItalic.ttf \
379 src/third-party/fonts/prompt/Prompt-ExtraBold.ttf \
380 src/third-party/fonts/prompt/Prompt-ExtraBoldItalic.ttf \
381 src/third-party/fonts/prompt/Prompt-ExtraLight.ttf \
382 src/third-party/fonts/prompt/Prompt-ExtraLightItalic.ttf \
383 src/third-party/fonts/prompt/Prompt-Italic.ttf \
384 src/third-party/fonts/prompt/Prompt-Light.ttf \
385 src/third-party/fonts/prompt/Prompt-LightItalic.ttf \
386 src/third-party/fonts/prompt/Prompt-Medium.ttf \
387 src/third-party/fonts/prompt/Prompt-MediumItalic.ttf \
388 src/third-party/fonts/prompt/Prompt-Regular.ttf \
389 src/third-party/fonts/prompt/Prompt-SemiBold.ttf \
390 src/third-party/fonts/prompt/Prompt-SemiBoldItalic.ttf \
391 src/third-party/fonts/prompt/Prompt-Thin.ttf \
392 src/third-party/fonts/prompt/Prompt-ThinItalic.ttf \
393 src/third-party/Font-Awesome/webfonts/fa-brands-400.ttf \
394 src/third-party/Font-Awesome/webfonts/fa-brands-400.woff2 \
395 src/third-party/Font-Awesome/webfonts/fa-regular-400.ttf \
396 src/third-party/Font-Awesome/webfonts/fa-regular-400.woff2 \
397 src/third-party/Font-Awesome/webfonts/fa-solid-900.ttf \
398 src/third-party/Font-Awesome/webfonts/fa-solid-900.woff2
399
400 static_fontsdir = $(staticdir)/fonts
401
402 # ------------------------------------------------------------------------------
403
404 if HAVE_SYSTEMD
405 systemdsystemunit_DATA = \
406 src/systemd/pakfire-hub.service \
407 src/systemd/pakfire-web.service
408
409 CLEANFILES += \
410 $(systemdsystemunit_DATA)
411
412 INSTALL_DIRS += \
413 $(systemdsystemunitdir)
414 endif
415
416 EXTRA_DIST += \
417 src/systemd/pakfire-hub.service.in \
418 src/systemd/pakfire-web.service.in
419
420 dist_database_DATA = \
421 src/database.sql
422
423 databasedir = $(datadir)/database
424
425 dist_cron_DATA = \
426 src/crontab/pakfire-build-service
427
428 EXTRA_DIST += \
429 src/tools/dump-database-schema.sh
430
431 # ------------------------------------------------------------------------------
432
433 substitutions = \
434 '|PACKAGE_NAME=$(PACKAGE_NAME)|' \
435 '|PACKAGE_VERSION=$(PACKAGE_VERSION)|' \
436 '|configsdir=$(configsdir)|' \
437 '|bindir=$(bindir)|' \
438 '|datadir=$(datadir)|' \
439 '|localedir=$(localedir)|' \
440 '|templatesdir=$(templatesdir)|' \
441 '|staticdir=$(staticdir)|'
442
443 SED_PROCESS = \
444 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
445 $(SED) $(subst '|,-e 's|@,$(subst =,\@|,$(subst |',|g',$(substitutions)))) \
446 < $< > $@
447
448 UGLIFYJS_PROCESS = \
449 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
450 $(UGLIFYJS) --compress --mangle -- $< > $@
451
452 %: %.in Makefile
453 $(SED_PROCESS)
454
455 %.css: %.scss
456 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
457 $(SASSC) --style compressed $< > $@
458
459 src/static/css/highlight.css: Makefile
460 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
461 $(PYGMENTIZE) -S xcode -f html -a .highlight > $@
462
463 %.min.js: %.js
464 $(UGLIFYJS_PROCESS)
465
466 src/static/js/foundation.min.js: src/third-party/foundation-sites/dist/js/foundation.js
467 $(UGLIFYJS_PROCESS)
468
469 # ------------------------------------------------------------------------------
470
471 TESTS = \
472 $(dist_check_SCRIPTS)
473
474 TESTS_ENVIRONMENT = \
475 PYTHONPATH="$(abs_top_srcdir)/src" \
476 abs_top_srcdir="$(abs_top_srcdir)"
477
478 dist_check_SCRIPTS = \
479 tests/setup.py \
480 tests/build.py \
481 tests/builder.py \
482 tests/distro.py \
483 tests/package.py \
484 tests/repo.py \
485 tests/upload.py
486
487 EXTRA_DIST += \
488 tests/test.py
489
490 EXTRA_DIST += \
491 tests/data/beep-1.3-2.ip3.src.pfm \
492 tests/data/beep-1.3-2.ip3.x86_64.pfm