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