]> git.ipfire.org Git - pakfire.git/commitdiff
Install python modules to lib64 on x86_64 systems.
authorMichael Tremer <michael.tremer@ipfire.org>
Fri, 30 Sep 2011 09:56:21 +0000 (11:56 +0200)
committerMichael Tremer <michael.tremer@ipfire.org>
Fri, 30 Sep 2011 09:56:21 +0000 (11:56 +0200)
Makeconfig
Makefile

index 4e41a8dce9f94e94bd34d44a03cfa4fae120db56..1a80f18bfa642e03aab6200e9fd2bf8a6c3429d9 100644 (file)
@@ -6,15 +6,27 @@ PACKAGE_AUTHOR_EMAIL = info@ipfire.org
 PACKAGE_URL     = http://redmine.ipfire.org/projects/buildsystem3
 PACKAGE_VERSION_FILE = pakfire/__version__.py
 
+PREFIX ?= /usr
+
+CC = gcc
+CFLAGS ?= -O2 -pipe
+MACHINE = $(shell uname -m)
+
+ifeq "$(MACHINE)" "x86_64"
+       LIBDIR = $(PREFIX)/lib64
+else
+       LIBDIR = $(PREFIX)/lib
+endif
+
 # Get the version and configuration of the python interpreter.
 PYTHON_VERSION = $(shell python -c "import platform; print '.'.join(platform.python_version_tuple()[:2])")
-PYTHON_CC      = gcc -pthread
+PYTHON_CC      = $(CC) -pthread
 PYTHON_CFLAGS  = $(shell python-config --cflags)
-PYTHON_DIR     = /usr/lib/python$(PYTHON_VERSION)/site-packages
+PYTHON_DIR     = $(LIBDIR)/python$(PYTHON_VERSION)/site-packages
 PYTHON_MODULES = pakfire pakfire/packages pakfire/repository
 
 # The place, where all internally used scripts and bins are copied.
-SCRIPT_DIR     = /usr/lib/$(PACKAGE_NAME)
+SCRIPT_DIR     = $(PREFIX)/lib/$(PACKAGE_NAME)
 
 TOP := $(dir $(lastword $(MAKEFILE_LIST)))
 
index eb308d93cd18520a590b5a49e8b619f7161041ce..3a301557ede17e96b1176af7c44c8de903650ff2 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -28,8 +28,8 @@ install:
                $(MAKE) -C $${dir} install || exit; \
        done
 
-       -mkdir -pv $(DESTDIR)/usr/lib/pakfire/macros
-       cp -vf macros/*.macro $(DESTDIR)/usr/lib/pakfire/macros
+       -mkdir -pv $(DESTDIR)$(PREFIX)/lib/pakfire/macros
+       cp -vf macros/*.macro $(DESTDIR)$(PREFIX)/lib/pakfire/macros
 
        # Install example configuration.
        -mkdir -pv $(DESTDIR)/etc/pakfire.repos.d