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