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