mirror of
https://github.com/crosstool-ng/crosstool-ng.git
synced 2024-12-22 06:07:49 +00:00
Collect licenses for the distribution
This commit is contained in:
parent
2808fdb6a3
commit
aec70d5310
@ -144,5 +144,7 @@ do_finish() {
|
|||||||
CT_DoForceRmdir "${CT_DEBUGROOT_DIR}/"{,usr/}{,share/}{man,info}
|
CT_DoForceRmdir "${CT_DEBUGROOT_DIR}/"{,usr/}{,share/}{man,info}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
CT_InstallCopyingInformation
|
||||||
|
|
||||||
CT_EndStep
|
CT_EndStep
|
||||||
}
|
}
|
||||||
|
@ -2396,3 +2396,34 @@ else
|
|||||||
CT_Error "Not found: paths.sh"
|
CT_Error "Not found: paths.sh"
|
||||||
fi
|
fi
|
||||||
. "${paths_sh_location}"
|
. "${paths_sh_location}"
|
||||||
|
|
||||||
|
CT_InstallCopyingInformation()
|
||||||
|
{
|
||||||
|
local pkgname
|
||||||
|
local pkgdir
|
||||||
|
local licfile
|
||||||
|
local dstdir
|
||||||
|
|
||||||
|
CT_DoLog EXTRA "Collect license information from: ${CT_SRC_DIR}"
|
||||||
|
CT_DoLog EXTRA "Put the license information to: ${CT_PREFIX_DIR}/share/licenses"
|
||||||
|
|
||||||
|
shopt -s nullglob
|
||||||
|
|
||||||
|
for pkgdir in ${CT_SRC_DIR}/*; do
|
||||||
|
pkgname=$(basename "${pkgdir}")
|
||||||
|
for licfile in ${pkgdir}/{COPYING*,LICENSE*}; do
|
||||||
|
dstdir="${CT_PREFIX_DIR}/share/licenses/${pkgname}"
|
||||||
|
mkdir -p "${dstdir}"
|
||||||
|
CT_DoExecLog ALL cp -av "${licfile}" "${dstdir}/"
|
||||||
|
done
|
||||||
|
done
|
||||||
|
|
||||||
|
# Also add crosstool's information
|
||||||
|
for licfile in ${CT_TOP_DIR}/{COPYING*,LICENSE*,licenses.d}; do
|
||||||
|
dstdir="${CT_PREFIX_DIR}/share/licenses/crosstool-ng"
|
||||||
|
mkdir -p "${dstdir}"
|
||||||
|
CT_DoExecLog ALL cp -av "${licfile}" "${dstdir}/"
|
||||||
|
done
|
||||||
|
|
||||||
|
shopt -u nullglob
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user