virtualbox-extension-pack: also download and install VBoxGuestAdditions.iso

This commit is contained in:
Silvan Calarco 2020-12-10 14:03:11 +01:00
parent 32b9247382
commit f42e12b257
2 changed files with 10 additions and 0 deletions

View File

@ -3,5 +3,8 @@
# package name (do not modify unless you know what you're doing)
VIRTUALBOX_EXTENSION_PACK_PCK=Oracle_VM_VirtualBox_Extension_Pack-${SRPMVERSION["virtualbox-extension-pack"]}.vbox-extpack
# guest additions file name
VIRTUALBOX_GUEST_ADDITIONS_PCK=VBoxGuestAdditions_${SRPMVERSION["virtualbox-extension-pack"]}.iso
# package URL (do not modify unless you know what you're doing)
VIRTUALBOX_EXTENSION_PACK_URL=http://download.virtualbox.org/virtualbox/${SRPMVERSION["virtualbox-extension-pack"]}/

View File

@ -31,6 +31,9 @@ declare -A SRPMVERSION SRPMRELEASE
wget -nv --timeout=10 --tries=2 \
${VIRTUALBOX_EXTENSION_PACK_URL}${VIRTUALBOX_EXTENSION_PACK_PCK} -O ${VIRTUALBOX_EXTENSION_PACK_PCK}
wget -nv --timeout=10 --tries=2 \
${VIRTUALBOX_EXTENSION_PACK_URL}${VIRTUALBOX_GUEST_ADDITIONS_PCK} -O ${VIRTUALBOX_GUEST_ADDITIONS_PCK}
[ -f ${VIRTUALBOX_EXTENSION_PACK_PCK} ] || exit 1
%build
@ -43,6 +46,9 @@ declare -A SRPMVERSION SRPMRELEASE
install -D -m0644 ${VIRTUALBOX_EXTENSION_PACK_PCK} %{buildroot}%{_libdir}/VirtualBox/extension/${VIRTUALBOX_EXTENSION_PACK_PCK}
cp %{S:0} LICENSE
install -D -m0644 ${VIRTUALBOX_GUEST_ADDITIONS_PCK} %{buildroot}%{_libdir}/VirtualBox/additions/VBoxGuestAdditions.iso
cp %{S:0} LICENSE
%clean
[ "%{buildroot}" != / ] && rm -rf %{buildroot}
rm -rf %{_builddir}/%{name}-*
@ -57,6 +63,7 @@ echo y | VBoxManage extpack install %{_libdir}/VirtualBox/extension/Oracle_VM_Vi
%files
%defattr(-,root,root)
%{_libdir}/VirtualBox/extension/Oracle_VM_VirtualBox_Extension_Pack-%{pck_majver}%{?pck_minver:%pck_minver}.vbox-extpack
%{_libdir}/VirtualBox/additions/VBoxGuestAdditions.iso
%doc LICENSE
%changelog