]> git.ipfire.org Git - people/jschlag/pbs.git/blob - Makefile.am
Refactor jobs
[people/jschlag/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
37 BUILT_SOURCES =
38 CLEANFILES =
39 DISTCLEANFILES =
40 EXTRA_DIST =
41 INSTALL_DIRS =
42 noinst_DATA =
43
44 @INTLTOOL_POLICY_RULE@
45
46 .PHONY: update-po
47 update-po:
48 $(MAKE) -C po update-po
49
50 DISTCHECK_CONFIGURE_FLAGS = \
51 --with-systemdsystemunitdir=$$dc_install_base/$(systemdsystemunitdir)
52
53 # ------------------------------------------------------------------------------
54
55 AM_V_XSLT = $(AM_V_XSLT_$(V))
56 AM_V_XSLT_ = $(AM_V_XSLT_$(AM_DEFAULT_VERBOSITY))
57 AM_V_XSLT_0 = @echo " XSLT " $@;
58
59 # ------------------------------------------------------------------------------
60
61 dist_doc_DATA = \
62 COPYING \
63 README
64
65 # ------------------------------------------------------------------------------
66
67 dist_bin_SCRIPTS = \
68 src/scripts/pakfire-build-service \
69 src/scripts/pakfire-hub \
70 src/scripts/pakfire-manager \
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/arches.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/constants.py \
86 src/buildservice/database.py \
87 src/buildservice/decorators.py \
88 src/buildservice/distribution.py \
89 src/buildservice/geoip.py \
90 src/buildservice/git.py \
91 src/buildservice/jobqueue.py \
92 src/buildservice/keys.py \
93 src/buildservice/logs.py \
94 src/buildservice/messages.py \
95 src/buildservice/mirrors.py \
96 src/buildservice/misc.py \
97 src/buildservice/packages.py \
98 src/buildservice/repository.py \
99 src/buildservice/scheduler.py \
100 src/buildservice/sessions.py \
101 src/buildservice/settings.py \
102 src/buildservice/sources.py \
103 src/buildservice/updates.py \
104 src/buildservice/uploads.py \
105 src/buildservice/users.py
106
107 buildservicedir = $(pythondir)/buildservice
108
109 BUILT_SOURCES += \
110 src/buildservice/constants.py
111
112 EXTRA_DIST += \
113 src/buildservice/constants.py.in
114
115 CLEANFILES += \
116 src/buildservice/constants.py
117
118 hub_PYTHON = \
119 src/hub/__init__.py \
120 src/hub/handlers.py
121
122 hubdir = $(buildservicedir)/hub
123
124 manager_PYTHON = \
125 src/manager/__init__.py \
126 src/manager/base.py \
127 src/manager/builds.py \
128 src/manager/repositories.py
129
130 managerdir = $(buildservicedir)/manager
131
132 web_PYTHON = \
133 src/web/__init__.py \
134 src/web/handlers.py \
135 src/web/handlers_api.py \
136 src/web/handlers_auth.py \
137 src/web/handlers_base.py \
138 src/web/handlers_builders.py \
139 src/web/handlers_builds.py \
140 src/web/handlers_distro.py \
141 src/web/handlers_jobs.py \
142 src/web/handlers_keys.py \
143 src/web/handlers_mirrors.py \
144 src/web/handlers_packages.py \
145 src/web/handlers_search.py \
146 src/web/handlers_updates.py \
147 src/web/handlers_users.py \
148 src/web/ui_modules.py
149
150 webdir = $(buildservicedir)/web
151
152 # ------------------------------------------------------------------------------
153
154 dist_templates_DATA = \
155 src/templates/base-form1.html \
156 src/templates/base-form2.html \
157 src/templates/base.html \
158 src/templates/build-bugs.html \
159 src/templates/build-delete.html \
160 src/templates/build-detail.html \
161 src/templates/build-filter.html \
162 src/templates/build-index.html \
163 src/templates/build-list.html \
164 src/templates/build-manage.html \
165 src/templates/build-priority.html \
166 src/templates/build-queue.html \
167 src/templates/build-schedule-test.html \
168 src/templates/build-state.html \
169 src/templates/builds-watchers-add.html \
170 src/templates/builds-watchers-list.html \
171 src/templates/distro-detail.html \
172 src/templates/distro-edit.html \
173 src/templates/distro-list.html \
174 src/templates/distro-source-commit-detail.html \
175 src/templates/distro-source-commit-reset.html \
176 src/templates/distro-source-commits.html \
177 src/templates/distro-source-detail.html \
178 src/templates/distro-update-detail.html \
179 src/templates/distro-update-edit.html \
180 src/templates/docs-base.html \
181 src/templates/docs-build.html \
182 src/templates/docs-index.html \
183 src/templates/docs-users.html \
184 src/templates/docs-whatsthis.html \
185 src/templates/file-detail.html \
186 src/templates/index.html \
187 src/templates/jobs-abort.html \
188 src/templates/jobs-buildroot.html \
189 src/templates/job-schedule-rebuild.html \
190 src/templates/job-schedule-test.html \
191 src/templates/jobs-detail.html \
192 src/templates/jobs-filter.html \
193 src/templates/jobs-index.html \
194 src/templates/keys-delete.html \
195 src/templates/keys-import.html \
196 src/templates/keys-list.html \
197 src/templates/log.html \
198 src/templates/login.html \
199 src/templates/mirrors-delete.html \
200 src/templates/mirrors-detail.html \
201 src/templates/mirrors-edit.html \
202 src/templates/mirrors-list.html \
203 src/templates/mirrors-new.html \
204 src/templates/package-detail.html \
205 src/templates/package-detail-list.html \
206 src/templates/package-properties.html \
207 src/templates/packages-list.html \
208 src/templates/register-activation-fail.html \
209 src/templates/register-activation-success.html \
210 src/templates/register-fail.html \
211 src/templates/register.html \
212 src/templates/register-success.html \
213 src/templates/repository-detail.html \
214 src/templates/repository-edit.html \
215 src/templates/search-form.html \
216 src/templates/search-results.html \
217 src/templates/source-list.html \
218 src/templates/updates-index.html \
219 src/templates/uploads-list.html \
220 src/templates/user-comments.html \
221 src/templates/user-delete.html \
222 src/templates/user-forgot-password.html \
223 src/templates/user-impersonation.html \
224 src/templates/user-list.html \
225 src/templates/user-profile-builds.html \
226 src/templates/user-profile-edit-fail.html \
227 src/templates/user-profile-edit.html \
228 src/templates/user-profile.html \
229 src/templates/user-profile-need-activation.html \
230 src/templates/user-profile-passwd.html \
231 src/templates/user-profile-passwd-ok.html
232
233 templatesdir = $(datadir)/templates
234
235 dist_templates_builders_DATA = \
236 src/templates/builders/delete.html \
237 src/templates/builders/detail.html \
238 src/templates/builders/edit.html \
239 src/templates/builders/list.html \
240 src/templates/builders/new.html \
241 src/templates/builders/pass.html
242
243 templates_buildersdir = $(templatesdir)/builders
244
245 dist_templates_builds_DATA = \
246 src/templates/builds/comments.html
247
248 templates_buildsdir = $(templatesdir)/builds
249
250 dist_templates_errors_DATA = \
251 src/templates/errors/error.html \
252 src/templates/errors/error-400.html \
253 src/templates/errors/error-403.html \
254 src/templates/errors/error-404.html
255
256 templates_errorsdir = $(templatesdir)/errors
257
258 dist_templates_modules_DATA = \
259 src/templates/modules/bugs-table.html \
260 src/templates/modules/build-headline.html \
261 src/templates/modules/build-log.html \
262 src/templates/modules/build-offset.html \
263 src/templates/modules/build-state-warnings.html \
264 src/templates/modules/build-table.html \
265 src/templates/modules/comments-table.html \
266 src/templates/modules/commits-table.html \
267 src/templates/modules/files-table.html \
268 src/templates/modules/footer.html \
269 src/templates/modules/jobs-table.html \
270 src/templates/modules/log-entry-comment.html \
271 src/templates/modules/log-entry.html \
272 src/templates/modules/log-entry-small.html \
273 src/templates/modules/log-files-table.html \
274 src/templates/modules/log.html \
275 src/templates/modules/log-table.html \
276 src/templates/modules/maintainer.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/package-header.html \
282 src/templates/modules/packages-files-table.html \
283 src/templates/modules/packages-table.html \
284 src/templates/modules/package-table-detail.html \
285 src/templates/modules/repo-actions-table.html \
286 src/templates/modules/repository-table.html \
287 src/templates/modules/source-table.html \
288 src/templates/modules/updates-table.html \
289 src/templates/modules/user-table.html \
290 src/templates/modules/watchers-sidebar-table.html
291
292 templates_modulesdir = $(templatesdir)/modules
293
294 dist_templates_modules_builders_DATA = \
295 src/templates/modules/builders/load.html
296
297 templates_modules_buildersdir = $(templates_modulesdir)/builders
298
299 dist_templates_modules_changelog_DATA = \
300 src/templates/modules/changelog/entry.html \
301 src/templates/modules/changelog/index.html
302
303 templates_modules_changelogdir = $(templates_modulesdir)/changelog
304
305 dist_templates_modules_jobs_DATA = \
306 src/templates/modules/jobs/boxes.html \
307 src/templates/modules/jobs/list.html \
308 src/templates/modules/jobs/status.html
309
310 templates_modules_jobsdir = $(templates_modulesdir)/jobs
311
312 dist_templates_modules_packages_DATA = \
313 src/templates/modules/packages/dependency-table.html
314
315 templates_modules_packagesdir = $(templates_modulesdir)/packages
316
317 dist_templates_modules_select_DATA = \
318 src/templates/modules/select/locale.html \
319 src/templates/modules/select/timezone.html
320
321 templates_modules_selectdir = $(templates_modulesdir)/select
322
323 dist_templates_packages_DATA = \
324 src/templates/packages/changelog.html \
325 src/templates/packages/view-file.html
326
327 templates_packagesdir = $(templatesdir)/packages
328
329 dist_templates_packages_builds_DATA = \
330 src/templates/packages/builds/scratch.html \
331 src/templates/packages/builds/times.html
332
333 templates_packages_buildsdir = $(templates_packagesdir)/builds
334
335 dist_templates_sessions_DATA = \
336 src/templates/sessions/index.html
337
338 templates_sessionsdir = $(templatesdir)/sessions
339
340 dist_templates_statistics_DATA = \
341 src/templates/statistics/index.html
342
343 templates_statisticsdir = $(templatesdir)/statistics
344
345 # ------------------------------------------------------------------------------
346 #
347 dist_static_DATA = \
348 src/static/favicon.ico \
349 src/static/robots.txt
350
351 staticdir = $(datadir)/static
352
353 dist_static_css_DATA = \
354 src/static/css/bootstrap-responsive.min.css \
355 src/static/css/bootstrap.min.css \
356 src/static/css/build-table.css \
357 src/static/css/commits-table.css \
358 src/static/css/font-awesome.css \
359 src/static/css/jobs-list.css \
360 src/static/css/jobs-table.css \
361 src/static/css/log.css \
362 src/static/css/packages-files-table.css \
363 src/static/css/packages-table.css \
364 src/static/css/prettify.css \
365 src/static/css/style.css \
366 src/static/css/watchers-sidebar-table.css
367
368 static_cssdir = $(staticdir)/css
369
370 dist_static_font_DATA = \
371 src/static/font/fontawesome-webfont.eot \
372 src/static/font/fontawesome-webfont.svg \
373 src/static/font/fontawesome-webfont.ttf \
374 src/static/font/fontawesome-webfont.woff
375
376 static_fontdir = $(staticdir)/font
377
378 dist_static_images_DATA = \
379 src/static/images/icons/build-dependency_error.png \
380 src/static/images/icons/build-dispatching.png \
381 src/static/images/icons/build-failed.png \
382 src/static/images/icons/build-finished.png \
383 src/static/images/icons/build-pending.png \
384 src/static/images/icons/build-running.png \
385 src/static/images/icons/build-unknown.png \
386 src/static/images/icons/build-uploading.png \
387 src/static/images/icons/build-waiting.png \
388 src/static/images/icons/builder-disabled.png \
389 src/static/images/img01.jpg \
390 src/static/images/img02.jpg \
391 src/static/images/img03.jpg \
392 src/static/images/img04.jpg \
393 src/static/images/ipfire_tux_128x128.png \
394 src/static/images/readme.txt
395
396 static_imagesdir = $(staticdir)/images
397
398 dist_static_js_DATA = \
399 src/static/js/bootstrap.min.js \
400 src/static/js/jquery.js \
401 src/static/js/pbs.js \
402 src/static/js/prettify.js
403
404 static_jsdir = $(staticdir)/js
405
406 # ------------------------------------------------------------------------------
407
408 EXTRA_DIST += \
409 Dockerfile.in
410
411 docker_DATA = \
412 Dockerfile
413
414 CLEANFILES += \
415 Dockerfile
416
417 dockerdir = $(datadir)/docker
418
419 .PHONY: docker
420 docker: Dockerfile
421 docker build -t "ipfire/pakfire-build-service:$(PACKAGE_VERSION)" .
422
423 # ------------------------------------------------------------------------------
424
425 if HAVE_SYSTEMD
426 systemdsystemunit_DATA = \
427 # TODO
428
429 CLEANFILES += \
430 $(systemdsystemunit_DATA)
431
432 INSTALL_DIRS += \
433 $(systemdsystemunitdir)
434 endif
435
436 EXTRA_DIST += \
437 # TODO
438
439 dist_database_DATA = \
440 src/database.sql
441
442 databasedir = $(datadir)/database
443
444 dist_cron_DATA = \
445 src/crontab/pakfire-build-service
446
447 crondir = $(sysconfdir)/cron.d
448
449 dist_geoip_DATA = \
450 src/geoip/GeoLite2-Country.mmdb
451
452 geoipdir = $(datadir)/geoip
453
454 EXTRA_DIST += \
455 src/tools/dump-database-schema.sh \
456 src/tools/update-geoip-database.sh
457
458 # ------------------------------------------------------------------------------
459
460 substitutions = \
461 '|PACKAGE_NAME=$(PACKAGE_NAME)|' \
462 '|PACKAGE_VERSION=$(PACKAGE_VERSION)|' \
463 '|configsdir=$(configsdir)|' \
464 '|bindir=$(bindir)|' \
465 '|datadir=$(datadir)|' \
466 '|localedir=$(localedir)|' \
467 '|templatesdir=$(templatesdir)|' \
468 '|staticdir=$(staticdir)|'
469
470 SED_PROCESS = \
471 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
472 $(SED) $(subst '|,-e 's|@,$(subst =,\@|,$(subst |',|g',$(substitutions)))) \
473 < $< > $@
474
475 %: %.in Makefile
476 $(SED_PROCESS)