# # # Copyright (c) 2003-2007, Virtual Iron Software, Inc. # # Portions have been modified by Virtual Iron Software, Inc. # (c) 2007. This file and the modifications can be redistributed and/or # modified under the terms and conditions of the GNU General Public # License, version 2.1 and not any later version of the GPL, as published # by the Free Software Foundation. # # Name: virtualiron Version: 2.6.9 Release: 55.0.2.ELsmp %define VIVER 3.7.4.29 %define LINUXVERSION %{version}-%{release} %define THETOOLS $HOME/tmp/rpmbuild/SOURCES/%{LINUXVERSION} Summary: The Virtual Iron Software accelerated device drivers binary package for Linux License: GPL Group: System Environment/Kernel Vendor: Virtual Iron Software URL: http://www.virtualiron.com BuildRoot: /var/tmp/%{name}-root Provides: virtualiron-%{version}-%{release}-theinternet.org.uk-UNOFFICIAL %define __spec_install_post /usr/lib/rpm/brp-compress || : %define debug_package %{nil} %define build_number 3.7.4.29 %description The Virtual Iron Software accelerated device drivers for Linux. Build Number: %{build_number} %build %install rm -rf $RPM_BUILD_ROOT/tmp rm -rf $RPM_BUILD_ROOT/lib rm -rf $RPM_BUILD_ROOT/usr/lib/nex rm -rf $RPM_BUILD_ROOT/usr/local/nex rm -rf $RPM_BUILD_ROOT/usr/lib/virtualiron mkdir -p $RPM_BUILD_ROOT/tmp mkdir -p $RPM_BUILD_ROOT/lib/modules/%{LINUXVERSION}/virtualiron mkdir -p $RPM_BUILD_ROOT/usr/lib/virtualiron cp -r %{THETOOLS}-%{VIVER}/*.*o $RPM_BUILD_ROOT/lib/modules/%{LINUXVERSION}/virtualiron cp %{THETOOLS}-%{VIVER}/vi_mkinitrd.sh $RPM_BUILD_ROOT/usr/lib/virtualiron cp %{THETOOLS}-%{VIVER}/vi_grubedit.sh $RPM_BUILD_ROOT/usr/lib/virtualiron cp %{THETOOLS}-%{VIVER}/vi_getstats.sh $RPM_BUILD_ROOT/usr/lib/virtualiron cp %{THETOOLS}-%{VIVER}/vi_killstats.sh $RPM_BUILD_ROOT/usr/lib/virtualiron cp %{THETOOLS}-%{VIVER}/vi_insmod.sh $RPM_BUILD_ROOT/usr/lib/virtualiron cp %{THETOOLS}-%{VIVER}/vi_os_stats $RPM_BUILD_ROOT/usr/lib/virtualiron %pre # VI pre install if [ `uname -i` != %{_target_cpu} ];then echo "Error: this rpm does not match this processor architecture" exit 1 fi if [ `uname -r` != %{LINUXVERSION} ];then echo "Error: this rpm does not match this kernel version" echo " Rpm: " %{LINUXVERSION} " differs from Kernel: " `uname -r` exit 1 fi # If the rpm package name ever changes, error out here if old name is installed %post # VI post install # Create the VI initrd /usr/lib/virtualiron/vi_mkinitrd.sh %{LINUXVERSION} if [ "$?" -eq 0 ];then echo " " /usr/lib/virtualiron/vi_grubedit.sh initrd-%{LINUXVERSION}-virtualiron %{LINUXVERSION} else exit 1 fi %preun # VI pre uninstall # If zero instances of packege on system if [ "$1" = 0 ];then # Remove the VI grub entry /usr/lib/virtualiron/vi_grubedit.sh -u # Remove the VI initrd rm -f /boot/initrd-*-virtualiron fi %postun # VI post uninstall # If zero instances of packege on system if [ "$1" = 0 ];then if [ -f /usr/lib/virtualiron/.depmod ];then /sbin/depmod -a rm -f /usr/lib/virtualiron/.depmod fi fi %clean rm -rf $RPM_BUILD_ROOT %files %defattr (-, root, root) %dir /lib/modules /lib/modules/%{LINUXVERSION}/virtualiron /usr/lib/virtualiron/vi_mkinitrd.sh /usr/lib/virtualiron/vi_grubedit.sh /usr/lib/virtualiron/vi_getstats.sh /usr/lib/virtualiron/vi_killstats.sh /usr/lib/virtualiron/vi_insmod.sh /usr/lib/virtualiron/vi_os_stats %changelog * Mon Jul 06 2007 Mike Hollowell - Hacked about by Mike * Mon Sep 11 2006 Timothy Smith - add updated stats support * Tue Sep 05 2006 Timothy Smith - both driver and rpm version now based on drv_vers.h * Tue Aug 29 2006 Timothy Smith - mainline is now 3.1.0-1 * Mon Aug 14 2006 Timothy Smith - add update removal support checking for zero packages 3.0.0-3 * Tue Jul 18 2006 Timothy Smith - update depmod - allow uni installer