%define name smeserver-virtualbox %define version 4.3.0 %define release 5 %define rpmver 4.3.0 Summary: smserver rpm to install virtualbox Name: %{name} Version: %{version} Release: %{release}%{?dist} Source: %{name}-%{version}.tar.gz License: GNU GPL version 2 URL: http://mirror.de-labrusse.fr Group: SMEserver/addon BuildRoot: %{_tmppath}/%{name}-buildroot Prefix: %{_prefix} BuildArchitectures: noarch BuildRequires: e-smith-devtools Requires: e-smith-release >= 8.0 Requires: VirtualBox-4.3 AutoReqProv: no %description smserver rpm to install virtualbox %changelog * Mon Dec 30 2013 JP Pialasse 4.3.0-5 - changing naming of contrib for import into buildsys * Tue Nov 05 2013 stephane de labrusse 4.3.4 - change name to match the virtualbox version * Sat Oct 19 2013 stephane de labrusse 4.3.3 - Initial release %prep %setup %build %install rm -rf $RPM_BUILD_ROOT (cd root ; find . -depth -print | cpio -dump $RPM_BUILD_ROOT) rm -f %{name}-%{version}-filelist /sbin/e-smith/genfilelist $RPM_BUILD_ROOT > %{name}-%{version}-filelist echo "%doc COPYING" >> %{name}-%{version}-filelist %clean cd .. rm -rf %{name}-%{version} %pre %preun %post if [ $1 = 1 ] ; then /bin/ln -s /etc/rc5.d/S20vboxdrv /etc/rc7.d/ /bin/ln -s /etc/rc5.d/S35vboxautostart-service /etc/rc7.d/ /bin/ln -s /etc/rc5.d/S35vboxballoonctrl-service /etc/rc7.d/ /bin/ln -s /etc/rc5.d/S35vboxweb-service /etc/rc7.d/ fi /usr/bin/vboxmanage setproperty websrvauthlibrary null %postun #uninstall if [ $1 = 0 ] ; then /bin/rm -rf /etc/rc7.d/S20vboxdrv /bin/rm -rf /etc/rc7.d/S35vboxautostart-service /bin/rm -rf /etc/rc7.d/S35vboxballoonctrl-service /bin/rm -rf /etc/rc7.d/S35vboxweb-service fi %files -f %{name}-%{version}-filelist %defattr(-,root,root)