build: Add license gen to source archive script

This commit is contained in:
Matt Borgerson 2021-05-24 22:42:07 -07:00
parent e55f820c91
commit 3b432160db
2 changed files with 7 additions and 2 deletions

View File

@ -96,7 +96,11 @@ package_linux() {
mkdir -p dist
cp build/qemu-system-i386 dist/xemu
# cp -r "${project_source_dir}/data" dist
python3 ./scripts/gen-license.py > dist/LICENSE.txt
if test -e "${project_source_dir}/XEMU_LICENSE"; then
cp "${project_source_dir}/XEMU_LICENSE" dist/LICENSE.txt
else
python3 ./scripts/gen-license.py > dist/LICENSE.txt
fi
}
postbuild=''

View File

@ -72,9 +72,10 @@ for sm in $submodules; do
test $? -ne 0 && error "failed append submodule $sm to $tar_file"
done
python3 ./scripts/gen-license.py > XEMU_LICENSE
git rev-parse HEAD 2>/dev/null | tr -d '\n' > XEMU_COMMIT
git symbolic-ref --short HEAD > XEMU_BRANCH
git describe --match 'xemu-v*' | cut -c 7- | tr -d '\n' > XEMU_VERSION
tar -r --file "$tar_file" XEMU_COMMIT XEMU_BRANCH XEMU_VERSION
tar -r --file "$tar_file" XEMU_COMMIT XEMU_BRANCH XEMU_VERSION XEMU_LICENSE
exit 0