termux-packages/packages/ovmf/build.sh

49 lines
1.8 KiB
Bash
Raw Normal View History

2020-08-24 21:21:18 +02:00
TERMUX_PKG_HOMEPAGE=https://www.tianocore.org/
TERMUX_PKG_DESCRIPTION="Open Virtual Machine Firmware"
TERMUX_PKG_LICENSE="BSD"
TERMUX_PKG_MAINTAINER="@termux"
2022-02-11 17:07:45 +01:00
TERMUX_PKG_VERSION=20211216.122.gc9b7c6e0cc
2020-08-24 21:21:18 +02:00
TERMUX_PKG_SRCURL=(https://www.kraxel.org/repos/jenkins/edk2/edk2.git-aarch64-0-${TERMUX_PKG_VERSION}.noarch.rpm
https://www.kraxel.org/repos/jenkins/edk2/edk2.git-arm-0-${TERMUX_PKG_VERSION}.noarch.rpm
https://www.kraxel.org/repos/jenkins/edk2/edk2.git-ovmf-ia32-0-${TERMUX_PKG_VERSION}.noarch.rpm
https://www.kraxel.org/repos/jenkins/edk2/edk2.git-ovmf-x64-0-${TERMUX_PKG_VERSION}.noarch.rpm)
2022-02-11 17:07:45 +01:00
TERMUX_PKG_SHA256=(569794ea79bf548c9bad55ae278d462c961949ec2d65e3a4720daea94e696263
da36eb7073ca3ff0dad4c322d75ce84d4b1bef9f3a5a9a757f999b3c317af53e
307ae61dc11b8efb3ae400e72b301bca7b6353fb665e7137f5e70d82ebac5222
aef9b4879a4366ca1253514418f755f643ddb8e56b5332dc026da77188afb20a)
2020-08-24 21:21:18 +02:00
TERMUX_PKG_SKIP_SRC_EXTRACT=true
TERMUX_PKG_PLATFORM_INDEPENDENT=true
termux_step_make_install() {
termux_download \
${TERMUX_PKG_SRCURL[0]} \
${TERMUX_PKG_CACHEDIR}/edk2-aarch64.rpm \
${TERMUX_PKG_SHA256[0]}
termux_download \
${TERMUX_PKG_SRCURL[1]} \
${TERMUX_PKG_CACHEDIR}/edk2-arm.rpm \
${TERMUX_PKG_SHA256[1]}
termux_download \
${TERMUX_PKG_SRCURL[2]} \
${TERMUX_PKG_CACHEDIR}/edk2-i686.rpm \
2020-08-24 21:21:18 +02:00
${TERMUX_PKG_SHA256[2]}
termux_download \
${TERMUX_PKG_SRCURL[3]} \
${TERMUX_PKG_CACHEDIR}/edk2-x86_64.rpm \
${TERMUX_PKG_SHA256[3]}
local i
for i in aarch64 arm i686 x86_64; do
2020-08-24 22:56:32 +02:00
bsdtar xf ${TERMUX_PKG_CACHEDIR}/edk2-${i}.rpm -C $TERMUX_PREFIX/../
done
for i in $TERMUX_PREFIX/share/qemu/firmware/*.json; do
sed -i "s@/usr@$TERMUX_PREFIX@g" $i
2020-08-24 21:21:18 +02:00
done
}
termux_step_install_license() {
install -Dm600 $TERMUX_PKG_BUILDER_DIR/License.txt \
$TERMUX_PREFIX/share/doc/$TERMUX_PKG_NAME/LICENSE.txt
2020-08-24 21:21:18 +02:00
}