]>
Commit | Line | Data |
---|---|---|
a1388014 MT |
1 | |
2 | PACKAGE_NAME = pakfire | |
8167c25c | 3 | PACKAGE_VERSION = 0.9.25 |
a1388014 MT |
4 | PACKAGE_AUTHOR = IPFire.org Team |
5 | PACKAGE_AUTHOR_EMAIL = info@ipfire.org | |
8167c25c | 6 | PACKAGE_URL = http://git.ipfire.org/?p=pakfire.git;a=summary |
a1388014 MT |
7 | PACKAGE_VERSION_FILE = pakfire/__version__.py |
8 | ||
0f3048cf MT |
9 | PREFIX ?= /usr |
10 | ||
6ed1beb5 MT |
11 | # Are we running on Debian? |
12 | DEBIAN = $(shell test -e /etc/debian_version && echo 1 || echo 0) | |
13 | ||
0f3048cf | 14 | CC = gcc |
56701ddc | 15 | CFLAGS ?= -O2 -fPIC -pipe |
0f3048cf MT |
16 | MACHINE = $(shell uname -m) |
17 | ||
a99f6372 MT |
18 | ifeq "$(DEBIAN)" "0" |
19 | ifeq "$(MACHINE)" "x86_64" | |
0f3048cf | 20 | LIBDIR = $(PREFIX)/lib64 |
a99f6372 | 21 | else |
0f3048cf | 22 | LIBDIR = $(PREFIX)/lib |
a99f6372 MT |
23 | endif |
24 | else | |
25 | LIBDIR = $(PREFIX)/lib | |
0f3048cf MT |
26 | endif |
27 | ||
a1388014 MT |
28 | # Get the version and configuration of the python interpreter. |
29 | PYTHON_VERSION = $(shell python -c "import platform; print '.'.join(platform.python_version_tuple()[:2])") | |
b71ac2e9 MT |
30 | ifeq "$(PYTHON_VERSION)" "" |
31 | $(error Could not determine the version of the python interpreter.) | |
32 | endif | |
33 | ||
57088b0c | 34 | PYTHON_CC = $(CC) -pthread -fPIC |
a1388014 | 35 | PYTHON_CFLAGS = $(shell python-config --cflags) |
aa14071d | 36 | PYTHON_MODULES = pakfire pakfire/packages pakfire/repository |
6ed1beb5 MT |
37 | ifeq "$(DEBIAN)" "1" |
38 | PYTHON_DIR = $(LIBDIR)/python$(PYTHON_VERSION)/dist-packages | |
39 | else | |
40 | PYTHON_DIR = $(LIBDIR)/python$(PYTHON_VERSION)/site-packages | |
41 | endif | |
8be83109 MT |
42 | PYTHON_FILES = $(addsuffix /*.py,$(addprefix python/,$(PYTHON_MODULES))) |
43 | PYTHON_FILES += tools/pakfire-multicall.py | |
a1388014 MT |
44 | |
45 | # The place, where all internally used scripts and bins are copied. | |
0f3048cf | 46 | SCRIPT_DIR = $(PREFIX)/lib/$(PACKAGE_NAME) |
a1388014 MT |
47 | |
48 | TOP := $(dir $(lastword $(MAKEFILE_LIST))) | |
49 | ||
50 | # A list of all files that contain translations and need to | |
51 | # be indexed. | |
8be83109 | 52 | TRANS_FILES = $(PYTHON_FILES) python/src/*.c |
cf130129 MT |
53 | |
54 | # systemd unit files | |
55 | UNIT_FILES = $(wildcard systemd/*.service) |