criu/plugin-dir-path.patch

44 lines
1.1 KiB
Diff

---
Makefile.install | 3 ++-
criu/Makefile | 3 +++
criu/include/plugin.h | 2 +-
3 files changed, 6 insertions(+), 2 deletions(-)
--- a/Makefile.install
+++ b/Makefile.install
@@ -5,9 +5,10 @@ BINDIR ?= $(PREFIX)/bin
SBINDIR ?= $(PREFIX)/sbin
MANDIR ?= $(PREFIX)/share/man
INCLUDEDIR ?= $(PREFIX)/include
+LIBDIR ?= $(PREFIX)/lib
LIBEXECDIR ?= $(PREFIX)/libexec
RUNDIR ?= /run
-PLUGINDIR ?= $(PREFIX)/lib/criu
+PLUGINDIR ?= $(LIBDIR)/criu
#
# For recent Debian/Ubuntu with multiarch support.
--- a/criu/include/plugin.h
+++ b/criu/include/plugin.h
@@ -6,7 +6,7 @@
#include "common/list.h"
#ifndef CR_PLUGIN_DEFAULT
-#define CR_PLUGIN_DEFAULT "/usr/lib/criu/"
+#define CR_PLUGIN_DEFAULT LIBDIR "/criu/"
#endif
void cr_plugin_fini(int stage, int err);
--- a/criu/Makefile
+++ b/criu/Makefile
@@ -29,6 +29,9 @@ CFLAGS += -iquote $(ARCH_DIR)/include
CFLAGS += -iquote .
CFLAGS += $(shell $(PKG_CONFIG) --cflags libnl-3.0)
CFLAGS += $(CONFIG-DEFINES)
+CFLAGS += -DINCLUDEDIR=\"$(INCLUDEDIR)\"
+CFLAGS += -DLIBEXECDIR=\"$(LIBEXECDIR)\"
+CFLAGS += -DLIBDIR=\"$(LIBDIR)\"
ifeq ($(GMON),1)
CFLAGS += -pg