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: 832f5a03826701a71193ca235973dd12
19 Source2: %{name}.sysconf
20 Patch0: %{name}-automake.patch
21 URL: http://dxr3.sourceforge.net/
23 BuildRequires: autoconf
24 BuildRequires: automake
25 BuildRequires: gtk+-devel >= 1.2.0
26 BuildRequires: libtool
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 install -d include/{linux,config}
146 ln -sf %{_kernelsrcdir}/config-smp .config
147 ln -sf %{_kernelsrcdir}/include/linux/autoconf-up.h include/linux/autoconf.h
148 ln -sf %{_kernelsrcdir}/include/asm-%{_target_base_arch} include/asm
149 touch include/config/MARKER
151 %{__make} -C %{_kernelsrcdir} \
152 KERNEL_LOCATION="%{_kernelsrcdir}" M=$PWD O=$PWD \
153 EM8300_DEBUG="%{rpmcflags} -D__KERNEL_SMP" modules
155 for f in em8300.ko adv717x.ko bt865.ko; do
162 KERNEL_LOCATION="%{_kernelsrcdir}" \
163 EM8300_DEBUG="%{rpmcflags}"
167 rm -rf $RPM_BUILD_ROOT
169 %if %{with userspace}
171 DESTDIR=$RPM_BUILD_ROOT
173 mv -f modules/{INSTALL,INSTALL.modules}
175 install -D modules/em8300.uc $RPM_BUILD_ROOT%{_datadir}/misc/em8300.uc
177 install scripts/microcode_upload.pl $RPM_BUILD_ROOT%{_bindir}/em8300_microcode_upload
179 install -D %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
180 install -D %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/%{name}
182 rm -f $RPM_BUILD_ROOT%{_datadir}/em8300/{modules.tar.gz,em8300.sysv}
186 install -d $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}{,smp}/kernel/drivers/video
187 for f in em8300.ko adv717x.ko bt865.ko; do
189 $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}/kernel/drivers/video/$f
190 install modules/$f.smp \
191 $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}smp/kernel/drivers/video/$f
196 rm -rf $RPM_BUILD_ROOT
199 /sbin/chkconfig --add %{name}
200 if [ -f /var/lock/subsys/%{name} ]; then
201 /etc/rc.d/init.d/%{name} restart 1>&2
203 echo "Run \"/etc/rc.d/init.d/%{name} start\" to load %{name} modules."
207 if [ "$1" = "0" ]; then
208 if [ -f /var/lock/subsys/%{name} ]; then
209 /etc/rc.d/init.d/%{name} stop 1>&2
211 /sbin/chkconfig --del %{name}
214 %post libs -p /sbin/ldconfig
215 %postun libs -p /sbin/ldconfig
217 %post -n kernel-video-em8300
218 %depmod %{_kernel_ver}
220 %postun -n kernel-video-em8300
221 %depmod %{_kernel_ver}
223 %post -n kernel-smp-video-em8300
224 %depmod %{_kernel_ver}smp
226 %postun -n kernel-smp-video-em8300
227 %depmod %{_kernel_ver}smp
229 %if %{with userspace}
231 %defattr(644,root,root,755)
232 %doc AUTHORS ChangeLog README modules/{README*,INSTALL*,devices.sh,devfs_symlinks}
233 %attr(755,root,root) %{_bindir}/em8300_microcode_upload
234 %{_datadir}/misc/em8300.uc
235 %dir %{_datadir}/em8300
236 %{_datadir}/em8300/em8300.pm
237 %attr(755,root,root) %{_datadir}/em8300/*.pl
238 %attr(754,root,root) /etc/rc.d/init.d/%{name}
239 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/%{name}
242 %defattr(644,root,root,755)
243 %attr(755,root,root) %{_libdir}/lib*.so.*.*.*
246 %defattr(644,root,root,755)
247 %attr(755,root,root) %{_libdir}/lib*.so
249 %{_includedir}/libdxr3
250 %{_includedir}/linux/em8300.h
253 %defattr(644,root,root,755)
257 %defattr(644,root,root,755)
258 %attr(755,root,root) %{_bindir}/autocal
259 %attr(755,root,root) %{_bindir}/dhc
260 %attr(755,root,root) %{_bindir}/dxr3view
261 %attr(755,root,root) %{_bindir}/em8300setup
265 %files -n kernel-video-em8300
266 %defattr(644,root,root,755)
267 /lib/modules/%{_kernel_ver}/kernel/drivers/video/*.ko*
269 %files -n kernel-smp-video-em8300
270 %defattr(644,root,root,755)
271 /lib/modules/%{_kernel_ver}smp/kernel/drivers/video/*.ko*