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