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 Summary: DXR3 and H+ driver
8 Summary(pl): Sterowniki dla DXR3 i H+
13 Group: Applications/System
14 Source0: http://dxr3.sourceforge.net/download/%{name}-%{version}.tar.gz
15 # Source0-md5: 306984dfd4f0f29538179cbbf391f5a8
17 Source2: %{name}.sysconf
18 Patch0: %{name}-automake.patch
19 URL: http://dxr3.sourceforge.net/
21 BuildRequires: autoconf
22 BuildRequires: automake
23 BuildRequires: libtool
24 BuildRequires: gtk+-devel >= 1.2.0
26 %if %{with kernel} && %{with dist_kernel}
27 BuildRequires: kernel-headers >= 2.4
28 BuildRequires: kernel-headers < 2.5
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
142 %{__make} -C modules \
143 KERNEL_LOCATION="%{_kernelsrcdir}" \
144 EM8300_DEBUG="%{rpmcflags} -D__SMP__"
146 for f in em8300.o adv717x.o bt865.o; do
147 mv -f modules/$f modules/$f.smp
150 %{__make} -C modules clean
152 %{__make} -C modules \
153 KERNEL_LOCATION="%{_kernelsrcdir}" \
154 EM8300_DEBUG="%{rpmcflags}"
158 rm -rf $RPM_BUILD_ROOT
160 %if %{with userspace}
162 DESTDIR=$RPM_BUILD_ROOT
164 mv -f modules/{INSTALL,INSTALL.modules}
166 install -D modules/em8300.uc $RPM_BUILD_ROOT%{_datadir}/misc/em8300.uc
168 install scripts/microcode_upload.pl $RPM_BUILD_ROOT%{_bindir}/em8300_microcode_upload
170 install -D %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
171 install -D %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/%{name}
173 rm -f $RPM_BUILD_ROOT%{_datadir}/em8300/{modules.tar.gz,em8300.sysv}
177 %{__make} -C modules install-newkern \
178 KERNVER=%{_kernel_ver} \
179 SMODINST=kernel/drivers/video
180 prefix=$RPM_BUILD_ROOT
181 install -d $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}smp/kernel/drivers/video
182 for f in em8300.o adv717x.o bt865.o; do
183 install modules/$f.smp \
184 $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}smp/kernel/drivers/video/$f
189 rm -rf $RPM_BUILD_ROOT
192 /sbin/chkconfig --add %{name}
193 if [ -f /var/lock/subsys/%{name} ]; then
194 /etc/rc.d/init.d/%{name} restart 1>&2
196 echo "Run \"/etc/rc.d/init.d/%{name} start\" to load %{name} modules."
200 if [ "$1" = "0" ]; then
201 if [ -f /var/lock/subsys/%{name} ]; then
202 /etc/rc.d/init.d/%{name} stop 1>&2
204 /sbin/chkconfig --del %{name}
207 %post libs -p /sbin/ldconfig
208 %postun libs -p /sbin/ldconfig
210 %post -n kernel-video-em8300
211 %depmod %{_kernel_ver}
213 %postun -n kernel-video-em8300
214 %depmod %{_kernel_ver}
216 %post -n kernel-smp-video-em8300
217 %depmod %{_kernel_ver}smp
219 %postun -n kernel-smp-video-em8300
220 %depmod %{_kernel_ver}smp
222 %if %{with userspace}
224 %defattr(644,root,root,755)
225 %doc AUTHORS ChangeLog README modules/{README*,INSTALL*,devices.sh,devfs_symlinks}
226 %attr(755,root,root) %{_bindir}/em8300_microcode_upload
227 %{_datadir}/misc/em8300.uc
228 %dir %{_datadir}/em8300
229 %{_datadir}/em8300/em8300.pm
230 %attr(755,root,root) %{_datadir}/em8300/*.pl
231 %attr(754,root,root) /etc/rc.d/init.d/%{name}
232 %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/%{name}
235 %defattr(644,root,root,755)
236 %attr(755,root,root) %{_libdir}/lib*.so.*.*.*
239 %defattr(644,root,root,755)
240 %attr(755,root,root) %{_libdir}/lib*.so
242 %{_includedir}/libdxr3
243 %{_includedir}/linux/em8300.h
246 %defattr(644,root,root,755)
250 %defattr(644,root,root,755)
251 %attr(755,root,root) %{_bindir}/autocal
252 %attr(755,root,root) %{_bindir}/dhc
253 %attr(755,root,root) %{_bindir}/dxr3view
254 %attr(755,root,root) %{_bindir}/em8300setup
258 %files -n kernel-video-em8300
259 %defattr(644,root,root,755)
260 /lib/modules/%{_kernel_ver}/kernel/drivers/video/*.o*
262 %files -n kernel-smp-video-em8300
263 %defattr(644,root,root,755)
264 /lib/modules/%{_kernel_ver}smp/kernel/drivers/video/*.o*