xen: use vsrcextract
This commit is contained in:
parent
e1a6b64e94
commit
77a4de4385
|
@ -167,3 +167,20 @@ vsrcextract() {
|
|||
vextract "$sc" ${dst:+-C "$dst"} \
|
||||
"${XBPS_SRCDISTDIR}/${pkgname}-${version}/$1"
|
||||
}
|
||||
|
||||
vtar() {
|
||||
bsdtar "$@"
|
||||
}
|
||||
|
||||
vsrccopy() {
|
||||
local _tgt
|
||||
if [ $# -lt 2 ]; then
|
||||
msg_error "vsrccopy <file>... <target>"
|
||||
fi
|
||||
_tgt="${@:-1}"
|
||||
mkdir -p "$_tgt"
|
||||
while [ $# -gt 1 ]; do
|
||||
cp -a "${XBPS_SRCDISTDIR}/${pkgname}-${version}/$1" "$_tgt"
|
||||
shift
|
||||
done
|
||||
}
|
||||
|
|
|
@ -104,15 +104,11 @@ conf_files="
|
|||
/etc/xen/xl.conf"
|
||||
|
||||
post_extract() {
|
||||
local _src="${XBPS_SRCDISTDIR}/${pkgname}-${version}"
|
||||
|
||||
msg_normal "Extracting etherboot ipxe files ...\n"
|
||||
mkdir tools/firmware/etherboot/ipxe
|
||||
tar --strip-components=1 -x \
|
||||
-f ${_src}/${_git_tag_ipxe}.tar.gz \
|
||||
-C tools/firmware/etherboot/ipxe/
|
||||
vsrcextract -C tools/firmware/etherboot/ipxe ${_git_tag_ipxe}.tar.gz
|
||||
# Create a tarball w/o the git tag
|
||||
tar -czf tools/firmware/etherboot/ipxe.tar.gz \
|
||||
vtar -czf tools/firmware/etherboot/ipxe.tar.gz \
|
||||
-C tools/firmware/etherboot/ ipxe
|
||||
|
||||
if [ "$build_option_stubdom" ]; then
|
||||
|
@ -121,16 +117,16 @@ post_extract() {
|
|||
-e"/RAW_ADDR/s/(int) grub_scratch_mem/(long) grub_scratch_mem/"
|
||||
mkdir -p stubdom/mini-os-x86_64-grub/{arch/x86,console,lib,xenbus}
|
||||
msg_normal "Copying stubdom files ...\n"
|
||||
cp -pv \
|
||||
${_src}/grub-${_grub_version}.tar.gz \
|
||||
${_src}/gmp-${_gmp_version}.tar.bz2 \
|
||||
${_src}/zlib-${_zlib_version}.tar.gz \
|
||||
${_src}/lwip-${_lwip_version}.tar.gz \
|
||||
${_src}/polarssl-${_polarssl_version}-gpl.tgz \
|
||||
${_src}/newlib-${_newlib_version}.tar.gz \
|
||||
${_src}/pciutils-${_libpci_version}.tar.bz2 \
|
||||
${_src}/tpm_emulator-${_tpmemu_version}.tar.gz \
|
||||
${_src}/ocaml-${_ocaml_version}.tar.gz \
|
||||
vsrccopy \
|
||||
grub-${_grub_version}.tar.gz \
|
||||
gmp-${_gmp_version}.tar.bz2 \
|
||||
zlib-${_zlib_version}.tar.gz \
|
||||
lwip-${_lwip_version}.tar.gz \
|
||||
polarssl-${_polarssl_version}-gpl.tgz \
|
||||
newlib-${_newlib_version}.tar.gz \
|
||||
pciutils-${_libpci_version}.tar.bz2 \
|
||||
tpm_emulator-${_tpmemu_version}.tar.gz \
|
||||
ocaml-${_ocaml_version}.tar.gz \
|
||||
stubdom/
|
||||
fi
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue