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