]> git.ipfire.org Git - pbs.git/blame - Makefile.am
Merge Pakfire Hub into the main webapp
[pbs.git] / Makefile.am
CommitLineData
7c17bfff
MT
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
21ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
22AM_MAKEFLAGS = --no-print-directory
23AUTOMAKE_OPTIONS = color-tests
24
25# remove target it the command fails
26.DELETE_ON_ERROR:
27
28# keep itermediate files
29.SECONDARY:
30
31SUBDIRS = . po
32
33pythondir = $(pyexecdir)/pakfire
34
35configsdir = $(sysconfdir)/pakfire
09656f14 36crondir = $(sysconfdir)/cron.d
7c17bfff 37
3e8c8603 38BUILT_SOURCES =
7c17bfff
MT
39CLEANFILES =
40DISTCLEANFILES =
41EXTRA_DIST =
42INSTALL_DIRS =
43noinst_DATA =
44
45@INTLTOOL_POLICY_RULE@
46
47.PHONY: update-po
eb80d9fa 48update-po: po/POTFILES.in
7c17bfff
MT
49 $(MAKE) -C po update-po
50
eb80d9fa
MT
51po/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
7c17bfff
MT
57DISTCHECK_CONFIGURE_FLAGS = \
58 --with-systemdsystemunitdir=$$dc_install_base/$(systemdsystemunitdir)
59
60# ------------------------------------------------------------------------------
61
62AM_V_XSLT = $(AM_V_XSLT_$(V))
63AM_V_XSLT_ = $(AM_V_XSLT_$(AM_DEFAULT_VERBOSITY))
64AM_V_XSLT_0 = @echo " XSLT " $@;
65
66# ------------------------------------------------------------------------------
67
68dist_doc_DATA = \
d3e7a9fb
MT
69 COPYING \
70 README
7c17bfff
MT
71
72# ------------------------------------------------------------------------------
73
74dist_bin_SCRIPTS = \
43025dca 75 src/scripts/pakfire-build-service \
7c17bfff
MT
76 src/scripts/pakfire-web
77
78dist_configs_DATA = \
79 pbs.conf.sample
80
81buildservice_PYTHON = \
455cd7d1
MT
82 src/buildservice/__init__.py \
83 src/buildservice/__version__.py \
316268ce 84 src/buildservice/aws.py \
7c17bfff
MT
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 \
028b2057 90 src/buildservice/config.py \
7c17bfff
MT
91 src/buildservice/constants.py \
92 src/buildservice/database.py \
012035e0 93 src/buildservice/decorators.py \
7c17bfff 94 src/buildservice/distribution.py \
64991f9f 95 src/buildservice/errors.py \
0fb1e800 96 src/buildservice/events.py \
7c17bfff 97 src/buildservice/git.py \
fd43d5e1 98 src/buildservice/jobqueue.py \
2a1e9ce2 99 src/buildservice/jobs.py \
7c17bfff 100 src/buildservice/keys.py \
7c17bfff
MT
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 \
7c17bfff
MT
106 src/buildservice/sessions.py \
107 src/buildservice/settings.py \
108 src/buildservice/sources.py \
7c17bfff
MT
109 src/buildservice/uploads.py \
110 src/buildservice/users.py
111
112buildservicedir = $(pythondir)/buildservice
113
3e8c8603
MT
114BUILT_SOURCES += \
115 src/buildservice/constants.py
116
56cba8c7
MT
117EXTRA_DIST += \
118 src/buildservice/constants.py.in
119
120CLEANFILES += \
121 src/buildservice/constants.py
122
7c17bfff
MT
123web_PYTHON = \
124 src/web/__init__.py \
aa8d5ad3 125 src/web/auth.py \
0919f216 126 src/web/base.py \
df69af71 127 src/web/bugs.py \
eab000f0 128 src/web/builders.py \
98514762 129 src/web/builds.py \
8111065a 130 src/web/distributions.py \
5cf8c7ea 131 src/web/errors.py \
550e7194 132 src/web/events.py \
7c17bfff 133 src/web/handlers.py \
8f6d6505 134 src/web/jobs.py \
f44a3f0d
MT
135 src/web/keys.py \
136 src/web/mirrors.py \
e71f1b15 137 src/web/packages.py \
ed83541e 138 src/web/repos.py \
b8b310ec 139 src/web/search.py \
fd902c1e 140 src/web/ui_modules.py \
f062b044 141 src/web/uploads.py \
156b826e 142 src/web/users.py
7c17bfff
MT
143
144webdir = $(buildservicedir)/web
145
146# ------------------------------------------------------------------------------
147
148dist_templates_DATA = \
7c17bfff 149 src/templates/base.html \
7c17bfff 150 src/templates/index.html \
7c17bfff 151 src/templates/jobs-buildroot.html \
7c17bfff
MT
152 src/templates/log.html \
153 src/templates/login.html \
fe9b927c 154 src/templates/queue.html \
d238f240 155 src/templates/search.html
7c17bfff
MT
156
157templatesdir = $(datadir)/templates
158
df69af71
MT
159templates_bugsdir = $(templatesdir)/bugs
160
161dist_templates_bugs_modules_DATA = \
162 src/templates/bugs/modules/list.html
163
164templates_bugs_modulesdir = $(templates_bugsdir)/modules
165
7c17bfff
MT
166dist_templates_builders_DATA = \
167 src/templates/builders/delete.html \
168 src/templates/builders/detail.html \
169 src/templates/builders/edit.html \
170 src/templates/builders/list.html \
17cfc785 171 src/templates/builders/new.html
7c17bfff
MT
172
173templates_buildersdir = $(templatesdir)/builders
174
175dist_templates_builds_DATA = \
93b7ce5f 176 src/templates/builds/delete.html \
75f80d94 177 src/templates/builds/index.html \
f7bc5fb1 178 src/templates/builds/show.html
7c17bfff
MT
179
180templates_buildsdir = $(templatesdir)/builds
181
72dae6ea 182dist_templates_builds_messages_DATA = \
9a83e901
MT
183 src/templates/builds/messages/comment.txt \
184 src/templates/builds/messages/failed.txt \
185 src/templates/builds/messages/finished.txt
72dae6ea
MT
186
187templates_builds_messagesdir = $(templates_buildsdir)/messages
188
79a4d9b2
MT
189dist_templates_builds_modules_DATA = \
190 src/templates/builds/modules/list.html
191
192templates_builds_modulesdir = $(templates_buildsdir)/modules
193
5c833b1c 194dist_templates_distros_DATA = \
b5601528 195 src/templates/distros/edit.html \
9342fbce
MT
196 src/templates/distros/index.html \
197 src/templates/distros/show.html
5c833b1c
MT
198
199templates_distrosdir = $(templatesdir)/distros
200
5153597e
MT
201dist_templates_distros_modules_DATA = \
202 src/templates/distros/modules/list.html
203
204templates_distros_modulesdir = $(templates_distrosdir)/modules
205
7c17bfff 206dist_templates_errors_DATA = \
7ec8e0d3 207 src/templates/errors/error.html
7c17bfff
MT
208
209templates_errorsdir = $(templatesdir)/errors
210
550e7194
MT
211templates_eventsdir = $(templatesdir)/events
212
213dist_templates_events_modules_DATA = \
214 src/templates/events/modules/list.html \
6f76c9f8 215 src/templates/events/modules/build-comment.html \
550e7194
MT
216 src/templates/events/modules/system-message.html \
217 src/templates/events/modules/user-message.html
218
219templates_events_modulesdir = $(templates_eventsdir)/modules
220
660ef718
MT
221dist_templates_jobs_DATA = \
222 src/templates/jobs/abort.html
223
558b95bd
MT
224templates_jobsdir = $(templatesdir)/jobs
225
226dist_templates_jobs_messages_DATA = \
227 src/templates/jobs/messages/failed.txt
228
229templates_jobs_messagesdir = $(templates_jobsdir)/messages
230
1ef8936f
MT
231dist_templates_jobs_modules_DATA = \
232 src/templates/jobs/modules/list.html
233
234templates_jobs_modulesdir = $(templates_jobsdir)/modules
235
68dd077d
MT
236templates_messagesdir = $(templatesdir)/messages
237
d72a55be
MT
238dist_templates_mirrors_DATA = \
239 src/templates/mirrors/delete.html \
240 src/templates/mirrors/detail.html \
241 src/templates/mirrors/edit.html \
242 src/templates/mirrors/list.html \
243 src/templates/mirrors/new.html
244
245templates_mirrorsdir = $(templatesdir)/mirrors
246
7c17bfff 247dist_templates_modules_DATA = \
7c17bfff 248 src/templates/modules/commits-table.html \
c6e799b4 249 src/templates/modules/commit-message.html \
8dc6f5a4 250 src/templates/modules/link-to-user.html \
7c17bfff 251 src/templates/modules/packages-files-table.html \
dc8a8ee7
MT
252 src/templates/modules/source-table.html \
253 src/templates/modules/text.html
7c17bfff
MT
254
255templates_modulesdir = $(templatesdir)/modules
256
b32e8958 257dist_templates_repos_DATA = \
98ee6714 258 src/templates/repos/create-custom.html \
b32e8958 259 src/templates/repos/builds.html \
0bcebf53 260 src/templates/repos/edit.html \
b32e8958
MT
261 src/templates/repos/show.html
262
ed83541e
MT
263templates_reposdir = $(templatesdir)/repos
264
265dist_templates_repos_modules_DATA = \
266 src/templates/repos/modules/list.html
267
268templates_repos_modulesdir = $(templates_reposdir)/modules
269
7c17bfff 270dist_templates_packages_DATA = \
b5800237 271 src/templates/packages/index.html \
a6d71759 272 src/templates/packages/name.html \
d9f76034 273 src/templates/packages/show.html \
7c17bfff
MT
274 src/templates/packages/view-file.html
275
276templates_packagesdir = $(templatesdir)/packages
277
d9f76034 278dist_templates_packages_modules_DATA = \
66a6e7db 279 src/templates/packages/modules/dependencies.html \
d9f76034
MT
280 src/templates/packages/modules/info.html
281
282templates_packages_modulesdir = $(templates_packagesdir)/modules
283
5fc0715d 284dist_templates_users_DATA = \
6c41a6f6 285 src/templates/users/delete.html \
631ca6d8 286 src/templates/users/edit.html \
57718fd9 287 src/templates/users/index.html \
5fc0715d
MT
288 src/templates/users/show.html
289
290templates_usersdir = $(templatesdir)/users
291
18132fad
MT
292dist_templates_users_messages_DATA = \
293 src/templates/users/messages/welcome.txt
294
295templates_users_messagesdir = $(templates_usersdir)/messages
296
57718fd9
MT
297dist_templates_users_modules_DATA = \
298 src/templates/users/modules/list.html
299
300templates_users_modulesdir = $(templates_usersdir)/modules
301
7c17bfff
MT
302# ------------------------------------------------------------------------------
303#
304dist_static_DATA = \
305 src/static/favicon.ico \
306 src/static/robots.txt
307
308staticdir = $(datadir)/static
309
ee08328e 310static_css_DATA = \
a2c89f4c 311 src/static/css/highlight.css \
ee08328e 312 src/static/css/site.css
7c17bfff
MT
313
314static_cssdir = $(staticdir)/css
315
ee08328e
MT
316EXTRA_DIST += \
317 src/static/css/_fonts.scss \
85cd4dbd 318 src/static/css/_icons.scss \
ee08328e
MT
319 src/static/css/site.scss
320
321CLEANFILES += \
322 src/static/css/site.css
323
ee08328e 324static_js_DATA = \
c85a832d 325 src/static/js/jquery.min.js \
7c17bfff
MT
326 src/static/js/pbs.js \
327 src/static/js/prettify.js
328
329static_jsdir = $(staticdir)/js
330
ee08328e 331CLEANFILES += \
c85a832d 332 src/static/js/jquery.min.js
ee08328e 333
0d995d8d
MT
334dist_static_fonts_DATA = \
335 src/third-party/fonts/prompt/OFL.txt \
336 src/third-party/fonts/prompt/Prompt-Black.ttf \
337 src/third-party/fonts/prompt/Prompt-BlackItalic.ttf \
338 src/third-party/fonts/prompt/Prompt-Bold.ttf \
339 src/third-party/fonts/prompt/Prompt-BoldItalic.ttf \
340 src/third-party/fonts/prompt/Prompt-ExtraBold.ttf \
341 src/third-party/fonts/prompt/Prompt-ExtraBoldItalic.ttf \
342 src/third-party/fonts/prompt/Prompt-ExtraLight.ttf \
343 src/third-party/fonts/prompt/Prompt-ExtraLightItalic.ttf \
344 src/third-party/fonts/prompt/Prompt-Italic.ttf \
345 src/third-party/fonts/prompt/Prompt-Light.ttf \
346 src/third-party/fonts/prompt/Prompt-LightItalic.ttf \
347 src/third-party/fonts/prompt/Prompt-Medium.ttf \
348 src/third-party/fonts/prompt/Prompt-MediumItalic.ttf \
349 src/third-party/fonts/prompt/Prompt-Regular.ttf \
350 src/third-party/fonts/prompt/Prompt-SemiBold.ttf \
351 src/third-party/fonts/prompt/Prompt-SemiBoldItalic.ttf \
352 src/third-party/fonts/prompt/Prompt-Thin.ttf \
85cd4dbd
MT
353 src/third-party/fonts/prompt/Prompt-ThinItalic.ttf \
354 src/third-party/Font-Awesome/webfonts/fa-brands-400.ttf \
355 src/third-party/Font-Awesome/webfonts/fa-brands-400.woff2 \
356 src/third-party/Font-Awesome/webfonts/fa-regular-400.ttf \
357 src/third-party/Font-Awesome/webfonts/fa-regular-400.woff2 \
358 src/third-party/Font-Awesome/webfonts/fa-solid-900.ttf \
359 src/third-party/Font-Awesome/webfonts/fa-solid-900.woff2
0d995d8d
MT
360
361static_fontsdir = $(staticdir)/fonts
362
7c17bfff
MT
363# ------------------------------------------------------------------------------
364
365if HAVE_SYSTEMD
366systemdsystemunit_DATA = \
2105299c 367 src/systemd/pakfire-web.service
7c17bfff
MT
368
369CLEANFILES += \
370 $(systemdsystemunit_DATA)
371
372INSTALL_DIRS += \
373 $(systemdsystemunitdir)
374endif
375
376EXTRA_DIST += \
2105299c 377 src/systemd/pakfire-web.service.in
7c17bfff
MT
378
379dist_database_DATA = \
380 src/database.sql
381
382databasedir = $(datadir)/database
383
09656f14 384dist_cron_DATA = \
7c17bfff
MT
385 src/crontab/pakfire-build-service
386
d3e7a9fb 387EXTRA_DIST += \
0d897466 388 src/tools/dump-database-schema.sh
d3e7a9fb 389
7c17bfff
MT
390# ------------------------------------------------------------------------------
391
392substitutions = \
393 '|PACKAGE_NAME=$(PACKAGE_NAME)|' \
394 '|PACKAGE_VERSION=$(PACKAGE_VERSION)|' \
395 '|configsdir=$(configsdir)|' \
56cba8c7 396 '|bindir=$(bindir)|' \
2b5a3b4d 397 '|datadir=$(datadir)|' \
027a662e
MT
398 '|localedir=$(localedir)|' \
399 '|templatesdir=$(templatesdir)|' \
400 '|staticdir=$(staticdir)|'
7c17bfff
MT
401
402SED_PROCESS = \
403 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
404 $(SED) $(subst '|,-e 's|@,$(subst =,\@|,$(subst |',|g',$(substitutions)))) \
405 < $< > $@
406
73eadbe5
MT
407UGLIFYJS_PROCESS = \
408 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
409 $(UGLIFYJS) --compress --mangle -- $< > $@
410
7c17bfff
MT
411%: %.in Makefile
412 $(SED_PROCESS)
73eadbe5
MT
413
414%.css: %.scss
415 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
416 $(SASSC) --style compressed $< > $@
417
a2c89f4c
MT
418src/static/css/highlight.css: Makefile
419 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
420 $(PYGMENTIZE) -S xcode -f html -a .highlight > $@
421
73eadbe5
MT
422%.min.js: %.js
423 $(UGLIFYJS_PROCESS)
ee08328e 424
67704209
MT
425# ------------------------------------------------------------------------------
426
427TESTS = \
428 $(dist_check_SCRIPTS)
429
430TESTS_ENVIRONMENT = \
431 PYTHONPATH="$(abs_top_srcdir)/src" \
432 abs_top_srcdir="$(abs_top_srcdir)"
433
434dist_check_SCRIPTS = \
f9a38dd2 435 tests/setup.py \
01de82e0 436 tests/build.py \
890486ab 437 tests/builder.py \
5ac581c0 438 tests/distro.py \
18132fad 439 tests/message.py \
4a5f100f 440 tests/package.py \
559967f7
MT
441 tests/repo.py \
442 tests/upload.py
67704209
MT
443
444EXTRA_DIST += \
445 tests/test.py
a9388064
MT
446
447EXTRA_DIST += \
7840cb39 448 tests/data/beep-1.3-2.ip3.src.pfm \
a9388064 449 tests/data/beep-1.3-2.ip3.x86_64.pfm