]> git.pld-linux.org Git - packages/cdemu.git/blob - cdemu.spec
789656d2760f7fbbba62ffb9a13c300b13be12cf
[packages/cdemu.git] / cdemu.spec
1 #
2 # Conditional build:
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
8 #
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
11 Name:           cdemu
12 Version:        0.7
13 %define         _rel    1
14 Release:        %{_rel}
15 License:        GPL v2
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/
20 %if %{with userspace}
21 %pyrequires_eq  python-libs
22 BuildRequires:  python-devel
23 %endif
24 %if %{with kernel}
25 %{?with_dist_kernel:BuildRequires:      kernel-module-build >= 2.6.7}
26 BuildRequires:  rpmbuild(macros) >= 1.153
27 %endif
28 Requires:       dev >= 2.9.0-16
29 Requires:       cdemu(kernel)
30 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
31
32 %description
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).
40
41 This package includes userspace tools for %{name}.
42
43 %description -l pl
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.
51
52 Ten pakiet zawiera narzêdzia u¿ytkownika dla %{name}.
53
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}
58 Group:          Base/Kernel
59 Requires(post,postun):  /sbin/depmod
60 %if %{with dist_kernel}
61 %requires_releq_kernel_up
62 Requires(postun):       %releq_kernel_up
63 %endif
64 Provides:       cdemu(kernel)
65
66 %description -n kernel-misc-%{name}
67 This is driver for %{name} for Linux.
68
69 This package contains Linux module.
70
71 %description -n kernel-misc-%{name} -l pl
72 Sterownik dla Linuksa do %{name}.
73
74 Ten pakiet zawiera modu³ j±dra Linuksa.
75
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}
80 Group:          Base/Kernel
81 Requires(post,postun):  /sbin/depmod
82 %if %{with dist_kernel}
83 %requires_releq_kernel_smp
84 Requires(postun):       %releq_kernel_smp
85 %endif
86 Provides:       cdemu(kernel)
87
88 %description -n kernel-smp-misc-%{name}
89 This is driver for %{name} for Linux.
90
91 This package contains Linux SMP module.
92
93 %description -n kernel-smp-misc-%{name} -l pl
94 Sterownik dla Linuksa do %{name}.
95
96 Ten pakiet zawiera modu³ j±dra Linuksa SMP.
97
98 %prep
99 %setup -q
100
101 %build
102 %if %{with kernel}
103 for cfg in %{?with_dist_kernel:%{?with_smp:smp} up}%{!?with_dist_kernel:nondist}; do
104         if [ ! -r "%{_kernelsrcdir}/config-$cfg" ]; then
105                 exit 1
106         fi
107         rm -rf include
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
114
115         %{__make} -C %{_kernelsrcdir} clean \
116                 RCS_FIND_IGNORE="-name '*.ko' -o" \
117                 M=$PWD O=$PWD \
118                 %{?with_verbose:V=1}
119         %{__make} -C %{_kernelsrcdir} modules \
120                 CC="%{__cc}" CPP="%{__cpp}" \
121                 M=$PWD O=$PWD \
122                 %{?with_verbose:V=1}
123
124         mv cdemu{,-$cfg}.ko
125 done
126 %endif
127
128 %install
129 rm -rf $RPM_BUILD_ROOT
130
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
139 %endif
140
141 %if %{with kernel}
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
148 %endif
149 %endif
150
151 %clean
152 rm -rf $RPM_BUILD_ROOT
153
154 %post   -n kernel-misc-%{name}
155 %depmod %{_kernel_ver}
156
157 %postun -n kernel-misc-%{name}
158 %depmod %{_kernel_ver}
159
160 %post   -n kernel-smp-misc-%{name}
161 %depmod %{_kernel_ver}smp
162
163 %postun -n kernel-smp-misc-%{name}
164 %depmod %{_kernel_ver}smp
165
166 %if %{with kernel}
167 %files -n kernel-misc-%{name}
168 %defattr(644,root,root,755)
169 /lib/modules/%{_kernel_ver}/misc/*.ko*
170
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*
175 %endif
176 %endif
177
178 %if %{with userspace}
179 %files
180 %defattr(644,root,root,755)
181 %doc AUTHORS ChangeLog TODO
182 %attr(755,root,root) %{_bindir}/cdemu
183 %{py_sitedir}/*.py[co]
184 %endif
This page took 0.047845 seconds and 2 git commands to generate.