]> git.ipfire.org Git - people/ms/pakfire.git/blame - Makefile.am
testsuite: Initialize pakfire in test directory
[people/ms/pakfire.git] / Makefile.am
CommitLineData
b55979b4
MT
1###############################################################################
2# #
3# Pakfire - The IPFire package management system #
4# Copyright (C) 2013 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
221cc3ce
MT
33LIBPAKFIRE_CURRENT=0
34LIBPAKFIRE_REVISION=0
35LIBPAKFIRE_AGE=0
36
b55979b4 37libexecdir = $(libdir)/pakfire
b72b666b 38pythondir = $(pyexecdir)
b55979b4
MT
39
40configsdir = $(sysconfdir)/pakfire
41configsdistrosdir = $(configsdir)/distros
42macrosdir = $(prefix)/lib/pakfire/macros
43qualityagentdir = $(prefix)/lib/quality-agent
44scriptsdir = $(prefix)/lib/$(PACKAGE_NAME)
45
46CLEANFILES =
47DISTCLEANFILES =
48EXTRA_DIST =
49
50AM_CPPFLAGS = \
51 -include $(top_builddir)/config.h \
52 -I $(top_srcdir)/include \
53 $(OUR_CPPFLAGS)
54
55AM_CFLAGS = $(OUR_CFLAGS)
56AM_LDFLAGS = $(OUR_LDFLAGS)
57
7b463f34
MT
58PAKFIRE_CPPFLAGS = -I$(top_srcdir)/src/libpakfire/include
59PAKFIRE_LIBS = libpakfire.la
b8a51cb6 60
7b463f34 61check_PROGRAMS =
b55979b4
MT
62lib_LTLIBRARIES =
63libexec_PROGRAMS =
64pkgpyexec_LTLIBRARIES =
221cc3ce 65pkginclude_HEADERS =
b55979b4
MT
66
67DISTCHECK_CONFIGURE_FLAGS = \
a7d75de9
MT
68 --with-systemdsystemunitdir=$$dc_install_base/$(systemdsystemunitdir) \
69 --enable-debug
b55979b4
MT
70
71@INTLTOOL_POLICY_RULE@
72
d1de2db6
MT
73.PHONY: update-po
74update-po:
75 $(MAKE) -C po update-po
76
b55979b4
MT
77# ------------------------------------------------------------------------------
78
79dist_doc_DATA = \
80 COPYING \
81 I18N \
82 README
83
84# ------------------------------------------------------------------------------
85
86dist_bin_SCRIPTS = \
87 src/scripts/pakfire
88
89install-exec-local:
90 $(MKDIR_P) $(DESTDIR)/$(bindir)
91 cd $(DESTDIR)/$(bindir) && \
92 $(LN_S) -vf pakfire pakfire-builder && \
93 $(LN_S) -vf pakfire pakfire-client && \
94 $(LN_S) -vf pakfire pakfire-daemon && \
95 $(LN_S) -vf pakfire pakfire-key
96
97 $(MKDIR_P) $(DESTDIR)/$(scriptsdir)
98 cd $(DESTDIR)/$(scriptsdir) && \
99 $(LN_S) -vf ../../bin/pakfire builder
100
101# ------------------------------------------------------------------------------
102
103pakfire_PYTHON = \
104 src/pakfire/__init__.py \
105 src/pakfire/__version__.py \
106 src/pakfire/actions.py \
1204717c 107 src/pakfire/arch.py \
b55979b4
MT
108 src/pakfire/base.py \
109 src/pakfire/builder.py \
110 src/pakfire/cgroup.py \
111 src/pakfire/client.py \
112 src/pakfire/cli.py \
113 src/pakfire/compress.py \
114 src/pakfire/config.py \
115 src/pakfire/constants.py \
116 src/pakfire/daemon.py \
117 src/pakfire/distro.py \
b55979b4
MT
118 src/pakfire/errors.py \
119 src/pakfire/filelist.py \
7eec9830 120 src/pakfire/http.py \
96a8f2a4 121 src/pakfire/hub.py \
b55979b4
MT
122 src/pakfire/i18n.py \
123 src/pakfire/keyring.py \
124 src/pakfire/logger.py \
dccd65ea 125 src/pakfire/progressbar.py \
b55979b4
MT
126 src/pakfire/shell.py \
127 src/pakfire/system.py \
128 src/pakfire/transaction.py \
b55979b4
MT
129 src/pakfire/util.py
130
131pakfiredir = $(pythondir)/pakfire
132
133# ------------------------------------------------------------------------------
134
135pakfire_packages_PYTHON = \
136 src/pakfire/packages/__init__.py \
137 src/pakfire/packages/base.py \
138 src/pakfire/packages/file.py \
139 src/pakfire/packages/installed.py \
140 src/pakfire/packages/lexer.py \
141 src/pakfire/packages/make.py \
142 src/pakfire/packages/packager.py \
143 src/pakfire/packages/solv.py \
144 src/pakfire/packages/tar.py
145
146pakfire_packagesdir = $(pythondir)/pakfire/packages
147
148# ------------------------------------------------------------------------------
149
150pakfire_repository_PYTHON = \
151 src/pakfire/repository/__init__.py \
152 src/pakfire/repository/base.py \
153 src/pakfire/repository/cache.py \
154 src/pakfire/repository/database.py \
b55979b4
MT
155 src/pakfire/repository/local.py \
156 src/pakfire/repository/metadata.py \
157 src/pakfire/repository/remote.py \
158 src/pakfire/repository/system.py
159
160pakfire_repositorydir = $(pythondir)/pakfire/repository
161
162# ------------------------------------------------------------------------------
163
10458aa0
MT
164pakfire_ui_PYTHON = \
165 src/pakfire/ui/__init__.py \
0a257615
MT
166 src/pakfire/ui/base.py \
167 src/pakfire/ui/cli.py \
10458aa0
MT
168 src/pakfire/ui/helpers.py \
169 src/pakfire/ui/progressbar.py
170
171pakfire_uidir = $(pythondir)/pakfire/ui
172
173# ------------------------------------------------------------------------------
174
b55979b4
MT
175pkgpyexec_LTLIBRARIES += \
176 _pakfire.la
177
178_pakfire_la_SOURCES = \
179 src/_pakfire/_pakfiremodule.c \
f1f8452b
MT
180 src/_pakfire/archive.c \
181 src/_pakfire/archive.h \
b55979b4
MT
182 src/_pakfire/capabilities.c \
183 src/_pakfire/capabilities.h \
184 src/_pakfire/constants.h \
a5845b60 185 src/_pakfire/errors.h \
0a89bb8a
MT
186 src/_pakfire/key.c \
187 src/_pakfire/key.h \
b8a51cb6
MT
188 src/_pakfire/package.c \
189 src/_pakfire/package.h \
6e46b18e
MT
190 src/_pakfire/pakfire.c \
191 src/_pakfire/pakfire.h \
b55979b4
MT
192 src/_pakfire/pool.c \
193 src/_pakfire/pool.h \
194 src/_pakfire/problem.c \
195 src/_pakfire/problem.h \
196 src/_pakfire/relation.c \
197 src/_pakfire/relation.h \
198 src/_pakfire/repo.c \
199 src/_pakfire/repo.h \
200 src/_pakfire/request.c \
201 src/_pakfire/request.h \
9b62fe40
MT
202 src/_pakfire/selector.c \
203 src/_pakfire/selector.h \
b55979b4
MT
204 src/_pakfire/solution.c \
205 src/_pakfire/solution.h \
206 src/_pakfire/solvable.c \
207 src/_pakfire/solvable.h \
b55979b4
MT
208 src/_pakfire/step.c \
209 src/_pakfire/step.h \
210 src/_pakfire/transaction.c \
211 src/_pakfire/transaction.h \
212 src/_pakfire/util.c \
213 src/_pakfire/util.h
214
7b463f34 215_pakfire_la_CPPFLAGS = \
f06095f1 216 -include $(top_builddir)/config.h \
7b463f34
MT
217 $(PAKFIRE_CPPFLAGS)
218
b55979b4
MT
219_pakfire_la_CFLAGS = \
220 $(AM_CFLAGS) \
221 $(PYTHON_DEVEL_CFLAGS) \
222 $(CAP_CFLAGS) \
223 $(SOLV_CFLAGS)
224
225_pakfire_la_LDFLAGS = \
226 $(AM_LDFLAGS) \
227 -shared \
228 -module \
229 -avoid-version
230
231_pakfire_la_LIBADD = \
232 $(PYTHON_DEVEL_LIBS) \
b8a51cb6 233 $(PAKFIRE_LIBS) \
b55979b4
MT
234 $(CAP_LIBS) \
235 $(SOLV_LIBS)
236
237# ------------------------------------------------------------------------------
238
221cc3ce
MT
239lib_LTLIBRARIES += \
240 libpakfire.la
241
242libpakfire_la_SOURCES = \
243 src/libpakfire/archive.c \
244 src/libpakfire/cache.c \
245 src/libpakfire/errno.c \
246 src/libpakfire/file.c \
247 src/libpakfire/filter.c \
0a89bb8a 248 src/libpakfire/key.c \
f06095f1 249 src/libpakfire/logging.c \
221cc3ce
MT
250 src/libpakfire/package.c \
251 src/libpakfire/packagelist.c \
6e46b18e 252 src/libpakfire/pakfire.c \
221cc3ce 253 src/libpakfire/pool.c \
d528058e 254 src/libpakfire/problem.c \
221cc3ce
MT
255 src/libpakfire/relation.c \
256 src/libpakfire/relationlist.c \
257 src/libpakfire/repo.c \
258 src/libpakfire/repocache.c \
259 src/libpakfire/request.c \
260 src/libpakfire/selector.c \
9c8337dd 261 src/libpakfire/solution.c \
221cc3ce 262 src/libpakfire/step.c \
980ccfe6 263 src/libpakfire/system.c \
221cc3ce
MT
264 src/libpakfire/transaction.c \
265 src/libpakfire/util.c
266
267pkginclude_HEADERS += \
268 src/libpakfire/include/pakfire/archive.h \
269 src/libpakfire/include/pakfire/cache.h \
270 src/libpakfire/include/pakfire/constants.h \
271 src/libpakfire/include/pakfire/errno.h \
272 src/libpakfire/include/pakfire/file.h \
273 src/libpakfire/include/pakfire/filter.h \
274 src/libpakfire/include/pakfire/i18n.h \
0a89bb8a 275 src/libpakfire/include/pakfire/key.h \
f06095f1 276 src/libpakfire/include/pakfire/logging.h \
221cc3ce
MT
277 src/libpakfire/include/pakfire/package.h \
278 src/libpakfire/include/pakfire/packagecache.h \
279 src/libpakfire/include/pakfire/packagelist.h \
6e46b18e 280 src/libpakfire/include/pakfire/pakfire.h \
221cc3ce 281 src/libpakfire/include/pakfire/pool.h \
d528058e 282 src/libpakfire/include/pakfire/problem.h \
221cc3ce
MT
283 src/libpakfire/include/pakfire/relation.h \
284 src/libpakfire/include/pakfire/relationlist.h \
285 src/libpakfire/include/pakfire/repo.h \
286 src/libpakfire/include/pakfire/repocache.h \
287 src/libpakfire/include/pakfire/request.h \
288 src/libpakfire/include/pakfire/selector.h \
9c8337dd 289 src/libpakfire/include/pakfire/solution.h \
221cc3ce 290 src/libpakfire/include/pakfire/step.h \
980ccfe6 291 src/libpakfire/include/pakfire/system.h \
221cc3ce
MT
292 src/libpakfire/include/pakfire/transaction.h \
293 src/libpakfire/include/pakfire/types.h \
294 src/libpakfire/include/pakfire/util.h
295
296libpakfire_la_CFLAGS = \
7b463f34
MT
297 $(AM_CFLAGS) \
298 $(LIBGCRYPT_CFLAGS)
221cc3ce
MT
299
300libpakfire_la_CPPFLAGS = \
301 $(AM_CPPFLAGS) \
302 -I$(top_srcdir)/src/libpakfire/include \
303 -include $(top_builddir)/config.h \
304 -DPAKFIRE_PRIVATE
305
306libpakfire_la_LDFLAGS = \
307 $(AM_LDFLAGS) \
308 -version-info $(LIBPAKFIRE_CURRENT):$(LIBPAKFIRE_REVISION):$(LIBPAKFIRE_AGE) \
309 -Wl,--version-script=$(top_srcdir)/src/libpakfire/libpakfire.sym
310
311libpakfire_la_LIBADD = \
312 $(ARCHIVE_LIBS) \
0e75ae24 313 $(GPGME_LIBS) \
6d33e7ed 314 $(LIBGCRYPT_LIBS) \
e207c23c 315 $(LZMA_LIBS) \
221cc3ce
MT
316 $(SOLV_LIBS)
317
b30972cd
MT
318libpakfire_la_DEPENDENCIES = \
319 src/libpakfire/libpakfire.sym
320
221cc3ce
MT
321EXTRA_DIST += \
322 src/libpakfire/libpakfire.sym
323
7b463f34
MT
324check_PROGRAMS += \
325 tests/libpakfire/main
326
327dist_tests_libpakfire_main_SOURCES = \
328 tests/libpakfire/main.c
329
330tests_libpakfire_main_CPPFLAGS = \
331 $(TESTSUITE_CPPFLAGS)
332
333tests_libpakfire_main_LDADD = \
334 $(TESTSUITE_LDADD) \
335 $(PAKFIRE_LIBS)
336
221cc3ce
MT
337# ------------------------------------------------------------------------------
338
b55979b4
MT
339lib_LTLIBRARIES += \
340 libpakfire_preload.la
341
342libpakfire_preload_la_SOURCES = \
343 src/libpakfire_preload/uname.c
344
345libpakfire_preload_la_LDFLAGS = \
346 $(AM_LDFLAGS) \
347 -shared \
348 -module \
349 -avoid-version
350
351libpakfire_preload_la_LIBADD = \
352 $(DL_LIBS)
353
354# ------------------------------------------------------------------------------
355
b55979b4
MT
356scripts_SCRIPTS = \
357 src/scripts/extract-debuginfo \
358 src/scripts/quality-agent
359
360EXTRA_DIST += \
361 src/scripts/extract-debuginfo.in \
362 src/scripts/quality-agent.in
363
364CLEANFILES += \
365 src/scripts/extract-debuginfo \
366 src/scripts/quality-agent
367
368dist_scripts_SCRIPTS = \
369 src/scripts/chroot-shell \
370 src/scripts/cleanup \
371 src/scripts/compress-man-pages \
372 src/scripts/find-common \
373 src/scripts/find-prerequires \
374 src/scripts/find-provides \
375 src/scripts/find-requires \
376 src/scripts/patch \
377 src/scripts/perl.prov \
378 src/scripts/perl.req \
379 src/scripts/py-compile \
380 src/scripts/remove-static-libs
381
382dist_scripts_DATA = \
383 src/scripts/functions-common \
384 src/scripts/functions-constants \
385 src/scripts/functions-directories \
386 src/scripts/functions-files \
387 src/scripts/functions-lists \
388 src/scripts/functions-logging
389
390# ------------------------------------------------------------------------------
391
392dist_qualityagent_SCRIPTS = \
393 src/quality-agent/001-include-files \
394 src/quality-agent/001-remove-info-files \
395 src/quality-agent/001-unsafe-files \
396 src/quality-agent/002-bad-symlinks \
397 src/quality-agent/003-libs-location \
398 src/quality-agent/050-canary \
399 src/quality-agent/050-execstacks \
400 src/quality-agent/050-invalid-interpreters \
401 src/quality-agent/050-libs-needed \
402 src/quality-agent/050-libs-soname \
403 src/quality-agent/050-libs-x86_64 \
404 src/quality-agent/050-nx \
405 src/quality-agent/050-relro \
406 src/quality-agent/050-rpaths \
407 src/quality-agent/095-directory-layout
408
409dist_qualityagent_DATA = \
410 src/quality-agent/qa-include
411
412# ------------------------------------------------------------------------------
413
414dist_macros_DATA = \
415 macros/arch.macro \
416 macros/build.macro \
417 macros/cflags.macro \
418 macros/constants.macro \
419 macros/package-default.macro \
420 macros/perl.macro \
421 macros/python.macro \
422 macros/quality-agent.macro \
423 macros/systemd.macro \
424 macros/templates.macro
425
426# ------------------------------------------------------------------------------
427
428if HAVE_SYSTEMD
429systemdsystemunit_DATA = \
430 src/systemd/pakfire-daemon.service
431
432EXTRA_DIST += \
433 src/systemd/pakfire-daemon.service.in
434
435CLEANFILES += \
436 src/systemd/pakfire-daemon.service
437endif
438
439# ------------------------------------------------------------------------------
440
441dist_configs_DATA = \
442 contrib/config/builder.conf \
443 contrib/config/client.conf \
444 contrib/config/daemon.conf \
445 contrib/config/general.conf
446
447dist_configsdistros_DATA = \
448 contrib/config/distros/ipfire3.conf
449
450# ------------------------------------------------------------------------------
451
452substitutions = \
453 '|PACKAGE_NAME=$(PACKAGE_NAME)|' \
454 '|PACKAGE_VERSION=$(PACKAGE_VERSION)|' \
455 '|bindir=$(bindir)|' \
456 '|libexecdir=$(libexecdir)|' \
457 '|qualityagentdir=$(qualityagentdir)|'
458
459SED_PROCESS = \
460 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
461 $(SED) $(subst '|,-e 's|@,$(subst =,\@|,$(subst |',|g',$(substitutions)))) \
462 < $< > $@
463
464src/scripts/%: src/scripts/%.in Makefile
465 $(SED_PROCESS)
466
467src/systemd/%: src/systemd/%.in Makefile
468 $(SED_PROCESS)
db5396bb
MT
469
470# - testsuite ------------------------------------------------------------------
471
7b463f34
MT
472check_LTLIBRARIES = \
473 tests/libtestsuite.la
474
475tests_libtestsuite_la_SOURCES = \
476 tests/testsuite.c \
477 tests/testsuite.h
478
4250f96b
MT
479tests_libtestsuite_la_CPPFLAGS = \
480 $(TESTSUITE_CPPFLAGS) \
481 -DABS_TOP_BUILDDIR=\"$(abs_top_builddir)\"
482
247cafd4
MT
483EXTRA_DIST += \
484 tests/libpakfire/pakfire.h
485
7b463f34
MT
486TESTSUITE_CPPFLAGS = \
487 $(AM_CPPFLAGS) \
488 $(PAKFIRE_CPPFLAGS)
489
490TESTSUITE_LDADD = \
491 tests/libtestsuite.la
492
db5396bb 493TESTS_ENVIRONMENT = \
f06095f1 494 PAKFIRE_LOG=debug \
db5396bb
MT
495 PYTHONPATH="$(top_srcdir)/.libs:$(top_srcdir)/src" \
496 topdir="$(shell pwd)"
497
7b463f34
MT
498#dist_check_SCRIPTS = \
499# tests/module-load.py
db5396bb
MT
500
501TESTS = \
7b463f34
MT
502 $(check_PROGRAMS) \
503 $(dist_check_SCRIPTS)