3 %bcond_without dist_kernel # without distribution kernel
4 %bcond_without smp # without smp packages
5 %bcond_without kernel # without kernel packages
6 %bcond_with verbose # verbose build (V=1)
7 %bcond_without userspace # don't build userspace tools
9 Summary: Simulate a CD drive + CD with just simple cue/bin files
10 Summary(pl): Symulacja napêdu CD z p³ytk± przy u¿yciu plików cue/bin
16 Group: Applications/System
17 Source0: http://robert.private.outertech.com/virtualcd/%{name}-%{version}.tar.bz2
18 # Source0-md5: e1a0ba6c76b4eeaf434f44d4a0f61678
19 URL: http://www.cdemu.org/
21 %pyrequires_eq python-libs
22 BuildRequires: python-devel
25 %{?with_dist_kernel:BuildRequires: kernel-module-build >= 2.6.7}
26 BuildRequires: rpmbuild(macros) >= 1.153
28 Requires: dev >= 2.9.0-16
29 Requires: cdemu(kernel)
30 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
33 CDemu is a kernel module for Linux. It is designed to simulate a CD
34 drive + CD with just simple cue/bin files, which are pretty common in
35 the Windows world. It includes an user space program to control the
36 kernel module. You can use it to watch an SVCD or mount the data track
37 of an bin/cue. However, for watching an SVCD, we would recommend
38 MPlayer which can play bin/cue images directly with the patch a friend
39 and I made for it (more under History).
41 This package includes userspace tools for %{name}.
44 CDemu to modu³ j±dra Linuksa. Zosta³ zaprojektowany do symulowania
45 napêdu CD z p³ytk± przy u¿yciu plików cue/bin, które s± do¶æ popularne
46 w ¶wiecie windowsowym. Zawiera program dzia³aj±cy w przestrzeni
47 u¿ytkownika s³u¿±cy do kontroli pracy modu³u. Mo¿na u¿ywaæ go do
48 ogl±dania SVCD lub montowania ¶cie¿ek danych z bin/cue. Mimo to
49 autorzy do ogl±dania SVCD polecaj± raczej MPlayera ze swoj± ³atk±,
50 który mo¿e odtwarzaæ obrazy bin/cur bezpo¶rednio.
52 Ten pakiet zawiera narzêdzia u¿ytkownika dla %{name}.
54 %package -n kernel-misc-%{name}
55 Summary: Linux driver for %{name}
56 Summary(pl): Sterownik dla Linuksa do %{name}
57 Release: %{_rel}@%{_kernel_ver_str}
59 Requires(post,postun): /sbin/depmod
60 %if %{with dist_kernel}
61 %requires_releq_kernel_up
62 Requires(postun): %releq_kernel_up
64 Provides: cdemu(kernel)
66 %description -n kernel-misc-%{name}
67 This is driver for %{name} for Linux.
69 This package contains Linux module.
71 %description -n kernel-misc-%{name} -l pl
72 Sterownik dla Linuksa do %{name}.
74 Ten pakiet zawiera modu³ j±dra Linuksa.
76 %package -n kernel-smp-misc-%{name}
77 Summary: Linux SMP driver for %{name}
78 Summary(pl): Sterownik dla Linuksa SMP do %{name}
79 Release: %{_rel}@%{_kernel_ver_str}
81 Requires(post,postun): /sbin/depmod
82 %if %{with dist_kernel}
83 %requires_releq_kernel_smp
84 Requires(postun): %releq_kernel_smp
86 Provides: cdemu(kernel)
88 %description -n kernel-smp-misc-%{name}
89 This is driver for %{name} for Linux.
91 This package contains Linux SMP module.
93 %description -n kernel-smp-misc-%{name} -l pl
94 Sterownik dla Linuksa do %{name}.
96 Ten pakiet zawiera modu³ j±dra Linuksa SMP.
103 for cfg in %{?with_dist_kernel:%{?with_smp:smp} up}%{!?with_dist_kernel:nondist}; do
104 if [ ! -r "%{_kernelsrcdir}/config-$cfg" ]; then
108 install -d include/{linux,config}
109 ln -sf %{_kernelsrcdir}/config-$cfg .config
110 ln -sf %{_kernelsrcdir}/include/linux/autoconf-$cfg.h include/linux/autoconf.h
111 ln -sf %{_kernelsrcdir}/include/asm-%{_target_base_arch} include/asm
112 ln -sf %{_kernelsrcdir}/Module.symvers-$cfg Module.symvers
113 touch include/config/MARKER
115 %{__make} -C %{_kernelsrcdir} clean \
116 RCS_FIND_IGNORE="-name '*.ko' -o" \
119 %{__make} -C %{_kernelsrcdir} modules \
120 CC="%{__cc}" CPP="%{__cpp}" \
129 rm -rf $RPM_BUILD_ROOT
131 %if %{with userspace}
132 install -d $RPM_BUILD_ROOT%{py_sitedir}
133 install libcdemu.py $RPM_BUILD_ROOT%{py_sitedir}/libcdemu.py
134 %py_comp $RPM_BUILD_ROOT
135 %py_ocomp $RPM_BUILD_ROOT
136 rm -f $RPM_BUILD_ROOT%{py_sitedir}/libcdemu.py
137 install -d $RPM_BUILD_ROOT%{_bindir}
138 install cdemu $RPM_BUILD_ROOT%{_bindir}/cdemu
142 install -d $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}{,smp}/misc
143 install cdemu-%{?with_dist_kernel:up}%{!?with_dist_kernel:nondist}.ko \
144 $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}/misc/cdemu.ko
145 %if %{with smp} && %{with dist_kernel}
146 install cdemu-smp.ko \
147 $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}smp/misc/cdemu.ko
152 rm -rf $RPM_BUILD_ROOT
154 %post -n kernel-misc-%{name}
155 %depmod %{_kernel_ver}
157 %postun -n kernel-misc-%{name}
158 %depmod %{_kernel_ver}
160 %post -n kernel-smp-misc-%{name}
161 %depmod %{_kernel_ver}smp
163 %postun -n kernel-smp-misc-%{name}
164 %depmod %{_kernel_ver}smp
167 %files -n kernel-misc-%{name}
168 %defattr(644,root,root,755)
169 /lib/modules/%{_kernel_ver}/misc/*.ko*
171 %if %{with smp} && %{with dist_kernel}
172 %files -n kernel-smp-misc-%{name}
173 %defattr(644,root,root,755)
174 /lib/modules/%{_kernel_ver}smp/misc/*.ko*
178 %if %{with userspace}
180 %defattr(644,root,root,755)
181 %doc AUTHORS ChangeLog TODO
182 %attr(755,root,root) %{_bindir}/cdemu
183 %{py_sitedir}/*.py[co]