Implement install_sources function.

This commit is contained in:
inference 2022-12-30 13:29:44 +00:00
parent 4202042a53
commit 2c604a00cf

View File

@ -19,3 +19,30 @@ KEYWORDS="~amd64 ~arm64"
src_unpack() { src_unpack() {
default default
} }
install_sources() {
local file
cd "${S}" || die
dodir /usr/src
einfo ">>> Copying sources ..."
file="$(find ${WORKDIR} -iname "docs" -type d)"
if [[ -n ${file} ]]; then
for file in $(find ${file} -type f); do
echo "${file//*docs\/}" >> "${S}"/patches.txt
echo "===================================================" >> "${S}"/patches.txt
cat ${file} >> "${S}"/patches.txt
echo "===================================================" >> "${S}"/patches.txt
echo "" >> "${S}"/patches.txt
done
fi
mv "${WORKDIR}"/inf-kernel* "${ED}"/src || die
if [[ -n ${UNIPATCH_DOCS} ]]; then
for i in ${UNIPATCH_DOCS}; do
dodoc "${T}"/${i}
done
fi
}