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