cdemu-daemon-vl.spec 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  1. %{?!WITH_SYSV: %define WITH_SYSV 1}
  2. Summary: CDEmu daemon
  3. Summary(ja): CDEmu デーモン
  4. Name: cdemu-daemon
  5. Version: 1.3.0
  6. Release: 2%{?_dist_release}
  7. License: GPLv2+
  8. Group: System Environment/Daemons
  9. URL: http://cdemu.sourceforge.net
  10. Source0: http://downloads.sourceforge.net/cdemu/%{name}-%{version}.tar.gz
  11. Source1: cdemu-daemon.init
  12. Source2: cdemu-daemon.sysconfig
  13. # should be fixed upstream?
  14. #Patch10: %{name}-1.2.0-bigendian-fix.patch
  15. BuildRoot: %{_tmppath}/%{name}-%{version}-root
  16. BuildRequires: dbus-devel >= 0.90
  17. BuildRequires: dbus-glib-devel >= 0.70
  18. BuildRequires: libdaemon-devel >= 0.11
  19. BuildRequires: glib2-devel >= 2.6
  20. BuildRequires: libmirage-devel >= 1.2.0
  21. BuildRequires: libao-devel >= 0.8.0
  22. BuildRequires: sysfsutils-devel
  23. Requires: dkms-vhba
  24. %description
  25. This is CDEmu daemon, the userspace daemon part of the userspace-cdemu suite, a
  26. free, GPL CD/DVD-ROM device emulator for linux.
  27. It receives SCSI commands from kernel module and processes them, passing the
  28. requested data back to the kernel. Daemon implements the actual virtual device;
  29. one instance per each device registered by kernel module. It uses libMirage, an
  30. image access library that is part of userspace-cdemu suite, for the image access
  31. (e.g. sector reading).
  32. The daemon registers itself on D-BUS' system or session bus (depending on the
  33. options passed to it) where it exposes an interface that can be used by clients
  34. to control it.
  35. %if %{WITH_SYSV}
  36. %package sysv
  37. Summary: SysV initscripts for cdemu-daemon
  38. Group: System Environment/Daemon
  39. Requires: %{name} = %{version}
  40. Requires(post): initscripts, chkconfig
  41. %description sysv
  42. This is CDEmu daemon, the userspace daemon part of the userspace-cdemu suite, a
  43. free, GPL CD/DVD-ROM device emulator for linux.
  44. This package provides SysV initscripts for running CDEmu daemon in daemon mode.
  45. %endif
  46. %prep
  47. %setup -q
  48. #%patch10 -p1 -b .bigendian
  49. cp -p %{SOURCE1} ./cdemu-daemon.init
  50. cp -p %{SOURCE2} ./cdemu-daemon.sysconfig
  51. %build
  52. %{configure}
  53. %{__make} %{?_smp_mflags}
  54. %install
  55. %{__rm} -rf $RPM_BUILD_ROOT
  56. %{__make} install DESTDIR=$RPM_BUILD_ROOT
  57. %if %{WITH_SYSV}
  58. %{__mkdir_p} $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig
  59. %{__mkdir_p} $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d
  60. %{__install} -Dpm 644 cdemu-daemon.init $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d/cdemu-daemon
  61. %{__install} -Dpm 755 cdemu-daemon.sysconfig $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/cdemu-daemon
  62. %endif
  63. %clean
  64. rm -rf $RPM_BUILD_ROOT
  65. %post sysv
  66. # Run cdemu-daemon by default:
  67. /sbin/chkconfig --add cdemu-daemon >/dev/null 2>&1 || :
  68. %preun sysv
  69. if [ "$1" -eq 0 ]; then
  70. /sbin/service cdemu-daemon stop > /dev/null 2>&1 || :
  71. /sbin/chkconfig --del cdemu-daemon
  72. fi
  73. %postun sysv
  74. if [ "$1" -ge "1" ]; then
  75. /sbin/service cdemu-daemon condrestart >/dev/null 2>&1 || :
  76. fi
  77. %files
  78. %defattr(-,root,root,-)
  79. %doc AUTHORS ChangeLog COPYING NEWS README
  80. %config(noreplace) %{_sysconfdir}/dbus-1/system.d/cdemud-dbus.conf
  81. %{_bindir}/*
  82. %{_mandir}/man8/*
  83. %if %{WITH_SYSV}
  84. %files sysv
  85. %defattr(-,root,root,-)
  86. %config(noreplace) %{_sysconfdir}/sysconfig/cdemu-daemon
  87. %attr(0755,root,root) %{_sysconfdir}/rc.d/init.d/cdemu-daemon
  88. %endif
  89. %changelog
  90. * Fri Nov 19 2010 IWAI, Masaharu <iwai@alib.jp> 1.3.0-2
  91. - add Requires: dkms-vhba
  92. * Thu Sep 2 2010 Toshiharu Kudoh <toshi.kd2@gmail.com> - 1.3.0-1
  93. - new upstream release
  94. - dropt patch10
  95. * Mon Oct 12 2009 MATSUBAYASHI Kohji <shaolin@vinelinux.org> - 1.2.0-2
  96. - add Patch10 to fix build failure on ppc
  97. * Sat Sep 26 2009 Toshiharu Kudoh <toshi.kd2@gmail.com> - 1.2.0-1
  98. - initial build for VineSeed
  99. * Sat Jun 28 2008 Rok Mandeljc <rok.mandeljc@email.si> - 1.1.0-1
  100. - Updated to 1.1.0
  101. * Thu Dec 20 2007 Rok Mandeljc <rok.mandeljc@email.si> - 1.0.0-1
  102. - Initial RPM release.