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

Revision 6150, 4.0 KB checked in by kudoh, 12 years ago (diff)
Line 
1%{?!WITH_SYSV: %define WITH_SYSV 1}
2
3Summary: CDEmu daemon
4Summary(ja): CDEmu デーモン
5Name: cdemu-daemon
6Version: 1.5.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.bz2
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.5.0
22BuildRequires: libao-devel >= 0.8.0
23BuildRequires: sysfsutils-devel
24
25Requires: dkms-vhba
26
27%description
28This is CDEmu daemon, the userspace daemon part of the userspace-cdemu suite, a
29free, GPL CD/DVD-ROM device emulator for linux.
30
31It receives SCSI commands from kernel module and processes them, passing the
32requested data back to the kernel. Daemon implements the actual virtual device;
33one instance per each device registered by kernel module. It uses libMirage, an
34image access library that is part of userspace-cdemu suite, for the image access
35(e.g. sector reading).
36
37The daemon registers itself on D-BUS' system or session bus (depending on the
38options passed to it) where it exposes an interface that can be used by clients
39to control it.
40
41%if %{WITH_SYSV}
42%package sysv
43Summary: SysV initscripts for cdemu-daemon
44Group: System Environment/Daemon
45Requires: %{name} = %{version}
46Requires(post): initscripts, chkconfig
47
48%description sysv
49This is CDEmu daemon, the userspace daemon part of the userspace-cdemu suite, a
50free, GPL CD/DVD-ROM device emulator for linux.
51
52This package provides SysV initscripts for running CDEmu daemon in daemon mode.
53%endif
54
55
56%prep
57%setup -q
58#%patch10 -p1 -b .bigendian
59cp -p %{SOURCE1} ./cdemu-daemon.init
60cp -p %{SOURCE2} ./cdemu-daemon.sysconfig
61
62%build
63%{configure} --sysconfdir=/etc
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
79rm -rf $RPM_BUILD_ROOT
80
81%post sysv
82# Run cdemu-daemon by default:
83/sbin/chkconfig --add cdemu-daemon >/dev/null 2>&1 || :
84/sbin/chkconfig cdemu-daemon on
85
86%preun sysv
87if [ "$1" -eq 0 ]; then
88    /sbin/service cdemu-daemon stop > /dev/null 2>&1 || :
89    /sbin/chkconfig --del cdemu-daemon
90fi
91
92%postun sysv
93if [ "$1" -ge "1" ]; then
94   /sbin/service cdemu-daemon condrestart >/dev/null 2>&1 || :
95fi
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}/*
102%{_libexecdir}/%{name}-*.sh
103%{_mandir}/man8/*
104%{_datadir}/dbus-1/*
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
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
119* Sat Dec 24 2011 Toshiharu Kudoh <toshi.kd2@gmail.com> - 1.4.0-1
120- new upstream release
121
122* Fri Nov 19 2010 IWAI, Masaharu <iwai@alib.jp> 1.3.0-2
123- add Requires: dkms-vhba
124
125* Thu Sep 2 2010 Toshiharu Kudoh <toshi.kd2@gmail.com> - 1.3.0-1
126- new upstream release
127- dropt patch10
128
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.
Note: See TracBrowser for help on using the repository browser.