cdemu-daemon-vl.spec 3.5 KB

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