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
8 Summary: DXR3 and H+ driver
9 Summary(pl): Sterowniki dla DXR3 i H+
14 Group: Applications/System
15 Source0: http://dl.sourceforge.net/dxr3/%{name}-%{version}.tar.gz
16 # Source0-md5: c203eade5e6002d279d50cae4a947964
18 Source2: %{name}.sysconf
19 Patch0: %{name}-automake.patch
20 URL: http://dxr3.sourceforge.net/
22 BuildRequires: autoconf
23 BuildRequires: automake
24 BuildRequires: gtk+-devel >= 1.2.0
25 BuildRequires: libtool
27 %if %{with kernel} && %{with dist_kernel}
28 BuildRequires: kernel-headers
29 BuildRequires: rpmbuild(macros) >= 1.118
31 Requires(post,preun): /sbin/chkconfig
32 Requires: %{name}-libs = %{version}-%{release}
34 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
37 em8300 is a Linux driver for Creative DXR3 and Sigma Designs
38 Hollywood+ cards. Both cards are hardware MPEG1, MPEG2, AC3 decoders.
39 Additionaly Xine and MPlayer with help of this driver allow you to
40 play all the video formats that they recognise through the tv-out of
44 em8300 pozwala na uruchomienie pod Linuksem kart Creative DXR3 i Sigma
45 Designs Hollywood+. Obie karty, o prawie identycznej konstrukcji s±
46 sprzêtowymi dekoderami MPEG1, MPEG2 i AC3. Programy Xine i MPlayer
47 pozwalaj± przy u¿yciu tego sterownika na odtwarzanie przez wyj¶cie
48 telewizyjne tych kart nie tylko w/w formatów, ale tak¿e wszystkich
49 formatów video, które te programy rozpoznaj±.
52 Summary: libdxr3 library for DXR3/Hollywood+ cards
53 Summary(pl): Biblioteka libdxr3 do kart DXR3/Hollywood+
57 libdxr3 library for DXR3/Hollywood+ cards.
59 %description libs -l pl
60 Biblioteka libdxr3 do kart DXR3/Hollywood+.
63 Summary: Files required to develop programs using em8300
64 Summary(pl): Pliki potrzebne do tworzenia programów korzystaj±cych z em8300
65 Group: Development/Libraries
66 Requires: %{name}-libs = %{version}-%{release}
69 Header files and additional scripts useful for developers of em8300
72 %description devel -l pl
73 Pliki nag³ówkowe i skrypty przydatne dla autorów aplikacji
74 korzystaj±cych z em8300.
77 Summary: Static libraries for em8300
78 Summary(pl): Statyczne biblioteki dla em8300
79 Group: Development/Libraries
80 Requires: %{name}-devel = %{version}-%{release}
83 Static libraries for em8300.
85 %description static -l pl
86 Statyczne biblioteki dla em8300.
89 Summary: Utility programs for em8300 using GTK+
90 Summary(pl): Programy u¿ytkowe em8300 u¿ywaj±ce bibliteki GTK+
91 Group: X11/Applications
92 Requires: %{name} = %{version}-%{release}
95 Utility programs for em8300 using GTK+ toolkit.
97 %description gtk -l pl
98 Programy u¿ytkowe em8300 u¿ywaj±ce biblioteki GTK+.
100 %package -n kernel-video-em8300
101 Summary: em8300 Linux kernel modules
102 Summary(pl): Modu³y j±dra Linuksa em8300
104 %{?with_dist_kernel:%requires_releq_kernel_up}
105 Requires(post,postun): /sbin/depmod
107 %description -n kernel-video-em8300
108 em8300 Linux kernel modules.
110 %description -n kernel-video-em8300 -l pl
111 Modu³y j±dra Linuksa em8300.
113 %package -n kernel-smp-video-em8300
114 Summary: em8300 Linux SMP kernel modules
115 Summary(pl): Modu³y j±dra Linuksa SMP em8300
117 %{?with_dist_kernel:%requires_releq_kernel_smp}
118 Requires(post,postun): /sbin/depmod
120 %description -n kernel-smp-video-em8300
121 em8300 Linux SMP kernel modules.
123 %description -n kernel-smp-video-em8300 -l pl
124 Modu³y j±dra Linuksa SMP em8300.
131 %if %{with userspace}
133 %{__aclocal} -I autotools
144 install -d include/{linux,config}
145 ln -sf %{_kernelsrcdir}/config-smp .config
146 ln -sf %{_kernelsrcdir}/include/linux/autoconf-up.h include/linux/autoconf.h
147 ln -sf %{_kernelsrcdir}/include/asm-%{_target_base_arch} include/asm
148 touch include/config/MARKER
150 %{__make} -C %{_kernelsrcdir} \
151 KERNEL_LOCATION="%{_kernelsrcdir}" M=$PWD O=$PWD \
152 EM8300_DEBUG="%{rpmcflags} -D__KERNEL_SMP" modules
154 for f in em8300.ko adv717x.ko bt865.ko; do
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.ko adv717x.ko bt865.ko; 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 kernel-video-em8300
217 %depmod %{_kernel_ver}
219 %postun -n kernel-video-em8300
220 %depmod %{_kernel_ver}
222 %post -n kernel-smp-video-em8300
223 %depmod %{_kernel_ver}smp
225 %postun -n kernel-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 md5 mtime size) /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 kernel-video-em8300
265 %defattr(644,root,root,755)
266 /lib/modules/%{_kernel_ver}/kernel/drivers/video/*.ko*
268 %files -n kernel-smp-video-em8300
269 %defattr(644,root,root,755)
270 /lib/modules/%{_kernel_ver}smp/kernel/drivers/video/*.ko*