desktop-base-openmamba/SRPMS/virtualbox-extension-pack/virtualbox-extension-pack.spec.in

61 lines
1.8 KiB
RPMSpec
Raw Normal View History

2011-08-16 15:53:43 +02:00
%define pck_majver %(echo %version | cut -d. -f1-3)
%define pck_minver %(echo %version | cut -d. -f4)
Name: virtualbox-extension-pack
Version: @virtualboxextensionpackver@
Release: 1@distroext@
Epoch: 1
Summary: VirtualBox Extension Pack
Group: Applications/Emulators
Vendor: @vendor@
Distribution: @distribution@
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
URL: http://www.virtualbox.org/
Source: LICENSE
License: Not Distributable
Requires(post):VirtualBox
BuildRoot: %{_tmppath}/%{name}-%{version}-root
%description
VirtualBox Extension Pack.
%prep
%setup -c -n %{name}-%{version} -T
[ -r /etc/sysconfig/@sysconfigfile@ ] || exit 1
. /etc/sysconfig/@sysconfigfile@
[ "${VIRTUALBOX_EXTENSION_PACK_PCK}" ] || exit 1
[ "${VIRTUALBOX_EXTENSION_PACK_URL}" ] || exit 1
wget -nv --timeout=10 --tries=2 \
${VIRTUALBOX_EXTENSION_PACK_URL}${VIRTUALBOX_EXTENSION_PACK_PCK} -O ${VIRTUALBOX_EXTENSION_PACK_PCK}
[ -f ${VIRTUALBOX_EXTENSION_PACK_PCK} ] || exit 1
%build
%install
[ "%{buildroot}" != / ] && rm -rf %{buildroot}
. /etc/sysconfig/@sysconfigfile@
install -D -m0644 ${VIRTUALBOX_EXTENSION_PACK_PCK} %{buildroot}/opt/VirtualBox/extension/${VIRTUALBOX_EXTENSION_PACK_PCK}
cp %{S:0} LICENSE
%clean
[ "%{buildroot}" != / ] && rm -rf %{buildroot}
%post
VBoxManage extpack uninstall Oracle_VM_VirtualBox_Extension_Pack || true
VBoxManage extpack install /opt/VirtualBox/extension/Oracle_VM_VirtualBox_Extension_Pack-%{pck_majver}%{?pck_minver:%pck_minver}.vbox-extpack
2011-08-16 15:53:43 +02:00
# --replace not working
:
%files
%defattr(-,root,root)
/opt/VirtualBox/extension/Oracle_VM_VirtualBox_Extension_Pack-%{pck_majver}%{?pck_minver:%pck_minver}.vbox-extpack
2011-08-16 15:53:43 +02:00
%doc LICENSE
%changelog
* Tue Aug 16 2011 Silvan Calarco <silvan.calarco@mambasoft.it> 4.1.2.73507-1mamba
- specfile created