summaryrefslogtreecommitdiffstats
path: root/recipes-kernel/cryptodev/sdk_patches/0042-fix-destination-for-staged-installs.patch
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-kernel/cryptodev/sdk_patches/0042-fix-destination-for-staged-installs.patch')
-rw-r--r--recipes-kernel/cryptodev/sdk_patches/0042-fix-destination-for-staged-installs.patch55
1 files changed, 55 insertions, 0 deletions
diff --git a/recipes-kernel/cryptodev/sdk_patches/0042-fix-destination-for-staged-installs.patch b/recipes-kernel/cryptodev/sdk_patches/0042-fix-destination-for-staged-installs.patch
new file mode 100644
index 0000000..c8ae06e
--- /dev/null
+++ b/recipes-kernel/cryptodev/sdk_patches/0042-fix-destination-for-staged-installs.patch
@@ -0,0 +1,55 @@
1From dcb8fe0fcf71feac2a4f57c44a5153bfc404b4c3 Mon Sep 17 00:00:00 2001
2From: Cristian Stoica <cristian.stoica@nxp.com>
3Date: Thu, 11 Feb 2016 16:37:23 +0200
4Subject: [PATCH 42/43] fix destination for staged installs
5
6The standard variable for staged installations is DESTDIR and it should
7be set only by the user, outside of Makefile. This is consistent with
8recommendations from both GNU Make and FreeBSD porters-handbook.
9
10 make DESTDIR=/tmp/stage install
11
12$prefix and $PREFIX (in FreeBSD world) are used to specify where the
13files will be installed. It defaults to /usr/local but can be /usr or
14/opt or something else.
15
16Usually one wants to do a stage installation when cross-building or for
17other purposes. The convention is to use DESTDIR.
18Changing $prefix is useful for installers. They can override its value
19when calling make:
20
21 make prefix=/usr install
22
23Signed-off-by: Cristian Stoica <cristian.stoica@nxp.com>
24---
25 Makefile | 7 ++++---
26 1 file changed, 4 insertions(+), 3 deletions(-)
27
28diff --git a/Makefile b/Makefile
29index 7f8df37..9871a8e 100644
30--- a/Makefile
31+++ b/Makefile
32@@ -7,7 +7,9 @@ CRYPTODEV_CFLAGS ?= #-DENABLE_ASYNC
33 KBUILD_CFLAGS += -I$(src) $(CRYPTODEV_CFLAGS)
34 KERNEL_DIR ?= /lib/modules/$(shell uname -r)/build
35 VERSION = 1.8
36-PREFIX ?=
37+
38+prefix ?= /usr/local
39+includedir = $(prefix)/include
40
41 cryptodev-objs = ioctl.o main.o cryptlib.o authenc.o zc.o util.o
42
43@@ -31,8 +33,7 @@ install: modules_install
44
45 modules_install:
46 $(MAKE) -C $(KERNEL_DIR) M=$(PWD) modules_install
47- @echo "Installing cryptodev.h in $(PREFIX)/usr/include/crypto ..."
48- @install -D crypto/cryptodev.h $(PREFIX)/usr/include/crypto/cryptodev.h
49+ install -m 644 -D crypto/cryptodev.h $(DESTDIR)/$(includedir)/crypto/cryptodev.h
50
51 clean:
52 $(MAKE) -C $(KERNEL_DIR) M=$(PWD) clean
53--
542.7.0
55