3 # - find/make a patch for newer (2.6.22 here) kernels
6 %bcond_without dist_kernel # without distribution kernel
7 %bcond_without kernel # without kernel packages
8 %bcond_with verbose # verbose build (V=1)
9 %bcond_without userspace # don't build userspace tools
12 Summary: Simulate a CD drive + CD with just simple cue/bin files
13 Summary(pl.UTF-8): Symulacja napędu CD z płytką przy użyciu plików cue/bin
18 Group: Applications/System
19 Source0: http://dl.sourceforge.net/cdemu/%{name}-%{version}.tar.bz2
20 # Source0-md5: e5e60f73caf168936c38f115ecf4a144
21 URL: http://www.cdemu.org/
23 %pyrequires_eq python-libs
24 BuildRequires: python-devel
27 %{?with_dist_kernel:BuildRequires: kernel%{_alt_kernel}-module-build >= 3:2.6.7}
28 BuildRequires: rpmbuild(macros) >= 1.330
30 Requires: cdemu(kernel)
31 Requires: dev >= 2.9.0-16
32 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
35 CDemu is a kernel module for Linux. It is designed to simulate a CD
36 drive + CD with just simple cue/bin files, which are pretty common in
37 the Windows world. It includes an user space program to control the
38 kernel module. You can use it to watch an SVCD or mount the data track
39 of an bin/cue. However, for watching an SVCD, we would recommend
40 MPlayer which can play bin/cue images directly with the patch a friend
41 and I made for it (more under History).
43 This package includes userspace tools for %{name}.
45 %description -l pl.UTF-8
46 CDemu to moduł jądra Linuksa. Został zaprojektowany do symulowania
47 napędu CD z płytką przy użyciu plików cue/bin, które są dość popularne
48 w świecie windowsowym. Zawiera program działający w przestrzeni
49 użytkownika służący do kontroli pracy modułu. Można używać go do
50 oglądania SVCD lub montowania ścieżek danych z bin/cue. Mimo to
51 autorzy do oglądania SVCD polecają raczej MPlayera ze swoją łatką,
52 który może odtwarzać obrazy bin/cur bezpośrednio.
54 Ten pakiet zawiera narzędzia użytkownika dla %{name}.
56 %package -n kernel%{_alt_kernel}-misc-%{name}
57 Summary: Linux driver for %{name}
58 Summary(pl.UTF-8): Sterownik dla Linuksa do %{name}
59 Release: %{_rel}@%{_kernel_ver_str}
61 Requires(post,postun): /sbin/depmod
62 %if %{with dist_kernel}
63 %requires_releq_kernel
64 Requires(postun): %releq_kernel
66 Provides: cdemu(kernel)
68 %description -n kernel%{_alt_kernel}-misc-%{name}
69 This is driver for %{name} for Linux.
71 This package contains Linux module.
73 %description -n kernel%{_alt_kernel}-misc-%{name} -l pl.UTF-8
74 Sterownik dla Linuksa do %{name}.
76 Ten pakiet zawiera moduł jądra Linuksa.
80 cat > Makefile <<'EOF'
82 cdemu-objs := cdemu_core.o cdemu_mod.o cdemu_proc.o
86 %build_kernel_modules -m cdemu
89 rm -rf $RPM_BUILD_ROOT
92 install -d $RPM_BUILD_ROOT%{py_sitedir}
93 install libcdemu.py $RPM_BUILD_ROOT%{py_sitedir}/libcdemu.py
94 %py_comp $RPM_BUILD_ROOT
95 %py_ocomp $RPM_BUILD_ROOT
96 rm -f $RPM_BUILD_ROOT%{py_sitedir}/libcdemu.py
97 install -d $RPM_BUILD_ROOT%{_bindir}
98 install cdemu $RPM_BUILD_ROOT%{_bindir}/cdemu
102 %install_kernel_modules -m cdemu -d misc
106 rm -rf $RPM_BUILD_ROOT
108 %post -n kernel%{_alt_kernel}-misc-%{name}
109 %depmod %{_kernel_ver}
111 %postun -n kernel%{_alt_kernel}-misc-%{name}
112 %depmod %{_kernel_ver}
115 %if %{with up} || %{without dist_kernel}
116 %files -n kernel%{_alt_kernel}-misc-%{name}
117 %defattr(644,root,root,755)
118 /lib/modules/%{_kernel_ver}/misc/cdemu.ko*
123 %if %{with userspace}
125 %defattr(644,root,root,755)
126 %doc AUTHORS ChangeLog TODO
127 %attr(755,root,root) %{_bindir}/cdemu
128 %{py_sitedir}/*.py[co]