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