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