diff options
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.patch | 55 |
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 @@ | |||
1 | From dcb8fe0fcf71feac2a4f57c44a5153bfc404b4c3 Mon Sep 17 00:00:00 2001 | ||
2 | From: Cristian Stoica <cristian.stoica@nxp.com> | ||
3 | Date: Thu, 11 Feb 2016 16:37:23 +0200 | ||
4 | Subject: [PATCH 42/43] fix destination for staged installs | ||
5 | |||
6 | The standard variable for staged installations is DESTDIR and it should | ||
7 | be set only by the user, outside of Makefile. This is consistent with | ||
8 | recommendations 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 | ||
13 | files will be installed. It defaults to /usr/local but can be /usr or | ||
14 | /opt or something else. | ||
15 | |||
16 | Usually one wants to do a stage installation when cross-building or for | ||
17 | other purposes. The convention is to use DESTDIR. | ||
18 | Changing $prefix is useful for installers. They can override its value | ||
19 | when calling make: | ||
20 | |||
21 | make prefix=/usr install | ||
22 | |||
23 | Signed-off-by: Cristian Stoica <cristian.stoica@nxp.com> | ||
24 | --- | ||
25 | Makefile | 7 ++++--- | ||
26 | 1 file changed, 4 insertions(+), 3 deletions(-) | ||
27 | |||
28 | diff --git a/Makefile b/Makefile | ||
29 | index 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 | -- | ||
54 | 2.7.0 | ||
55 | |||