3 %bcond_without dist_kernel # without distribution kernel
4 %bcond_without kernel # don't build kernel modules
5 %bcond_without userspace # don't build userspace tools
7 # sparc(32) disabled - no I2C_ALGOBIT in kernel24
8 %ifarch %{ix86} alpha ppc sparc64
9 %define _kernelsrcdir /usr/src/linux-2.4
14 Summary: DXR3 and H+ driver
15 Summary(pl): Sterowniki dla DXR3 i H+
20 Group: Applications/System
21 Source0: http://dl.sourceforge.net/dxr3/%{name}-%{version}.tar.gz
22 # Source0-md5: b0ea281df97c830642c5917cfc435d6c
24 Source2: %{name}.sysconf
25 Patch0: %{name}-automake.patch
26 URL: http://dxr3.sourceforge.net/
28 BuildRequires: autoconf
29 BuildRequires: automake
30 BuildRequires: libtool
31 BuildRequires: gtk+-devel >= 1.2.0
33 %if %{with kernel} && %{with dist_kernel}
34 BuildRequires: kernel24-headers >= 2.4
35 BuildRequires: rpmbuild(macros) >= 1.118
37 Requires(post,preun): /sbin/chkconfig
38 Requires: %{name}-libs = %{version}-%{release}
40 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
43 em8300 is a Linux driver for Creative DXR3 and Sigma Designs
44 Hollywood+ cards. Both cards are hardware MPEG1, MPEG2, AC3 decoders.
45 Additionaly Xine and MPlayer with help of this driver allow you to
46 play all the video formats that they recognise through the tv-out of
50 em8300 pozwala na uruchomienie pod Linuksem kart Creative DXR3 i Sigma
51 Designs Hollywood+. Obie karty, o prawie identycznej konstrukcji s±
52 sprzêtowymi dekoderami MPEG1, MPEG2 i AC3. Programy Xine i MPlayer
53 pozwalaj± przy u¿yciu tego sterownika na odtwarzanie przez wyj¶cie
54 telewizyjne tych kart nie tylko w/w formatów, ale tak¿e wszystkich
55 formatów video, które te programy rozpoznaj±.
58 Summary: libdxr3 library for DXR3/Hollywood+ cards
59 Summary(pl): Biblioteka libdxr3 do kart DXR3/Hollywood+
63 libdxr3 library for DXR3/Hollywood+ cards.
65 %description libs -l pl
66 Biblioteka libdxr3 do kart DXR3/Hollywood+.
69 Summary: Files required to develop programs using em8300
70 Summary(pl): Pliki potrzebne do tworzenia programów korzystaj±cych z em8300
71 Group: Development/Libraries
72 Requires: %{name}-libs = %{version}-%{release}
75 Header files and additional scripts useful for developers of em8300
78 %description devel -l pl
79 Pliki nag³ówkowe i skrypty przydatne dla autorów aplikacji
80 korzystaj±cych z em8300.
83 Summary: Static libraries for em8300
84 Summary(pl): Statyczne biblioteki dla em8300
85 Group: Development/Libraries
86 Requires: %{name}-devel = %{version}-%{release}
89 Static libraries for em8300.
91 %description static -l pl
92 Statyczne biblioteki dla em8300.
95 Summary: Utility programs for em8300 using gtk+
96 Summary(pl): Programy u¿ytkowe em8300 u¿ywaj±ce bibliteki gtk+
97 Group: X11/Applications
98 Requires: %{name} = %{version}-%{release}
101 Utility programs for em8300 using gtk+ toolkit.
103 %description gtk -l pl
104 Programy u¿ytkowe em8300 u¿ywaj±ce biblioteki gtk+.
106 %package -n kernel24-video-em8300
107 Summary: em8300 Linux kernel modules
108 Summary(pl): Modu³y j±dra Linuksa em8300
110 Release: %{_rel}@%{_kernel_ver_str}
111 %{?with_dist_kernel:%requires_releq_kernel_up}
112 Requires(post,postun): /sbin/depmod
114 %description -n kernel24-video-em8300
115 em8300 Linux kernel modules.
117 %description -n kernel24-video-em8300 -l pl
118 Modu³y j±dra Linuksa em8300.
120 %package -n kernel24-smp-video-em8300
121 Summary: em8300 Linux SMP kernel modules
122 Summary(pl): Modu³y j±dra Linuksa SMP em8300
124 Release: %{_rel}@%{_kernel_ver_str}
125 %{?with_dist_kernel:%requires_releq_kernel_smp}
126 Requires(post,postun): /sbin/depmod
128 %description -n kernel24-smp-video-em8300
129 em8300 Linux SMP kernel modules.
131 %description -n kernel24-smp-video-em8300 -l pl
132 Modu³y j±dra Linuksa SMP em8300.
139 %if %{with userspace}
141 %{__aclocal} -I autotools
150 %{__make} -C modules \
151 KERNEL_LOCATION="%{_kernelsrcdir}" \
152 EM8300_DEBUG="%{rpmcflags} -D__KERNEL_SMP"
154 for f in em8300.o adv717x.o bt865.o; do
155 mv -f modules/$f modules/$f.smp
158 %{__make} -C modules clean
160 %{__make} -C modules \
161 KERNEL_LOCATION="%{_kernelsrcdir}" \
162 EM8300_DEBUG="%{rpmcflags}"
166 rm -rf $RPM_BUILD_ROOT
168 %if %{with userspace}
170 DESTDIR=$RPM_BUILD_ROOT
172 mv -f modules/{INSTALL,INSTALL.modules}
174 install -D modules/em8300.uc $RPM_BUILD_ROOT%{_datadir}/misc/em8300.uc
176 install scripts/microcode_upload.pl $RPM_BUILD_ROOT%{_bindir}/em8300_microcode_upload
178 install -D %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
179 install -D %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/%{name}
181 rm -f $RPM_BUILD_ROOT%{_datadir}/em8300/{modules.tar.gz,em8300.sysv}
185 install -d $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}{,smp}/kernel/drivers/video
186 for f in em8300.o adv717x.o bt865.o; do
188 $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}/kernel/drivers/video/$f
189 install modules/$f.smp \
190 $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}smp/kernel/drivers/video/$f
195 rm -rf $RPM_BUILD_ROOT
198 /sbin/chkconfig --add %{name}
199 if [ -f /var/lock/subsys/%{name} ]; then
200 /etc/rc.d/init.d/%{name} restart 1>&2
202 echo "Run \"/etc/rc.d/init.d/%{name} start\" to load %{name} modules."
206 if [ "$1" = "0" ]; then
207 if [ -f /var/lock/subsys/%{name} ]; then
208 /etc/rc.d/init.d/%{name} stop 1>&2
210 /sbin/chkconfig --del %{name}
213 %post libs -p /sbin/ldconfig
214 %postun libs -p /sbin/ldconfig
216 %post -n kernel24-video-em8300
217 %depmod %{_kernel_ver}
219 %postun -n kernel24-video-em8300
220 %depmod %{_kernel_ver}
222 %post -n kernel24-smp-video-em8300
223 %depmod %{_kernel_ver}smp
225 %postun -n kernel24-smp-video-em8300
226 %depmod %{_kernel_ver}smp
228 %if %{with userspace}
230 %defattr(644,root,root,755)
231 %doc AUTHORS ChangeLog README modules/{README*,INSTALL*,devices.sh,devfs_symlinks}
232 %attr(755,root,root) %{_bindir}/em8300_microcode_upload
233 %{_datadir}/misc/em8300.uc
234 %dir %{_datadir}/em8300
235 %{_datadir}/em8300/em8300.pm
236 %attr(755,root,root) %{_datadir}/em8300/*.pl
237 %attr(754,root,root) /etc/rc.d/init.d/%{name}
238 %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/%{name}
241 %defattr(644,root,root,755)
242 %attr(755,root,root) %{_libdir}/lib*.so.*.*.*
245 %defattr(644,root,root,755)
246 %attr(755,root,root) %{_libdir}/lib*.so
248 %{_includedir}/libdxr3
249 %{_includedir}/linux/em8300.h
252 %defattr(644,root,root,755)
256 %defattr(644,root,root,755)
257 %attr(755,root,root) %{_bindir}/autocal
258 %attr(755,root,root) %{_bindir}/dhc
259 %attr(755,root,root) %{_bindir}/dxr3view
260 %attr(755,root,root) %{_bindir}/em8300setup
264 %files -n kernel24-video-em8300
265 %defattr(644,root,root,755)
266 /lib/modules/%{_kernel_ver}/kernel/drivers/video/*.o*
268 %files -n kernel24-smp-video-em8300
269 %defattr(644,root,root,755)
270 /lib/modules/%{_kernel_ver}smp/kernel/drivers/video/*.o*