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