Summary: CDEmu daemon
Summary(ja): CDEmu デーモン
Name: cdemu-daemon
Version: 3.1.0
Release: 1%{?_dist_release}
License: GPLv2+
Group: System Environment/Daemons
URL: http://cdemu.sourceforge.net
Source0: http://downloads.sourceforge.net/cdemu/%{name}-%{version}.tar.bz2
# should be fixed upstream?
#Patch10: %{name}-1.2.0-bigendian-fix.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-root
BuildRequires: cmake >= 2.8.5
BuildRequires: pkgconfig >= 0.16
BuildRequires: dbus-devel >= 0.90
BuildRequires: dbus-glib-devel >= 0.70
BuildRequires: glib2-devel >= 2.24
BuildRequires: libmirage-devel >= %{version}
BuildRequires: libao-devel >= 0.8.0
BuildRequires: sysfsutils-devel

Requires: dkms-vhba

%description
This is CDEmu daemon, the userspace daemon part of the userspace-cdemu suite, a 
free, GPL CD/DVD-ROM device emulator for linux.

It receives SCSI commands from kernel module and processes them, passing the 
requested data back to the kernel. Daemon implements the actual virtual device; 
one instance per each device registered by kernel module. It uses libMirage, an 
image access library that is part of userspace-cdemu suite, for the image access 
(e.g. sector reading).

The daemon registers itself on D-BUS' system or session bus (depending on the
options passed to it) where it exposes an interface that can be used by clients
to control it.

%prep
%setup -q

%build
%cmake \
  -DSYSTEM_BUS_SERVICE=OFF \
  -DSESSION_BUS_SERVICE=ON \
  .
%{__make} %{?_smp_mflags}

%install
%{__rm} -rf $RPM_BUILD_ROOT
%{__make} install DESTDIR=$RPM_BUILD_ROOT


%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(-,root,root,-)
%doc AUTHORS ChangeLog COPYING NEWS README
%{_bindir}/*
%{_libexecdir}/%{name}-*.sh
%{_mandir}/man8/*
%{_datadir}/dbus-1/*

%changelog
* Tue Jan 23 2018 IWAI, Masaharu <iwaim.sub@gmail.com> - 3.1.0-1
- update to 3.1.0

* Sat Feb 25 2017 IWAI, Masaharu <iwaim.sub@gmail.com> - 3.0.5-1
- update to 3.0.5
- update BuildRequires
- disable sysv subpackage

* Sun May 06 2012 Toshiharu Kudoh <toshi.kd2@gmail.com> - 1.5.0-1
- new upstream release
- changed atchive type gzip to bzip2
- changed BuildRequires: libmirage-devel >= 1.2.0 to 1.5.0

* Sat Dec 24 2011 Toshiharu Kudoh <toshi.kd2@gmail.com> - 1.4.0-1
- new upstream release

* Fri Nov 19 2010 IWAI, Masaharu <iwai@alib.jp> 1.3.0-2
- add Requires: dkms-vhba

* Thu Sep 2 2010 Toshiharu Kudoh <toshi.kd2@gmail.com> - 1.3.0-1
- new upstream release
- dropt patch10

* Mon Oct 12 2009 MATSUBAYASHI Kohji <shaolin@vinelinux.org> - 1.2.0-2
- add Patch10 to fix build failure on ppc

* Sat Sep 26 2009 Toshiharu Kudoh <toshi.kd2@gmail.com> - 1.2.0-1
- initial build for VineSeed

* Sat Jun 28 2008 Rok Mandeljc <rok.mandeljc@email.si> - 1.1.0-1
- Updated to 1.1.0

* Thu Dec 20 2007 Rok Mandeljc <rok.mandeljc@email.si> - 1.0.0-1
- Initial RPM release.
