summary refs log tree commit diff
path: root/pkgs/os-specific/linux/spl/install_prefix.patch
blob: 114ca123147020ce8f6ba8349779474c9d997911 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
diff --git a/Makefile.am b/Makefile.am
index 4977448..ac17217 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -12,10 +12,10 @@ endif
 if CONFIG_KERNEL
 SUBDIRS += module
 
-extradir = @prefix@/src/spl-$(VERSION)
+extradir = @prefix@/libexec/spl
 extra_HEADERS = spl.release.in spl_config.h.in
 
-kerneldir = @prefix@/src/spl-$(VERSION)/$(LINUX_VERSION)
+kerneldir = @prefix@/libexec/spl/$(LINUX_VERSION)
 nodist_kernel_HEADERS = spl.release spl_config.h module/$(LINUX_SYMBOLS)
 endif
 
diff --git a/include/Makefile.am b/include/Makefile.am
index 3200222..4a47aaa 100644
--- a/include/Makefile.am
+++ b/include/Makefile.am
@@ -13,6 +13,6 @@ USER_H =
 EXTRA_DIST = $(COMMON_H) $(KERNEL_H) $(USER_H)
 
 if CONFIG_KERNEL
-kerneldir = @prefix@/src/spl-$(VERSION)/include
+kerneldir = @prefix@/libexec/spl/include
 kernel_HEADERS = $(KERNEL_H)
 endif
diff --git a/include/fs/Makefile.am b/include/fs/Makefile.am
index e0da4b3..d6d7af0 100644
--- a/include/fs/Makefile.am
+++ b/include/fs/Makefile.am
@@ -8,6 +8,6 @@ USER_H =
 EXTRA_DIST = $(COMMON_H) $(KERNEL_H) $(USER_H)
 
 if CONFIG_KERNEL
-kerneldir = @prefix@/src/spl-$(VERSION)/include/fs
+kerneldir = @prefix@/libexec/spl/include/fs
 kernel_HEADERS = $(KERNEL_H)
 endif
diff --git a/include/linux/Makefile.am b/include/linux/Makefile.am
index 712e94e..4af9fb7 100644
--- a/include/linux/Makefile.am
+++ b/include/linux/Makefile.am
@@ -18,6 +18,6 @@ USER_H =
 EXTRA_DIST = $(COMMON_H) $(KERNEL_H) $(USER_H)
 
 if CONFIG_KERNEL
-kerneldir = @prefix@/src/spl-$(VERSION)/include/linux
+kerneldir = @prefix@/libexec/spl/include/linux
 kernel_HEADERS = $(KERNEL_H)
 endif
diff --git a/include/rpc/Makefile.am b/include/rpc/Makefile.am
index cfc8246..4fbd33d 100644
--- a/include/rpc/Makefile.am
+++ b/include/rpc/Makefile.am
@@ -9,6 +9,6 @@ USER_H =
 EXTRA_DIST = $(COMMON_H) $(KERNEL_H) $(USER_H)
 
 if CONFIG_KERNEL
-kerneldir = @prefix@/src/spl-$(VERSION)/include/rpc
+kerneldir = @prefix@/libexec/spl/include/rpc
 kernel_HEADERS = $(KERNEL_H)
 endif
diff --git a/include/sharefs/Makefile.am b/include/sharefs/Makefile.am
index 10e7093..febecdf 100644
--- a/include/sharefs/Makefile.am
+++ b/include/sharefs/Makefile.am
@@ -8,6 +8,6 @@ USER_H =
 EXTRA_DIST = $(COMMON_H) $(KERNEL_H) $(USER_H)
 
 if CONFIG_KERNEL
-kerneldir = @prefix@/src/spl-$(VERSION)/include/sharefs
+kerneldir = @prefix@/libexec/spl/include/sharefs
 kernel_HEADERS = $(KERNEL_H)
 endif
diff --git a/include/sys/Makefile.am b/include/sys/Makefile.am
index 73c4a84..31a9f50 100644
--- a/include/sys/Makefile.am
+++ b/include/sys/Makefile.am
@@ -107,7 +107,7 @@ USER_H =
 EXTRA_DIST = $(COMMON_H) $(KERNEL_H) $(USER_H)
 
 if CONFIG_KERNEL
-kerneldir = @prefix@/src/spl-$(VERSION)/include/sys
+kerneldir = @prefix@/libexec/spl/include/sys
 kernel_HEADERS = $(KERNEL_H)
 endif
 
diff --git a/include/sys/fm/Makefile.am b/include/sys/fm/Makefile.am
index 2821cbe..a84ce8e 100644
--- a/include/sys/fm/Makefile.am
+++ b/include/sys/fm/Makefile.am
@@ -9,6 +9,6 @@ USER_H =
 EXTRA_DIST = $(COMMON_H) $(KERNEL_H) $(USER_H)
 
 if CONFIG_KERNEL
-kerneldir = @prefix@/src/spl-$(VERSION)/include/sys/fm
+kerneldir = @prefix@/libexec/spl/include/sys/fm
 kernel_HEADERS = $(KERNEL_H)
 endif
diff --git a/include/sys/fs/Makefile.am b/include/sys/fs/Makefile.am
index 581083e..0c35fb7 100644
--- a/include/sys/fs/Makefile.am
+++ b/include/sys/fs/Makefile.am
@@ -8,6 +8,6 @@ USER_H =
 EXTRA_DIST = $(COMMON_H) $(KERNEL_H) $(USER_H)
 
 if CONFIG_KERNEL
-kerneldir = @prefix@/src/spl-$(VERSION)/include/sys/fs
+kerneldir = @prefix@/libexec/spl/include/sys/fs
 kernel_HEADERS = $(KERNEL_H)
 endif
diff --git a/include/util/Makefile.am b/include/util/Makefile.am
index e2bf09f..3f5d6ce 100644
--- a/include/util/Makefile.am
+++ b/include/util/Makefile.am
@@ -9,6 +9,6 @@ USER_H =
 EXTRA_DIST = $(COMMON_H) $(KERNEL_H) $(USER_H)
 
 if CONFIG_KERNEL
-kerneldir = @prefix@/src/spl-$(VERSION)/include/util
+kerneldir = @prefix@/libexec/spl/include/util
 kernel_HEADERS = $(KERNEL_H)
 endif
diff --git a/include/vm/Makefile.am b/include/vm/Makefile.am
index 7faab0a..8148b3d 100644
--- a/include/vm/Makefile.am
+++ b/include/vm/Makefile.am
@@ -10,6 +10,6 @@ USER_H =
 EXTRA_DIST = $(COMMON_H) $(KERNEL_H) $(USER_H)
 
 if CONFIG_KERNEL
-kerneldir = @prefix@/src/spl-$(VERSION)/include/vm
+kerneldir = @prefix@/libexec/spl/include/vm
 kernel_HEADERS = $(KERNEL_H)
 endif
diff --git a/module/Makefile.in b/module/Makefile.in
index d4e62e1..73fa01c 100644
--- a/module/Makefile.in
+++ b/module/Makefile.in
@@ -21,15 +21,15 @@ clean:
 modules_install:
 	@# Install the kernel modules
 	$(MAKE) -C @LINUX_OBJ@ SUBDIRS=`pwd` $@ \
-		INSTALL_MOD_PATH=$(DESTDIR)$(INSTALL_MOD_PATH) \
+		INSTALL_MOD_PATH=@prefix@/$(INSTALL_MOD_PATH) \
 		INSTALL_MOD_DIR=$(INSTALL_MOD_DIR) \
 		KERNELRELEASE=@LINUX_VERSION@
 	@# Remove extraneous build products when packaging
-	kmoddir=$(DESTDIR)$(INSTALL_MOD_PATH)/lib/modules/@LINUX_VERSION@; \
-	if [ -n "$(DESTDIR)" ]; then \
+	kmoddir=@prefix@/$(INSTALL_MOD_PATH)/lib/modules/@LINUX_VERSION@; \
+	if [ -n "@prefix@" ]; then \
 		find $$kmoddir -name 'modules.*' | xargs $(RM); \
 	fi
-	sysmap=$(DESTDIR)$(INSTALL_MOD_PATH)/boot/System.map-@LINUX_VERSION@; \
+	sysmap=@prefix@/$(INSTALL_MOD_PATH)/boot/System.map-@LINUX_VERSION@; \
 	if [ -f $$sysmap ]; then \
 		depmod -ae -F $$sysmap @LINUX_VERSION@; \
 	fi