Harmonize stages 0 and 2 kernel headers installation
authorHugo Villeneuve <hugo@hugovil.com>
Sat, 27 Dec 2014 05:08:58 +0000 (00:08 -0500)
committerHugo Villeneuve <hugo@hugovil.com>
Sun, 28 Dec 2014 19:55:38 +0000 (14:55 -0500)
stage0/hv-install-2
stage0/pkg/kernel-headers [new file with mode: 0644]
stage0/pkg/linux [deleted file]
stage2/pkg/kernel-headers

index 0fd794c..53694b2 100755 (executable)
@@ -6,7 +6,7 @@ source ../functions/main
 init_log_file
 
 if [ x"${INSTALL_GLIBC}" == x"1" ]; then
-    ipkg -m noac ${KERNEL}
+    ipkg -m noac -l "kernel-headers" -s "kernel-headers" ${KERNEL}
 fi
 
 ipkg ${GMP} "\
diff --git a/stage0/pkg/kernel-headers b/stage0/pkg/kernel-headers
new file mode 100644 (file)
index 0000000..6a67dad
--- /dev/null
@@ -0,0 +1,15 @@
+#!/bin/bash
+
+hvbuild()
+{
+    # Install headers
+    cd ${LFS_TMP}/${PACKAGE}
+
+    local DESTDIR=${TOOLS_DIR}/include
+    install -dv ${DESTDIR}
+
+    ${HVMAKE} mrproper
+    ${HVMAKE} ARCH=${CLFS_ARCH} INSTALL_HDR_PATH=dest headers_install
+    cp -rv dest/include/* ${DESTDIR}
+    find ${DESTDIR} -name .install -or -name ..install.cmd | xargs rm -fv
+}
diff --git a/stage0/pkg/linux b/stage0/pkg/linux
deleted file mode 100644 (file)
index 19781c7..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-#!/bin/bash
-
-hvbuild()
-{
-    cd ${LFS_TMP}/${PACKAGE}
-
-    ${HVMAKE} mrproper
-    ${HVMAKE} ARCH=${CLFS_ARCH} INSTALL_HDR_PATH=dest headers_install
-    install -dv ${TOOLS_DIR}/include
-    cp -rv dest/include/* ${TOOLS_DIR}/include
-}
index 56fee46..35810b3 100644 (file)
@@ -5,8 +5,10 @@ hvbuild()
     # Install headers
     cd ${LFS_TMP}/${PACKAGE}
 
-    make mrproper
-    make INSTALL_HDR_PATH=dest headers_install
-    cp -rv dest/include/* /usr/include
-    find /usr/include -name .install -or -name ..install.cmd | xargs rm -fv
+    local DESTDIR=/usr/include
+
+    ${HVMAKE} mrproper
+    ${HVMAKE} INSTALL_HDR_PATH=dest headers_install
+    cp -rv dest/include/* ${DESTDIR}
+    find ${DESTDIR} -name .install -or -name ..install.cmd | xargs rm -fv
 }