]>
Commit | Line | Data |
---|---|---|
098914b8 | 1 | # |
57c23754 | 2 | # TODO: |
3 | # - find/make a patch for newer (2.6.22 here) kernels | |
4 | # | |
098914b8 | 5 | # Conditional build: |
85d75660 | 6 | %bcond_without dist_kernel # without distribution kernel |
85d75660 | 7 | %bcond_without kernel # without kernel packages |
8 | %bcond_with verbose # verbose build (V=1) | |
098914b8 JB |
9 | %bcond_without userspace # don't build userspace tools |
10 | # | |
15e0cf7b | 11 | %define _rel 0.1 |
c403d281 | 12 | Summary: Simulate a CD drive + CD with just simple cue/bin files |
acb47d25 | 13 | Summary(pl.UTF-8): Symulacja napędu CD z płytką przy użyciu plików cue/bin |
c403d281 | 14 | Name: cdemu |
104d95ed | 15 | Version: 0.8 |
85d75660 | 16 | Release: %{_rel} |
17 | License: GPL v2 | |
c403d281 | 18 | Group: Applications/System |
15e0cf7b | 19 | Source0: http://dl.sourceforge.net/cdemu/%{name}-%{version}.tar.bz2 |
20 | # Source0-md5: e5e60f73caf168936c38f115ecf4a144 | |
85d75660 | 21 | URL: http://www.cdemu.org/ |
22 | %if %{with userspace} | |
23 | %pyrequires_eq python-libs | |
24 | BuildRequires: python-devel | |
85d75660 | 25 | %endif |
098914b8 | 26 | %if %{with kernel} |
705ffa44 | 27 | %{?with_dist_kernel:BuildRequires: kernel%{_alt_kernel}-module-build >= 3:2.6.7} |
28 | BuildRequires: rpmbuild(macros) >= 1.330 | |
098914b8 | 29 | %endif |
85d75660 | 30 | Requires: cdemu(kernel) |
3b538563 | 31 | Requires: dev >= 2.9.0-16 |
c403d281 AM |
32 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
33 | ||
34 | %description | |
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). | |
42 | ||
85d75660 | 43 | This package includes userspace tools for %{name}. |
44 | ||
b5ca3749 JR |
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. | |
098914b8 | 53 | |
b5ca3749 | 54 | Ten pakiet zawiera narzędzia użytkownika dla %{name}. |
85d75660 | 55 | |
705ffa44 | 56 | %package -n kernel%{_alt_kernel}-misc-%{name} |
85d75660 | 57 | Summary: Linux driver for %{name} |
acb47d25 | 58 | Summary(pl.UTF-8): Sterownik dla Linuksa do %{name} |
85d75660 | 59 | Release: %{_rel}@%{_kernel_ver_str} |
60 | Group: Base/Kernel | |
61 | Requires(post,postun): /sbin/depmod | |
62 | %if %{with dist_kernel} | |
57c23754 | 63 | %requires_releq_kernel |
64 | Requires(postun): %releq_kernel | |
85d75660 | 65 | %endif |
66 | Provides: cdemu(kernel) | |
67 | ||
705ffa44 | 68 | %description -n kernel%{_alt_kernel}-misc-%{name} |
85d75660 | 69 | This is driver for %{name} for Linux. |
70 | ||
71 | This package contains Linux module. | |
72 | ||
b5ca3749 | 73 | %description -n kernel%{_alt_kernel}-misc-%{name} -l pl.UTF-8 |
85d75660 | 74 | Sterownik dla Linuksa do %{name}. |
75 | ||
b5ca3749 | 76 | Ten pakiet zawiera moduł jądra Linuksa. |
85d75660 | 77 | |
c403d281 | 78 | %prep |
85d75660 | 79 | %setup -q |
705ffa44 | 80 | cat > Makefile <<'EOF' |
81 | obj-m := cdemu.o | |
82 | cdemu-objs := cdemu_core.o cdemu_mod.o cdemu_proc.o | |
83 | EOF | |
c403d281 AM |
84 | |
85 | %build | |
705ffa44 | 86 | %build_kernel_modules -m cdemu |
c403d281 AM |
87 | |
88 | %install | |
89 | rm -rf $RPM_BUILD_ROOT | |
90 | ||
098914b8 | 91 | %if %{with userspace} |
85d75660 | 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 | |
99 | %endif | |
100 | ||
101 | %if %{with kernel} | |
705ffa44 | 102 | %install_kernel_modules -m cdemu -d misc |
098914b8 | 103 | %endif |
c403d281 AM |
104 | |
105 | %clean | |
106 | rm -rf $RPM_BUILD_ROOT | |
107 | ||
705ffa44 | 108 | %post -n kernel%{_alt_kernel}-misc-%{name} |
85d75660 | 109 | %depmod %{_kernel_ver} |
110 | ||
705ffa44 | 111 | %postun -n kernel%{_alt_kernel}-misc-%{name} |
85d75660 | 112 | %depmod %{_kernel_ver} |
113 | ||
85d75660 | 114 | %if %{with kernel} |
04149640 | 115 | %if %{with up} || %{without dist_kernel} |
705ffa44 | 116 | %files -n kernel%{_alt_kernel}-misc-%{name} |
85d75660 | 117 | %defattr(644,root,root,755) |
705ffa44 | 118 | /lib/modules/%{_kernel_ver}/misc/cdemu.ko* |
04149640 | 119 | %endif |
85d75660 | 120 | |
85d75660 | 121 | %endif |
122 | ||
098914b8 | 123 | %if %{with userspace} |
c403d281 AM |
124 | %files |
125 | %defattr(644,root,root,755) | |
126 | %doc AUTHORS ChangeLog TODO | |
85d75660 | 127 | %attr(755,root,root) %{_bindir}/cdemu |
128 | %{py_sitedir}/*.py[co] | |
098914b8 | 129 | %endif |