]> git.pld-linux.org Git - packages/cdemu.git/blob - cdemu.spec
- previous commit reverted (mistake)
[packages/cdemu.git] / cdemu.spec
1 #
2 # TODO:
3 # - find/make a patch for newer (2.6.22 here) kernels
4 #
5 # Conditional build:
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
10 #
11 %define         _rel    0.1
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
14 Name:           cdemu
15 Version:        0.8
16 Release:        %{_rel}
17 License:        GPL v2
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/
22 %if %{with userspace}
23 %pyrequires_eq  python-libs
24 BuildRequires:  python-devel
25 %endif
26 %if %{with kernel}
27 %{?with_dist_kernel:BuildRequires:      kernel%{_alt_kernel}-module-build >= 3:2.6.7}
28 BuildRequires:  rpmbuild(macros) >= 1.330
29 %endif
30 Requires:       cdemu(kernel)
31 Requires:       dev >= 2.9.0-16
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
43 This package includes userspace tools for %{name}.
44
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.
53
54 Ten pakiet zawiera narzędzia użytkownika dla %{name}.
55
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}
60 Group:          Base/Kernel
61 Requires(post,postun):  /sbin/depmod
62 %if %{with dist_kernel}
63 %requires_releq_kernel
64 Requires(postun):       %releq_kernel
65 %endif
66 Provides:       cdemu(kernel)
67
68 %description -n kernel%{_alt_kernel}-misc-%{name}
69 This is driver for %{name} for Linux.
70
71 This package contains Linux module.
72
73 %description -n kernel%{_alt_kernel}-misc-%{name} -l pl.UTF-8
74 Sterownik dla Linuksa do %{name}.
75
76 Ten pakiet zawiera moduł jądra Linuksa.
77
78 %prep
79 %setup -q
80 cat > Makefile <<'EOF'
81 obj-m := cdemu.o
82 cdemu-objs := cdemu_core.o cdemu_mod.o cdemu_proc.o
83 EOF
84
85 %build
86 %build_kernel_modules -m cdemu
87
88 %install
89 rm -rf $RPM_BUILD_ROOT
90
91 %if %{with userspace}
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}
102 %install_kernel_modules -m cdemu -d misc
103 %endif
104
105 %clean
106 rm -rf $RPM_BUILD_ROOT
107
108 %post   -n kernel%{_alt_kernel}-misc-%{name}
109 %depmod %{_kernel_ver}
110
111 %postun -n kernel%{_alt_kernel}-misc-%{name}
112 %depmod %{_kernel_ver}
113
114 %if %{with kernel}
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*
119 %endif
120
121 %endif
122
123 %if %{with userspace}
124 %files
125 %defattr(644,root,root,755)
126 %doc AUTHORS ChangeLog TODO
127 %attr(755,root,root) %{_bindir}/cdemu
128 %{py_sitedir}/*.py[co]
129 %endif
This page took 0.061187 seconds and 3 git commands to generate.