adapt debian/rules to ZFS 0.8 structure

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
This commit is contained in:
Stoiko Ivanov 2019-05-24 14:40:35 +02:00 committed by Thomas Lamprecht
parent 5fa6b6aee2
commit 1de1353133

18
debian/rules vendored
View File

@ -105,7 +105,7 @@ binary: install
${MAKE} -C ${KERNEL_SRC} INSTALL_MOD_PATH=${BUILD_DIR}/debian/${PVE_KERNEL_PKG}/ modules_install
# install zfs drivers
install -d -m 0755 debian/${PVE_KERNEL_PKG}/lib/modules/${KVNAME}/zfs
install -m 644 $(addprefix ${MODULES}/,spl.ko splat.ko zfs.ko zavl.ko znvpair.ko zunicode.ko zcommon.ko zpios.ko icp.ko) debian/${PVE_KERNEL_PKG}/lib/modules/${KVNAME}/zfs
install -m 644 $(addprefix ${MODULES}/,zfs.ko zavl.ko znvpair.ko zunicode.ko zcommon.ko icp.ko zlua.ko spl.ko) debian/${PVE_KERNEL_PKG}/lib/modules/${KVNAME}/zfs
# remove firmware
rm -rf debian/${PVE_KERNEL_PKG}/lib/firmware
# strip debug info
@ -188,27 +188,21 @@ binary: install
ln -sf /usr/src/linux-headers-${KVNAME} debian/${PVE_HEADER_PKG}/lib/modules/${KVNAME}/build
touch $@
.modules_compile_mark: $(addprefix ${MODULES}/,spl.ko zfs.ko)
.modules_compile_mark: ${MODULES}/zfs.ko
touch $@
${MODULES}/spl.ko: .compile_mark
cd ${MODULES}/${SPLDIR}; ./autogen.sh
cd ${MODULES}/${SPLDIR}; ./configure --with-config=kernel --with-linux=${BUILD_DIR}/${KERNEL_SRC} --with-linux-obj=${BUILD_DIR}/${KERNEL_SRC}
${MAKE} -C ${MODULES}/${SPLDIR}
cp ${MODULES}/${SPLDIR}/module/splat/splat.ko ${MODULES}/
cp ${MODULES}/${SPLDIR}/module/spl/spl.ko ${MODULES}/
${MODULES}/zfs.ko: .compile_mark ${MODULES}/spl.ko
${MODULES}/zfs.ko: .compile_mark
cd ${MODULES}/${ZFSDIR}; ./autogen.sh
cd ${MODULES}/${ZFSDIR}; ./configure --with-spl=${BUILD_DIR}/${MODULES}/${SPLDIR} --with-spl-obj=${BUILD_DIR}/${MODULES}/${SPLDIR} --with-config=kernel --with-linux=${BUILD_DIR}/${KERNEL_SRC} --with-linux-obj=${BUILD_DIR}/${KERNEL_SRC}
cd ${MODULES}/${ZFSDIR}; ./configure --with-config=kernel --with-linux=${BUILD_DIR}/${KERNEL_SRC} --with-linux-obj=${BUILD_DIR}/${KERNEL_SRC}
${MAKE} -C ${MODULES}/${ZFSDIR}
cp ${MODULES}/${ZFSDIR}/module/avl/zavl.ko ${MODULES}/
cp ${MODULES}/${ZFSDIR}/module/nvpair/znvpair.ko ${MODULES}/
cp ${MODULES}/${ZFSDIR}/module/unicode/zunicode.ko ${MODULES}/
cp ${MODULES}/${ZFSDIR}/module/zcommon/zcommon.ko ${MODULES}/
cp ${MODULES}/${ZFSDIR}/module/zpios/zpios.ko ${MODULES}/
cp ${MODULES}/${ZFSDIR}/module/icp/icp.ko ${MODULES}/
cp ${MODULES}/${ZFSDIR}/module/zfs/zfs.ko ${MODULES}/
cp ${MODULES}/${ZFSDIR}/module/lua/zlua.ko ${MODULES}/
cp ${MODULES}/${ZFSDIR}/module/spl/spl.ko ${MODULES}/
fwlist-${KVNAME}: .compile_mark .modules_compile_mark
debian/scripts/find-firmware.pl debian/${PVE_KERNEL_PKG}/lib/modules/${KVNAME} >fwlist.tmp