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