cdemu-daemon-vl.spec 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  1. %{?!WITH_SYSV: %define WITH_SYSV 1}
  2. Summary: CDEmu daemon
  3. Summary(ja): CDEmu デーモン
  4. Name: cdemu-daemon
  5. Version: 1.4.0
  6. Release: 1%{?_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. /sbin/chkconfig cdemu-daemon on
  69. %preun sysv
  70. if [ "$1" -eq 0 ]; then
  71. /sbin/service cdemu-daemon stop > /dev/null 2>&1 || :
  72. /sbin/chkconfig --del cdemu-daemon
  73. fi
  74. %postun sysv
  75. if [ "$1" -ge "1" ]; then
  76. /sbin/service cdemu-daemon condrestart >/dev/null 2>&1 || :
  77. fi
  78. %files
  79. %defattr(-,root,root,-)
  80. %doc AUTHORS ChangeLog COPYING NEWS README
  81. %config(noreplace) %{_sysconfdir}/dbus-1/system.d/cdemud-dbus.conf
  82. %{_bindir}/*
  83. %{_mandir}/man8/*
  84. %{_datadir}/dbus-1/*
  85. %if %{WITH_SYSV}
  86. %files sysv
  87. %defattr(-,root,root,-)
  88. %config(noreplace) %{_sysconfdir}/sysconfig/cdemu-daemon
  89. %attr(0755,root,root) %{_sysconfdir}/rc.d/init.d/cdemu-daemon
  90. %endif
  91. %changelog
  92. * Sat Dec 24 2011 Toshiharu Kudoh <toshi.kd2@gmail.com> - 1.4.0-1
  93. - new upstream release
  94. * Fri Nov 19 2010 IWAI, Masaharu <iwai@alib.jp> 1.3.0-2
  95. - add Requires: dkms-vhba
  96. * Thu Sep 2 2010 Toshiharu Kudoh <toshi.kd2@gmail.com> - 1.3.0-1
  97. - new upstream release
  98. - dropt patch10
  99. * Mon Oct 12 2009 MATSUBAYASHI Kohji <shaolin@vinelinux.org> - 1.2.0-2
  100. - add Patch10 to fix build failure on ppc
  101. * Sat Sep 26 2009 Toshiharu Kudoh <toshi.kd2@gmail.com> - 1.2.0-1
  102. - initial build for VineSeed
  103. * Sat Jun 28 2008 Rok Mandeljc <rok.mandeljc@email.si> - 1.1.0-1
  104. - Updated to 1.1.0
  105. * Thu Dec 20 2007 Rok Mandeljc <rok.mandeljc@email.si> - 1.0.0-1
  106. - Initial RPM release.