############################################################################### # # # Pakfire - The IPFire package management system # # Copyright (C) 2013 Pakfire development team # # # # This program is free software: you can redistribute it and/or modify # # it under the terms of the GNU General Public License as published by # # the Free Software Foundation, either version 3 of the License, or # # (at your option) any later version. # # # # This program is distributed in the hope that it will be useful, # # but WITHOUT ANY WARRANTY; without even the implied warranty of # # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # # GNU General Public License for more details. # # # # You should have received a copy of the GNU General Public License # # along with this program. If not, see . # # # ############################################################################### ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS} AM_MAKEFLAGS = --no-print-directory AUTOMAKE_OPTIONS = color-tests # remove target it the command fails .DELETE_ON_ERROR: # keep itermediate files .SECONDARY: SUBDIRS = . po LIBPAKFIRE_CURRENT=0 LIBPAKFIRE_REVISION=0 LIBPAKFIRE_AGE=0 libexecdir = $(libdir)/pakfire pythondir = $(pyexecdir) configsdir = $(sysconfdir)/pakfire configsdistrosdir = $(configsdir)/distros dockerdir = $(datadir)/docker macrosdir = $(prefix)/lib/pakfire/macros scriptsdir = $(prefix)/lib/$(PACKAGE_NAME) TEST_ROOTFS = $(abs_top_builddir)/tests/.root BUILT_SOURCES = CLEANFILES = DISTCLEANFILES = EXTRA_DIST = AM_CPPFLAGS = \ -include $(top_builddir)/config.h \ -I $(top_srcdir)/include \ $(OUR_CPPFLAGS) AM_CFLAGS = $(OUR_CFLAGS) \ -ffunction-sections \ -fdata-sections AM_LDFLAGS = $(OUR_LDFLAGS) \ -Wl,--gc-sections \ -Wl,--as-needed AM_YFLAGS = \ -d \ -Wno-yacc PAKFIRE_CPPFLAGS = -I$(top_srcdir)/src/libpakfire/include PAKFIRE_LIBS = libpakfire.la check_PROGRAMS = lib_LTLIBRARIES = libexec_PROGRAMS = noinst_LTLIBRARIES = pkgpyexec_LTLIBRARIES = pkginclude_HEADERS = DISTCHECK_CONFIGURE_FLAGS = \ --with-systemdsystemunitdir=$$dc_install_base/$(systemdsystemunitdir) \ --enable-debug @INTLTOOL_POLICY_RULE@ clean-local: clean-local-check .PHONY: update-po update-po: po/POTFILES.in $(MAKE) -C po update-po po/POTFILES.in: Makefile find $(abs_srcdir)/src | \ grep -E "\.(c|in|py)$$" | sed -e "s@$(abs_srcdir)/@@g" | LC_COLLATE=C sort > $@ # ------------------------------------------------------------------------------ dist_doc_DATA = \ COPYING \ I18N \ README # ------------------------------------------------------------------------------ dist_bin_SCRIPTS = \ src/scripts/pakfire install-exec-local: $(MKDIR_P) $(DESTDIR)/$(bindir) cd $(DESTDIR)/$(bindir) && \ $(LN_S) -vf pakfire pakfire-builder && \ $(LN_S) -vf pakfire pakfire-client && \ $(LN_S) -vf pakfire pakfire-daemon && \ $(LN_S) -vf pakfire pakfire-key # ------------------------------------------------------------------------------ pakfire_PYTHON = \ src/pakfire/__init__.py \ src/pakfire/__version__.py \ src/pakfire/base.py \ src/pakfire/builder.py \ src/pakfire/client.py \ src/pakfire/cli.py \ src/pakfire/config.py \ src/pakfire/constants.py \ src/pakfire/daemon.py \ src/pakfire/errors.py \ src/pakfire/http.py \ src/pakfire/hub.py \ src/pakfire/i18n.py \ src/pakfire/logger.py \ src/pakfire/system.py \ src/pakfire/util.py pakfiredir = $(pythondir)/pakfire # ------------------------------------------------------------------------------ pkgpyexec_LTLIBRARIES += \ _pakfire.la _pakfire_la_SOURCES = \ src/_pakfire/_pakfiremodule.c \ src/_pakfire/archive.c \ src/_pakfire/archive.h \ src/_pakfire/errors.h \ src/_pakfire/key.c \ src/_pakfire/key.h \ src/_pakfire/package.c \ src/_pakfire/package.h \ src/_pakfire/pakfire.c \ src/_pakfire/pakfire.h \ src/_pakfire/parser.c \ src/_pakfire/parser.h \ src/_pakfire/problem.c \ src/_pakfire/problem.h \ src/_pakfire/progressbar.c \ src/_pakfire/progressbar.h \ src/_pakfire/repo.c \ src/_pakfire/repo.h \ src/_pakfire/request.c \ src/_pakfire/request.h \ src/_pakfire/solution.c \ src/_pakfire/solution.h \ src/_pakfire/transaction.c \ src/_pakfire/transaction.h \ src/_pakfire/util.c \ src/_pakfire/util.h _pakfire_la_CPPFLAGS = \ -include $(top_builddir)/config.h \ $(PAKFIRE_CPPFLAGS) _pakfire_la_CFLAGS = \ $(AM_CFLAGS) \ $(PYTHON_DEVEL_CFLAGS) \ -Wno-cast-function-type _pakfire_la_LDFLAGS = \ $(AM_LDFLAGS) \ -shared \ -module \ -avoid-version _pakfire_la_LIBADD = \ $(PYTHON_DEVEL_LIBS) \ $(PAKFIRE_LIBS) # ------------------------------------------------------------------------------ CLEANFILES += \ src/libpakfire/parser/grammar.c \ src/libpakfire/parser/grammar.h \ src/libpakfire/parser/scanner.c noinst_LTLIBRARIES += \ libpakfire-parser.la libpakfire_parser_la_SOURCES = \ src/libpakfire/parser/grammar.h \ src/libpakfire/parser/grammar.y \ src/libpakfire/parser/scanner.l libpakfire_parser_la_CFLAGS = \ $(AM_CFLAGS) libpakfire_parser_la_CPPFLAGS = \ $(AM_CPPFLAGS) \ -I$(top_srcdir)/src/libpakfire/include \ -include $(top_builddir)/config.h \ -DPAKFIRE_PRIVATE BUILT_SOURCES += \ src/libpakfire/parser/grammar.h lib_LTLIBRARIES += \ libpakfire.la libpakfire_la_SOURCES = \ src/libpakfire/arch.c \ src/libpakfire/archive.c \ src/libpakfire/build.c \ src/libpakfire/cgroup.c \ src/libpakfire/compress.c \ src/libpakfire/config.c \ src/libpakfire/db.c \ src/libpakfire/dist.c \ src/libpakfire/downloader.c \ src/libpakfire/execute.c \ src/libpakfire/file.c \ src/libpakfire/filelist.c \ src/libpakfire/key.c \ src/libpakfire/logging.c \ src/libpakfire/package.c \ src/libpakfire/packager.c \ src/libpakfire/packagelist.c \ src/libpakfire/pakfire.c \ src/libpakfire/parser.c \ src/libpakfire/problem.c \ src/libpakfire/progressbar.c \ src/libpakfire/pwd.c \ src/libpakfire/repo.c \ src/libpakfire/repolist.c \ src/libpakfire/request.c \ src/libpakfire/scriptlet.c \ src/libpakfire/snapshot.c \ src/libpakfire/solution.c \ src/libpakfire/transaction.c \ src/libpakfire/ui.c \ src/libpakfire/util.c pkginclude_HEADERS += \ src/libpakfire/include/pakfire/arch.h \ src/libpakfire/include/pakfire/archive.h \ src/libpakfire/include/pakfire/build.h \ src/libpakfire/include/pakfire/cgroup.h \ src/libpakfire/include/pakfire/compress.h \ src/libpakfire/include/pakfire/config.h \ src/libpakfire/include/pakfire/constants.h \ src/libpakfire/include/pakfire/db.h \ src/libpakfire/include/pakfire/dist.h \ src/libpakfire/include/pakfire/downloader.h \ src/libpakfire/include/pakfire/execute.h \ src/libpakfire/include/pakfire/file.h \ src/libpakfire/include/pakfire/filelist.h \ src/libpakfire/include/pakfire/i18n.h \ src/libpakfire/include/pakfire/key.h \ src/libpakfire/include/pakfire/logging.h \ src/libpakfire/include/pakfire/package.h \ src/libpakfire/include/pakfire/packager.h \ src/libpakfire/include/pakfire/packagelist.h \ src/libpakfire/include/pakfire/pakfire.h \ src/libpakfire/include/pakfire/parser.h \ src/libpakfire/include/pakfire/private.h \ src/libpakfire/include/pakfire/problem.h \ src/libpakfire/include/pakfire/progressbar.h \ src/libpakfire/include/pakfire/pwd.h \ src/libpakfire/include/pakfire/repo.h \ src/libpakfire/include/pakfire/repolist.h \ src/libpakfire/include/pakfire/request.h \ src/libpakfire/include/pakfire/scriptlet.h \ src/libpakfire/include/pakfire/snapshot.h \ src/libpakfire/include/pakfire/solution.h \ src/libpakfire/include/pakfire/transaction.h \ src/libpakfire/include/pakfire/types.h \ src/libpakfire/include/pakfire/ui.h \ src/libpakfire/include/pakfire/util.h libpakfire_la_CFLAGS = \ $(AM_CFLAGS) \ -fvisibility=hidden \ $(CURL_CFLAGS) \ $(JSON_C_CFLAGS) \ $(OPENSSL_CFLAGS) \ $(PCRE2_CFLAGS) \ $(SOLV_CFLAGS) \ $(SQLITE3_CFLAGS) \ $(UUID_CFLAGS) \ $(ZSTD_CFLAGS) libpakfire_la_CPPFLAGS = \ $(AM_CPPFLAGS) \ -I$(top_srcdir)/src/libpakfire/include \ -include $(top_builddir)/config.h \ -DPAKFIRE_PRIVATE libpakfire_la_LDFLAGS = \ $(AM_LDFLAGS) \ -version-info $(LIBPAKFIRE_CURRENT):$(LIBPAKFIRE_REVISION):$(LIBPAKFIRE_AGE) \ -Wl,--version-script=$(top_srcdir)/src/libpakfire/libpakfire.sym libpakfire_la_LIBADD = \ libpakfire-parser.la \ $(ARCHIVE_LIBS) \ $(CURL_LIBS) \ $(GPGME_LIBS) \ $(JSON_C_LIBS) \ $(LZMA_LIBS) \ $(OPENSSL_LIBS) \ $(PCRE2_LIBS) \ $(SOLV_LIBS) \ $(SQLITE3_LIBS) \ $(UUID_LIBS) \ $(ZSTD_LIBS) libpakfire_la_DEPENDENCIES = \ src/libpakfire/libpakfire.sym \ libpakfire-parser.la EXTRA_DIST += \ src/libpakfire/libpakfire.sym noinst_LTLIBRARIES += \ libpakfire-internal.la libpakfire_internal_la_SOURCES = \ $(libpakfire_la_SOURCES) libpakfire_internal_la_CPPFLAGS = \ $(libpakfire_la_CPPFLAGS) libpakfire_internal_la_CFLAGS = \ $(libpakfire_la_CFLAGS) libpakfire_internal_la_LDFLAGS = \ $(AM_LDFLAGS) \ -Wl,--version-script=$(top_srcdir)/src/libpakfire/libpakfire.sym libpakfire_internal_la_LIBADD = \ $(libpakfire_la_LIBADD) libpakfire_internal_la_DEPENDENCIES = \ $(libpakfire_la_DEPENDENCIES) check_PROGRAMS += \ tests/libpakfire/main \ tests/libpakfire/arch \ tests/libpakfire/archive \ tests/libpakfire/cgroup \ tests/libpakfire/compress \ tests/libpakfire/config \ tests/libpakfire/db \ tests/libpakfire/downloader \ tests/libpakfire/execute \ tests/libpakfire/key \ tests/libpakfire/makefile \ tests/libpakfire/packager \ tests/libpakfire/parser \ tests/libpakfire/progressbar \ tests/libpakfire/repo \ tests/libpakfire/util dist_tests_libpakfire_main_SOURCES = \ tests/libpakfire/main.c tests_libpakfire_main_CPPFLAGS = \ $(TESTSUITE_CPPFLAGS) \ -DTEST_ROOTFS=\"$(TEST_ROOTFS)\" tests_libpakfire_main_LDADD = \ $(TESTSUITE_LDADD) tests_libpakfire_arch_SOURCES = \ tests/libpakfire/arch.c tests_libpakfire_arch_CPPFLAGS = \ $(TESTSUITE_CPPFLAGS) tests_libpakfire_arch_LDADD = \ $(TESTSUITE_LDADD) tests_libpakfire_archive_SOURCES = \ tests/libpakfire/archive.c tests_libpakfire_archive_CPPFLAGS = \ $(TESTSUITE_CPPFLAGS) tests_libpakfire_archive_LDADD = \ $(TESTSUITE_LDADD) dist_tests_libpakfire_cgroup_SOURCES = \ tests/libpakfire/cgroup.c tests_libpakfire_cgroup_CPPFLAGS = \ $(TESTSUITE_CPPFLAGS) tests_libpakfire_cgroup_LDADD = \ $(TESTSUITE_LDADD) dist_tests_libpakfire_compress_SOURCES = \ tests/libpakfire/compress.c tests_libpakfire_compress_CPPFLAGS = \ $(TESTSUITE_CPPFLAGS) tests_libpakfire_compress_LDADD = \ $(TESTSUITE_LDADD) dist_tests_libpakfire_config_SOURCES = \ tests/libpakfire/config.c tests_libpakfire_config_CPPFLAGS = \ $(TESTSUITE_CPPFLAGS) tests_libpakfire_config_LDADD = \ $(TESTSUITE_LDADD) tests_libpakfire_db_SOURCES = \ tests/libpakfire/db.c tests_libpakfire_db_CPPFLAGS = \ $(TESTSUITE_CPPFLAGS) tests_libpakfire_db_LDADD = \ $(TESTSUITE_LDADD) dist_tests_libpakfire_downloader_SOURCES = \ tests/libpakfire/downloader.c tests_libpakfire_downloader_CPPFLAGS = \ $(TESTSUITE_CPPFLAGS) tests_libpakfire_downloader_LDADD = \ $(TESTSUITE_LDADD) tests_libpakfire_execute_SOURCES = \ tests/libpakfire/execute.c tests_libpakfire_execute_CPPFLAGS = \ $(TESTSUITE_CPPFLAGS) tests_libpakfire_execute_LDADD = \ $(TESTSUITE_LDADD) tests_libpakfire_key_SOURCES = \ tests/libpakfire/key.c \ tests/libpakfire/key.h tests_libpakfire_key_CPPFLAGS = \ $(TESTSUITE_CPPFLAGS) tests_libpakfire_key_LDADD = \ $(TESTSUITE_LDADD) dist_tests_libpakfire_makefile_SOURCES = \ tests/libpakfire/makefile.c tests_libpakfire_makefile_CPPFLAGS = \ $(TESTSUITE_CPPFLAGS) tests_libpakfire_makefile_LDADD = \ $(TESTSUITE_LDADD) dist_tests_libpakfire_packager_SOURCES = \ tests/libpakfire/packager.c tests_libpakfire_packager_CPPFLAGS = \ $(TESTSUITE_CPPFLAGS) tests_libpakfire_packager_LDADD = \ $(TESTSUITE_LDADD) dist_tests_libpakfire_parser_SOURCES = \ tests/libpakfire/parser.c tests_libpakfire_parser_CPPFLAGS = \ $(TESTSUITE_CPPFLAGS) tests_libpakfire_parser_LDADD = \ $(TESTSUITE_LDADD) dist_tests_libpakfire_progressbar_SOURCES = \ tests/libpakfire/progressbar.c tests_libpakfire_progressbar_CPPFLAGS = \ $(TESTSUITE_CPPFLAGS) tests_libpakfire_progressbar_LDADD = \ $(TESTSUITE_LDADD) dist_tests_libpakfire_repo_SOURCES = \ tests/libpakfire/repo.c tests_libpakfire_repo_CPPFLAGS = \ $(TESTSUITE_CPPFLAGS) tests_libpakfire_repo_LDADD = \ $(TESTSUITE_LDADD) dist_tests_libpakfire_util_SOURCES = \ tests/libpakfire/util.c tests_libpakfire_util_CPPFLAGS = \ $(TESTSUITE_CPPFLAGS) tests_libpakfire_util_LDADD = \ $(TESTSUITE_LDADD) # ------------------------------------------------------------------------------ dist_scripts_SCRIPTS = \ src/scripts/check-buildroot \ src/scripts/check-fhs \ src/scripts/check-hardening \ src/scripts/check-include \ src/scripts/check-interpreters \ src/scripts/check-libraries \ src/scripts/check-rpaths \ src/scripts/check-symlinks \ src/scripts/check-unsafe-files \ src/scripts/compress-man-pages \ src/scripts/find-prerequires \ src/scripts/find-provides \ src/scripts/find-requires \ src/scripts/patch \ src/scripts/perl.prov \ src/scripts/perl.req \ src/scripts/py-compile \ src/scripts/remove-static-libs \ src/scripts/strip # ------------------------------------------------------------------------------ dist_macros_DATA = \ macros/arch.macro \ macros/build.macro \ macros/cflags.macro \ macros/constants.macro \ macros/package-default.macro \ macros/perl.macro \ macros/python.macro \ macros/systemd.macro \ macros/templates.macro # ------------------------------------------------------------------------------ if HAVE_SYSTEMD systemdsystemunit_DATA = \ src/systemd/pakfire-daemon.service EXTRA_DIST += \ src/systemd/pakfire-daemon.service.in CLEANFILES += \ src/systemd/pakfire-daemon.service endif # ------------------------------------------------------------------------------ EXTRA_DIST += \ Dockerfile.in docker_DATA = \ Dockerfile .PHONY: docker docker: Dockerfile docker build -t "ipfire/pakfire:$(PACKAGE_VERSION)" . # ------------------------------------------------------------------------------ dist_configs_DATA = \ contrib/config/client.conf \ contrib/config/daemon.conf \ contrib/config/general.conf dist_configsdistros_DATA = \ contrib/config/distros/ipfire3.conf # ------------------------------------------------------------------------------ substitutions = \ '|PACKAGE_NAME=$(PACKAGE_NAME)|' \ '|PACKAGE_VERSION=$(PACKAGE_VERSION)|' \ '|bindir=$(bindir)|' \ '|libexecdir=$(libexecdir)|' SED_PROCESS = \ $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \ $(SED) $(subst '|,-e 's|@,$(subst =,\@|,$(subst |',|g',$(substitutions)))) \ < $< > $@ %: %.in Makefile $(SED_PROCESS) # - testsuite ------------------------------------------------------------------ check_LTLIBRARIES = \ tests/libtestsuite.la tests_libtestsuite_la_SOURCES = \ tests/testsuite.c \ tests/testsuite.h tests_libtestsuite_la_CPPFLAGS = \ $(TESTSUITE_CPPFLAGS) TESTSUITE_CPPFLAGS = \ $(AM_CPPFLAGS) \ $(PAKFIRE_CPPFLAGS) \ -DABS_TOP_SRCDIR=\"$(abs_top_srcdir)\" \ -DTEST_ROOTFS=\"$(TEST_ROOTFS)\" \ -DPAKFIRE_PRIVATE TESTSUITE_LDADD = \ tests/libtestsuite.la \ libpakfire.la \ libpakfire-internal.la TESTS_ENVIRONMENT = \ TEST_DATA_DIR="$(abs_top_srcdir)/tests/data" \ PAKFIRE_LOG=debug \ PYTHONPATH="$(top_srcdir)/.libs:$(top_srcdir)/src" \ topdir="$(shell pwd)" dist_check_SCRIPTS = \ tests/python/execute.py \ tests/python/parser.py \ tests/python/progressbar.py \ tests/python/test.py TESTS = \ $(check_PROGRAMS) \ $(dist_check_SCRIPTS) # Some test data to run tests EXTRA_DIST += \ tests/pakfire.conf \ \ tests/data/726D8B0B0889B04E.key \ tests/data/beep-1.3-2.ip3.x86_64.pfm \ \ tests/data/beep.nm \ tests/data/kernel.nm \ \ tests/data/compress/data.xz \ tests/data/compress/data.zst \ \ tests/data/parser/test-comments.txt \ tests/data/parser/test-conditionals.txt \ tests/data/parser/test-declarations.txt \ tests/data/parser/test-subparsers.txt \ tests/data/parser/perl.info .PHONY: clean-local-check clean-local-check: -rm -rf $(TEST_ROOTFS)/*