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