dkms-vhba-vl.spec 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. Summary: VHBA virtual host bus adapter module
  2. Summary(ja): VHBA(仮想ホストバスアダプタ)モジュール
  3. Name: dkms-vhba
  4. #Version: 1.2.1
  5. Version: 20110915
  6. Release: 1%{?_dist_release}
  7. License: GPLv2+
  8. Group: System Environment/Kernel
  9. URL: http://cdemu.sourceforge.net
  10. Source: http://downloads.sourceforge.net/cdemu/vhba-module-%{version}.tar.gz
  11. BuildRoot: %{_tmppath}/%{name}-%{version}-root
  12. BuildArch: noarch
  13. BuildRequires: kernel-headers
  14. Requires: gcc, make
  15. Requires(post): dkms
  16. Requires(preun): dkms
  17. %description
  18. VHBA kernel module, a virtual SCSI host bus adapter used by CDEmu daemon from
  19. userspace-cdemu suite.
  20. %prep
  21. %setup -q -n vhba-module-%{version}
  22. %build
  23. %install
  24. %{__rm} -rf %{buildroot}
  25. %define dkms_name vhba
  26. %define dkms_vers %{version}-%{release}
  27. %define quiet -q
  28. # Kernel module sources install for dkms
  29. %{__mkdir_p} %{buildroot}%{_usrsrc}/%{dkms_name}-%{dkms_vers}/
  30. %{__cp} -a * %{buildroot}%{_usrsrc}/%{dkms_name}-%{dkms_vers}/
  31. # Configuration for dkms
  32. %{__cat} > %{buildroot}%{_usrsrc}/%{dkms_name}-%{dkms_vers}/dkms.conf << 'EOF'
  33. PACKAGE_NAME=%{dkms_name}
  34. PACKAGE_VERSION=%{dkms_vers}
  35. MAKE[0]="make"
  36. BUILT_MODULE_NAME[0]=vhba
  37. DEST_MODULE_LOCATION[0]=/kernel/drivers/misc
  38. AUTOINSTALL="YES"
  39. EOF
  40. # Configuration for udev
  41. %{__mkdir_p} %{buildroot}/etc/udev/rules.d
  42. %{__cat} > %{buildroot}/etc/udev/rules.d/60-vhba.rules << 'EOF'
  43. # Make vhba
  44. KERNEL=="vhba_ctl", MODE="0660", OWNER="root", GROUP="users"
  45. EOF
  46. %clean
  47. %{__rm} -rf %{buildroot}
  48. %post
  49. # Add to DKMS registry
  50. dkms add -m %{dkms_name} -v %{dkms_vers} %{?quiet} || :
  51. # Rebuild and make available for the currenty running kernel
  52. dkms build -m %{dkms_name} -v %{dkms_vers} %{?quiet} || :
  53. dkms install -m %{dkms_name} -v %{dkms_vers} %{?quiet} --force || :
  54. %preun
  55. # Remove all versions from DKMS registry
  56. dkms remove -m %{dkms_name} -v %{dkms_vers} %{?quiet} --all || :
  57. %files
  58. %defattr(-,root,root,-)
  59. #%doc AUTHORS ChangeLog COPYING NEWS README
  60. /etc/udev/rules.d/60-vhba.rules
  61. %{_usrsrc}/%{dkms_name}-%{dkms_vers}/
  62. %changelog
  63. * Sat Dec 24 2011 Toshiharu Kudoh <toshi.kd1@gmail.com> - 20110915-1
  64. - new upstream release
  65. - added BuildRequires: kernel-headers
  66. - fixed udev rule
  67. * Wed May 11 2011 Toshiharu Kudoh <toshi.kd1@gmail.com> - 20110416-1
  68. - new upstream release
  69. * Fri Sep 3 2010 Toshiharu Kudoh <toshi.kd1@gmail.com> - 20100822-1
  70. - new upstream release
  71. * Sat Sep 26 2009 Toshiharu Kudoh <toshi.kd1@gmail.com> - 1.2.1-1
  72. - initial build for VineSeed
  73. * Sat Jun 28 2008 Rok Mandeljc <rok.mandeljc@email.si> - 1.1.0-1
  74. - Updated to 1.1.0
  75. * Sun Dec 23 2007 Rok Mandeljc <rok.mandeljc@email.si> 1.0.0-2
  76. - Fixed udev rule (it's OWNER, not USER).
  77. * Thu Dec 20 2007 Rok Mandeljc <rok.mandeljc@email.si> 1.0.0-1
  78. - Initial RPM release.