source: projects/specs/trunk/c/cdemu-daemon/cdemu-daemon-vl.spec @ 1747

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