dkms-vhba-vl.spec 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. Summary: VHBA virtual host bus adapter module
  2. Summary(ja): VHBA(仮想ホストバスアダプタ)モジュール
  3. Name: dkms-vhba
  4. #Version: 1.2.1
  5. Version: 20120422
  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.bz2
  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. * Sun May 06 2012 Toshiharu Kudoh <toshi.kd1@gmail.com> - 20120422-1
  64. - new upstream release
  65. - changed atchive type gzip to bzip2
  66. * Sat Dec 24 2011 Toshiharu Kudoh <toshi.kd1@gmail.com> - 20110915-1
  67. - new upstream release
  68. - added BuildRequires: kernel-headers
  69. - fixed udev rule
  70. * Wed May 11 2011 Toshiharu Kudoh <toshi.kd1@gmail.com> - 20110416-1
  71. - new upstream release
  72. * Fri Sep 3 2010 Toshiharu Kudoh <toshi.kd1@gmail.com> - 20100822-1
  73. - new upstream release
  74. * Sat Sep 26 2009 Toshiharu Kudoh <toshi.kd1@gmail.com> - 1.2.1-1
  75. - initial build for VineSeed
  76. * Sat Jun 28 2008 Rok Mandeljc <rok.mandeljc@email.si> - 1.1.0-1
  77. - Updated to 1.1.0
  78. * Sun Dec 23 2007 Rok Mandeljc <rok.mandeljc@email.si> 1.0.0-2
  79. - Fixed udev rule (it's OWNER, not USER).
  80. * Thu Dec 20 2007 Rok Mandeljc <rok.mandeljc@email.si> 1.0.0-1
  81. - Initial RPM release.