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