]> git.ipfire.org Git - pakfire.git/blob - Makefile.am
compress: Remove legacy logger
[pakfire.git] / Makefile.am
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
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 libexecdir = $(libdir)/pakfire
34 pythondir = $(pyexecdir)
35
36 configsdir = $(sysconfdir)/pakfire
37 configsdistrosdir = $(configsdir)/distros
38 dockerdir = $(datadir)/docker
39 macrosdir = $(prefix)/lib/pakfire/macros
40 qualityagentdir = $(prefix)/lib/quality-agent
41 scriptsdir = $(prefix)/lib/$(PACKAGE_NAME)
42
43 CLEANFILES =
44 DISTCLEANFILES =
45 EXTRA_DIST =
46
47 AM_CPPFLAGS = \
48 -include $(top_builddir)/config.h \
49 -I $(top_srcdir)/include \
50 $(OUR_CPPFLAGS)
51
52 AM_CFLAGS = $(OUR_CFLAGS)
53 AM_LDFLAGS = $(OUR_LDFLAGS)
54
55 lib_LTLIBRARIES =
56 libexec_PROGRAMS =
57 pkgpyexec_LTLIBRARIES =
58
59 DISTCHECK_CONFIGURE_FLAGS = \
60 --with-systemdsystemunitdir=$$dc_install_base/$(systemdsystemunitdir)
61
62 @INTLTOOL_POLICY_RULE@
63
64 .PHONY: update-po
65 update-po:
66 $(MAKE) -C po update-po
67
68 # ------------------------------------------------------------------------------
69
70 dist_doc_DATA = \
71 COPYING \
72 I18N \
73 README
74
75 # ------------------------------------------------------------------------------
76
77 dist_bin_SCRIPTS = \
78 src/scripts/pakfire
79
80 install-exec-local:
81 $(MKDIR_P) $(DESTDIR)/$(bindir)
82 cd $(DESTDIR)/$(bindir) && \
83 $(LN_S) -vf pakfire pakfire-builder && \
84 $(LN_S) -vf pakfire pakfire-client && \
85 $(LN_S) -vf pakfire pakfire-daemon && \
86 $(LN_S) -vf pakfire pakfire-key
87
88 $(MKDIR_P) $(DESTDIR)/$(scriptsdir)
89 cd $(DESTDIR)/$(scriptsdir) && \
90 $(LN_S) -vf ../../bin/pakfire builder
91
92 # ------------------------------------------------------------------------------
93
94 pakfire_PYTHON = \
95 src/pakfire/__init__.py \
96 src/pakfire/__version__.py \
97 src/pakfire/actions.py \
98 src/pakfire/base.py \
99 src/pakfire/builder.py \
100 src/pakfire/cgroup.py \
101 src/pakfire/client.py \
102 src/pakfire/cli.py \
103 src/pakfire/compress.py \
104 src/pakfire/config.py \
105 src/pakfire/constants.py \
106 src/pakfire/daemon.py \
107 src/pakfire/distro.py \
108 src/pakfire/downloader.py \
109 src/pakfire/errors.py \
110 src/pakfire/filelist.py \
111 src/pakfire/i18n.py \
112 src/pakfire/keyring.py \
113 src/pakfire/logger.py \
114 src/pakfire/lzma.py \
115 src/pakfire/progressbar.py \
116 src/pakfire/satsolver.py \
117 src/pakfire/server.py \
118 src/pakfire/shell.py \
119 src/pakfire/system.py \
120 src/pakfire/transaction.py \
121 src/pakfire/transport.py \
122 src/pakfire/util.py
123
124 pakfiredir = $(pythondir)/pakfire
125
126 # ------------------------------------------------------------------------------
127
128 pakfire_packages_PYTHON = \
129 src/pakfire/packages/__init__.py \
130 src/pakfire/packages/base.py \
131 src/pakfire/packages/file.py \
132 src/pakfire/packages/installed.py \
133 src/pakfire/packages/lexer.py \
134 src/pakfire/packages/make.py \
135 src/pakfire/packages/packager.py \
136 src/pakfire/packages/solv.py \
137 src/pakfire/packages/tar.py
138
139 pakfire_packagesdir = $(pythondir)/pakfire/packages
140
141 # ------------------------------------------------------------------------------
142
143 pakfire_repository_PYTHON = \
144 src/pakfire/repository/__init__.py \
145 src/pakfire/repository/base.py \
146 src/pakfire/repository/cache.py \
147 src/pakfire/repository/database.py \
148 src/pakfire/repository/index.py \
149 src/pakfire/repository/local.py \
150 src/pakfire/repository/metadata.py \
151 src/pakfire/repository/remote.py \
152 src/pakfire/repository/system.py
153
154 pakfire_repositorydir = $(pythondir)/pakfire/repository
155
156 # ------------------------------------------------------------------------------
157
158 pkgpyexec_LTLIBRARIES += \
159 _lzma.la
160
161 _lzma_la_SOURCES = \
162 src/_lzma/_lzmamodule.c
163
164 _lzma_la_CFLAGS = \
165 $(AM_CFLAGS) \
166 $(PYTHON_DEVEL_CFLAGS) \
167 $(LZMA_CFLAGS)
168
169 _lzma_la_LDFLAGS = \
170 $(AM_LDFLAGS) \
171 -shared \
172 -module \
173 -avoid-version
174
175 _lzma_la_LIBADD = \
176 $(PYTHON_DEVEL_LIBS) \
177 $(LZMA_LIBS)
178
179 # ------------------------------------------------------------------------------
180
181 pkgpyexec_LTLIBRARIES += \
182 _pakfire.la
183
184 _pakfire_la_SOURCES = \
185 src/_pakfire/_pakfiremodule.c \
186 src/_pakfire/capabilities.c \
187 src/_pakfire/capabilities.h \
188 src/_pakfire/constants.h \
189 src/_pakfire/pool.c \
190 src/_pakfire/pool.h \
191 src/_pakfire/problem.c \
192 src/_pakfire/problem.h \
193 src/_pakfire/relation.c \
194 src/_pakfire/relation.h \
195 src/_pakfire/repo.c \
196 src/_pakfire/repo.h \
197 src/_pakfire/request.c \
198 src/_pakfire/request.h \
199 src/_pakfire/solution.c \
200 src/_pakfire/solution.h \
201 src/_pakfire/solvable.c \
202 src/_pakfire/solvable.h \
203 src/_pakfire/solver.c \
204 src/_pakfire/solver.h \
205 src/_pakfire/step.c \
206 src/_pakfire/step.h \
207 src/_pakfire/transaction.c \
208 src/_pakfire/transaction.h \
209 src/_pakfire/util.c \
210 src/_pakfire/util.h
211
212 _pakfire_la_CFLAGS = \
213 $(AM_CFLAGS) \
214 $(PYTHON_DEVEL_CFLAGS) \
215 $(CAP_CFLAGS) \
216 $(SOLV_CFLAGS)
217
218 _pakfire_la_LDFLAGS = \
219 $(AM_LDFLAGS) \
220 -shared \
221 -module \
222 -avoid-version
223
224 _pakfire_la_LIBADD = \
225 $(PYTHON_DEVEL_LIBS) \
226 $(CAP_LIBS) \
227 $(SOLV_LIBS)
228
229 # ------------------------------------------------------------------------------
230
231 lib_LTLIBRARIES += \
232 libpakfire_preload.la
233
234 libpakfire_preload_la_SOURCES = \
235 src/libpakfire_preload/uname.c
236
237 libpakfire_preload_la_LDFLAGS = \
238 $(AM_LDFLAGS) \
239 -shared \
240 -module \
241 -avoid-version
242
243 libpakfire_preload_la_LIBADD = \
244 $(DL_LIBS)
245
246 # ------------------------------------------------------------------------------
247
248 scripts_SCRIPTS = \
249 src/scripts/extract-debuginfo \
250 src/scripts/quality-agent
251
252 EXTRA_DIST += \
253 src/scripts/extract-debuginfo.in \
254 src/scripts/quality-agent.in
255
256 CLEANFILES += \
257 src/scripts/extract-debuginfo \
258 src/scripts/quality-agent
259
260 dist_scripts_SCRIPTS = \
261 src/scripts/chroot-shell \
262 src/scripts/cleanup \
263 src/scripts/compress-man-pages \
264 src/scripts/find-common \
265 src/scripts/find-prerequires \
266 src/scripts/find-provides \
267 src/scripts/find-requires \
268 src/scripts/patch \
269 src/scripts/perl.prov \
270 src/scripts/perl.req \
271 src/scripts/py-compile \
272 src/scripts/remove-static-libs
273
274 dist_scripts_DATA = \
275 src/scripts/functions-common \
276 src/scripts/functions-constants \
277 src/scripts/functions-directories \
278 src/scripts/functions-files \
279 src/scripts/functions-lists \
280 src/scripts/functions-logging
281
282 # ------------------------------------------------------------------------------
283
284 dist_qualityagent_SCRIPTS = \
285 src/quality-agent/001-include-files \
286 src/quality-agent/001-remove-info-files \
287 src/quality-agent/001-unsafe-files \
288 src/quality-agent/002-bad-symlinks \
289 src/quality-agent/003-libs-location \
290 src/quality-agent/050-canary \
291 src/quality-agent/050-execstacks \
292 src/quality-agent/050-invalid-interpreters \
293 src/quality-agent/050-libs-needed \
294 src/quality-agent/050-libs-soname \
295 src/quality-agent/050-libs-x86_64 \
296 src/quality-agent/050-nx \
297 src/quality-agent/050-relro \
298 src/quality-agent/050-rpaths \
299 src/quality-agent/095-directory-layout
300
301 dist_qualityagent_DATA = \
302 src/quality-agent/qa-include
303
304 # ------------------------------------------------------------------------------
305
306 dist_macros_DATA = \
307 macros/arch.macro \
308 macros/build.macro \
309 macros/cflags.macro \
310 macros/constants.macro \
311 macros/package-default.macro \
312 macros/perl.macro \
313 macros/python.macro \
314 macros/quality-agent.macro \
315 macros/systemd.macro \
316 macros/templates.macro
317
318 # ------------------------------------------------------------------------------
319
320 if HAVE_SYSTEMD
321 systemdsystemunit_DATA = \
322 src/systemd/pakfire-daemon.service
323
324 EXTRA_DIST += \
325 src/systemd/pakfire-daemon.service.in
326
327 CLEANFILES += \
328 src/systemd/pakfire-daemon.service
329 endif
330
331 # ------------------------------------------------------------------------------
332
333 EXTRA_DIST += \
334 Dockerfile.in
335
336 docker_DATA = \
337 Dockerfile
338
339 .PHONY: docker
340 docker: Dockerfile
341 docker build -t "ipfire/pakfire:$(PACKAGE_VERSION)" .
342
343 # ------------------------------------------------------------------------------
344
345 dist_configs_DATA = \
346 contrib/config/builder.conf \
347 contrib/config/client.conf \
348 contrib/config/daemon.conf \
349 contrib/config/general.conf
350
351 dist_configsdistros_DATA = \
352 contrib/config/distros/ipfire3.conf
353
354 # ------------------------------------------------------------------------------
355
356 substitutions = \
357 '|PACKAGE_NAME=$(PACKAGE_NAME)|' \
358 '|PACKAGE_VERSION=$(PACKAGE_VERSION)|' \
359 '|bindir=$(bindir)|' \
360 '|libexecdir=$(libexecdir)|' \
361 '|qualityagentdir=$(qualityagentdir)|'
362
363 SED_PROCESS = \
364 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
365 $(SED) $(subst '|,-e 's|@,$(subst =,\@|,$(subst |',|g',$(substitutions)))) \
366 < $< > $@
367
368 %: %.in Makefile
369 $(SED_PROCESS)
370
371 # - testsuite ------------------------------------------------------------------
372
373 TESTS_ENVIRONMENT = \
374 PYTHONPATH="$(top_srcdir)/.libs:$(top_srcdir)/src" \
375 topdir="$(shell pwd)"
376
377 dist_check_SCRIPTS = \
378 tests/module-load.py
379
380 TESTS = \
381 $(dist_check_SCRTIPS)