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