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: http://www.kernel.pl/~adasi/%{name}-%{snap}.tar.bz2
17 # Source0-md5: b0ea281df97c830642c5917cfc435d6c
19 Source2: %{name}.sysconf
20 Patch0: %{name}-automake.patch
21 URL: http://dxr3.sourceforge.net/
23 BuildRequires: autoconf
24 BuildRequires: automake
25 BuildRequires: libtool
26 BuildRequires: gtk+-devel >= 1.2.0
28 %if %{with kernel} && %{with dist_kernel}
29 BuildRequires: kernel-headers
30 BuildRequires: rpmbuild(macros) >= 1.118
32 Requires(post,preun): /sbin/chkconfig
33 Requires: %{name}-libs = %{version}-%{release}
35 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
38 em8300 is a Linux driver for Creative DXR3 and Sigma Designs
39 Hollywood+ cards. Both cards are hardware MPEG1, MPEG2, AC3 decoders.
40 Additionaly Xine and MPlayer with help of this driver allow you to
41 play all the video formats that they recognise through the tv-out of
45 em8300 pozwala na uruchomienie pod Linuksem kart Creative DXR3 i Sigma
46 Designs Hollywood+. Obie karty, o prawie identycznej konstrukcji s±
47 sprzêtowymi dekoderami MPEG1, MPEG2 i AC3. Programy Xine i MPlayer
48 pozwalaj± przy u¿yciu tego sterownika na odtwarzanie przez wyj¶cie
49 telewizyjne tych kart nie tylko w/w formatów, ale tak¿e wszystkich
50 formatów video, które te programy rozpoznaj±.
53 Summary: libdxr3 library for DXR3/Hollywood+ cards
54 Summary(pl): Biblioteka libdxr3 do kart DXR3/Hollywood+
58 libdxr3 library for DXR3/Hollywood+ cards.
60 %description libs -l pl
61 Biblioteka libdxr3 do kart DXR3/Hollywood+.
64 Summary: Files required to develop programs using em8300
65 Summary(pl): Pliki potrzebne do tworzenia programów korzystaj±cych z em8300
66 Group: Development/Libraries
67 Requires: %{name}-libs = %{version}-%{release}
70 Header files and additional scripts useful for developers of em8300
73 %description devel -l pl
74 Pliki nag³ówkowe i skrypty przydatne dla autorów aplikacji
75 korzystaj±cych z em8300.
78 Summary: Static libraries for em8300
79 Summary(pl): Statyczne biblioteki dla em8300
80 Group: Development/Libraries
81 Requires: %{name}-devel = %{version}-%{release}
84 Static libraries for em8300.
86 %description static -l pl
87 Statyczne biblioteki dla em8300.
90 Summary: Utility programs for em8300 using gtk+
91 Summary(pl): Programy u¿ytkowe em8300 u¿ywaj±ce bibliteki gtk+
92 Group: X11/Applications
93 Requires: %{name} = %{version}-%{release}
96 Utility programs for em8300 using gtk+ toolkit.
98 %description gtk -l pl
99 Programy u¿ytkowe em8300 u¿ywaj±ce biblioteki gtk+.
101 %package -n kernel-video-em8300
102 Summary: em8300 Linux kernel modules
103 Summary(pl): Modu³y j±dra Linuksa em8300
105 %{?with_dist_kernel:%requires_releq_kernel_up}
106 Requires(post,postun): /sbin/depmod
108 %description -n kernel-video-em8300
109 em8300 Linux kernel modules.
111 %description -n kernel-video-em8300 -l pl
112 Modu³y j±dra Linuksa em8300.
114 %package -n kernel-smp-video-em8300
115 Summary: em8300 Linux SMP kernel modules
116 Summary(pl): Modu³y j±dra Linuksa SMP em8300
118 %{?with_dist_kernel:%requires_releq_kernel_smp}
119 Requires(post,postun): /sbin/depmod
121 %description -n kernel-smp-video-em8300
122 em8300 Linux SMP kernel modules.
124 %description -n kernel-smp-video-em8300 -l pl
125 Modu³y j±dra Linuksa SMP em8300.
132 %if %{with userspace}
134 %{__aclocal} -I autotools
145 KERNEL_LOCATION="%{_kernelsrcdir}" \
146 EM8300_DEBUG="%{rpmcflags} -D__KERNEL_SMP"
148 for f in em8300.ko adv717x.ko bt865.ko; do
155 KERNEL_LOCATION="%{_kernelsrcdir}" \
156 EM8300_DEBUG="%{rpmcflags}"
160 rm -rf $RPM_BUILD_ROOT
162 %if %{with userspace}
164 DESTDIR=$RPM_BUILD_ROOT
166 mv -f modules/{INSTALL,INSTALL.modules}
168 install -D modules/em8300.uc $RPM_BUILD_ROOT%{_datadir}/misc/em8300.uc
170 install scripts/microcode_upload.pl $RPM_BUILD_ROOT%{_bindir}/em8300_microcode_upload
172 install -D %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
173 install -D %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/%{name}
175 rm -f $RPM_BUILD_ROOT%{_datadir}/em8300/{modules.tar.gz,em8300.sysv}
179 install -d $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}{,smp}/kernel/drivers/video
180 for f in em8300.ko adv717x.ko bt865.ko; do
182 $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}/kernel/drivers/video/$f
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/*.ko*
262 %files -n kernel-smp-video-em8300
263 %defattr(644,root,root,755)
264 /lib/modules/%{_kernel_ver}smp/kernel/drivers/video/*.ko*