]> git.ipfire.org Git - pakfire.git/blame - Makefile.am
testsuite: Add simple test that opens an archive
[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 324check_PROGRAMS += \
35ed7247 325 tests/libpakfire/main \
134b2757 326 tests/libpakfire/archive \
35ed7247 327 tests/libpakfire/key
7b463f34
MT
328
329dist_tests_libpakfire_main_SOURCES = \
330 tests/libpakfire/main.c
331
332tests_libpakfire_main_CPPFLAGS = \
333 $(TESTSUITE_CPPFLAGS)
334
335tests_libpakfire_main_LDADD = \
336 $(TESTSUITE_LDADD) \
337 $(PAKFIRE_LIBS)
338
134b2757
MT
339tests_libpakfire_archive_SOURCES = \
340 tests/libpakfire/archive.c
341
342tests_libpakfire_archive_CPPFLAGS = \
343 $(TESTSUITE_CPPFLAGS)
344
345tests_libpakfire_archive_LDADD = \
346 $(TESTSUITE_LDADD) \
347 $(PAKFIRE_LIBS)
348
35ed7247
MT
349tests_libpakfire_key_SOURCES = \
350 tests/libpakfire/key.c \
351 tests/libpakfire/key.h
352
353tests_libpakfire_key_CPPFLAGS = \
354 $(TESTSUITE_CPPFLAGS)
355
356tests_libpakfire_key_LDADD = \
357 $(TESTSUITE_LDADD) \
358 $(PAKFIRE_LIBS)
359
221cc3ce
MT
360# ------------------------------------------------------------------------------
361
b55979b4
MT
362lib_LTLIBRARIES += \
363 libpakfire_preload.la
364
365libpakfire_preload_la_SOURCES = \
366 src/libpakfire_preload/uname.c
367
368libpakfire_preload_la_LDFLAGS = \
369 $(AM_LDFLAGS) \
370 -shared \
371 -module \
372 -avoid-version
373
374libpakfire_preload_la_LIBADD = \
375 $(DL_LIBS)
376
377# ------------------------------------------------------------------------------
378
b55979b4
MT
379scripts_SCRIPTS = \
380 src/scripts/extract-debuginfo \
381 src/scripts/quality-agent
382
383EXTRA_DIST += \
384 src/scripts/extract-debuginfo.in \
385 src/scripts/quality-agent.in
386
387CLEANFILES += \
388 src/scripts/extract-debuginfo \
389 src/scripts/quality-agent
390
391dist_scripts_SCRIPTS = \
392 src/scripts/chroot-shell \
393 src/scripts/cleanup \
394 src/scripts/compress-man-pages \
395 src/scripts/find-common \
396 src/scripts/find-prerequires \
397 src/scripts/find-provides \
398 src/scripts/find-requires \
399 src/scripts/patch \
400 src/scripts/perl.prov \
401 src/scripts/perl.req \
402 src/scripts/py-compile \
403 src/scripts/remove-static-libs
404
405dist_scripts_DATA = \
406 src/scripts/functions-common \
407 src/scripts/functions-constants \
408 src/scripts/functions-directories \
409 src/scripts/functions-files \
410 src/scripts/functions-lists \
411 src/scripts/functions-logging
412
413# ------------------------------------------------------------------------------
414
415dist_qualityagent_SCRIPTS = \
416 src/quality-agent/001-include-files \
417 src/quality-agent/001-remove-info-files \
418 src/quality-agent/001-unsafe-files \
419 src/quality-agent/002-bad-symlinks \
420 src/quality-agent/003-libs-location \
421 src/quality-agent/050-canary \
422 src/quality-agent/050-execstacks \
423 src/quality-agent/050-invalid-interpreters \
424 src/quality-agent/050-libs-needed \
425 src/quality-agent/050-libs-soname \
426 src/quality-agent/050-libs-x86_64 \
427 src/quality-agent/050-nx \
428 src/quality-agent/050-relro \
429 src/quality-agent/050-rpaths \
430 src/quality-agent/095-directory-layout
431
432dist_qualityagent_DATA = \
433 src/quality-agent/qa-include
434
435# ------------------------------------------------------------------------------
436
437dist_macros_DATA = \
438 macros/arch.macro \
439 macros/build.macro \
440 macros/cflags.macro \
441 macros/constants.macro \
442 macros/package-default.macro \
443 macros/perl.macro \
444 macros/python.macro \
445 macros/quality-agent.macro \
446 macros/systemd.macro \
447 macros/templates.macro
448
449# ------------------------------------------------------------------------------
450
451if HAVE_SYSTEMD
452systemdsystemunit_DATA = \
453 src/systemd/pakfire-daemon.service
454
455EXTRA_DIST += \
456 src/systemd/pakfire-daemon.service.in
457
458CLEANFILES += \
459 src/systemd/pakfire-daemon.service
460endif
461
462# ------------------------------------------------------------------------------
463
464dist_configs_DATA = \
465 contrib/config/builder.conf \
466 contrib/config/client.conf \
467 contrib/config/daemon.conf \
468 contrib/config/general.conf
469
470dist_configsdistros_DATA = \
471 contrib/config/distros/ipfire3.conf
472
473# ------------------------------------------------------------------------------
474
475substitutions = \
476 '|PACKAGE_NAME=$(PACKAGE_NAME)|' \
477 '|PACKAGE_VERSION=$(PACKAGE_VERSION)|' \
478 '|bindir=$(bindir)|' \
479 '|libexecdir=$(libexecdir)|' \
480 '|qualityagentdir=$(qualityagentdir)|'
481
482SED_PROCESS = \
483 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
484 $(SED) $(subst '|,-e 's|@,$(subst =,\@|,$(subst |',|g',$(substitutions)))) \
485 < $< > $@
486
487src/scripts/%: src/scripts/%.in Makefile
488 $(SED_PROCESS)
489
490src/systemd/%: src/systemd/%.in Makefile
491 $(SED_PROCESS)
db5396bb
MT
492
493# - testsuite ------------------------------------------------------------------
494
7b463f34
MT
495check_LTLIBRARIES = \
496 tests/libtestsuite.la
497
498tests_libtestsuite_la_SOURCES = \
499 tests/testsuite.c \
500 tests/testsuite.h
501
4250f96b
MT
502tests_libtestsuite_la_CPPFLAGS = \
503 $(TESTSUITE_CPPFLAGS) \
134b2757
MT
504 -DABS_TOP_BUILDDIR=\"$(abs_top_builddir)\" \
505 -DABS_TOP_SRCDIR=\"$(abs_top_srcdir)\"
4250f96b 506
7b463f34
MT
507TESTSUITE_CPPFLAGS = \
508 $(AM_CPPFLAGS) \
509 $(PAKFIRE_CPPFLAGS)
510
511TESTSUITE_LDADD = \
512 tests/libtestsuite.la
513
db5396bb 514TESTS_ENVIRONMENT = \
f06095f1 515 PAKFIRE_LOG=debug \
db5396bb
MT
516 PYTHONPATH="$(top_srcdir)/.libs:$(top_srcdir)/src" \
517 topdir="$(shell pwd)"
518
7b463f34
MT
519#dist_check_SCRIPTS = \
520# tests/module-load.py
db5396bb
MT
521
522TESTS = \
7b463f34
MT
523 $(check_PROGRAMS) \
524 $(dist_check_SCRIPTS)
134b2757
MT
525
526# Some test data to run tests
527EXTRA_DIST += \
528 tests/data/726D8B0B0889B04E.key \
529 tests/data/beep-1.3-2.ip3.x86_64.pfm