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
33 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
36 em8300 is a Linux driver for Creative DXR3 and Sigma Designs
37 Hollywood+ cards. Both cards are hardware MPEG1, MPEG2, AC3 decoders.
38 Additionaly Xine and MPlayer with help of this driver allow you to
39 play all the video formats that they recognise through the tv-out of
43 em8300 pozwala na uruchomienie pod Linuksem kart Creative DXR3 i Sigma
44 Designs Hollywood+. Obie karty, o prawie identycznej konstrukcji s±
45 sprzêtowymi dekoderami MPEG1, MPEG2 i AC3. Programy Xine i MPlayer
46 pozwalaj± przy u¿yciu tego sterownika na odtwarzanie przez wyj¶cie
47 telewizyjne tych kart nie tylko w/w formatów, ale tak¿e wszystkich
48 formatów video, które te programy rozpoznaj±.
51 Summary: Files required to develop programs using em8300
52 Summary(pl): Pliki potrzebne do tworzenia programów korzystaj±cych z em8300
53 Group: Development/Libraries
56 Header files and additional scripts useful for developers of em8300
59 %description devel -l pl
60 Pliki nag³ówkowe i skrypty przydatne dla autorów aplikacji
61 korzystaj±cych z em8300.
64 Summary: Utility programs for em8300 using GTK+
65 Summary(pl): Programy u¿ytkowe em8300 u¿ywaj±ce bibliteki GTK+
66 Group: X11/Applications
67 Requires: %{name} = %{version}-%{release}
70 Utility programs for em8300 using GTK+ toolkit.
72 %description gtk -l pl
73 Programy u¿ytkowe em8300 u¿ywaj±ce biblioteki GTK+.
75 %package -n kernel-video-em8300
76 Summary: em8300 Linux kernel modules
77 Summary(pl): Modu³y j±dra Linuksa em8300
79 %{?with_dist_kernel:%requires_releq_kernel_up}
80 Requires(post,postun): /sbin/depmod
82 %description -n kernel-video-em8300
83 em8300 Linux kernel modules.
85 %description -n kernel-video-em8300 -l pl
86 Modu³y j±dra Linuksa em8300.
88 %package -n kernel-smp-video-em8300
89 Summary: em8300 Linux SMP kernel modules
90 Summary(pl): Modu³y j±dra Linuksa SMP em8300
92 %{?with_dist_kernel:%requires_releq_kernel_smp}
93 Requires(post,postun): /sbin/depmod
95 %description -n kernel-smp-video-em8300
96 em8300 Linux SMP kernel modules.
98 %description -n kernel-smp-video-em8300 -l pl
99 Modu³y j±dra Linuksa SMP em8300.
106 %if %{with userspace}
108 %{__aclocal} -I autotools
119 install -d include/{linux,config}
120 ln -sf %{_kernelsrcdir}/config-smp .config
121 ln -sf %{_kernelsrcdir}/include/linux/autoconf-up.h include/linux/autoconf.h
122 ln -sf %{_kernelsrcdir}/include/asm-%{_target_base_arch} include/asm
123 touch include/config/MARKER
125 %{__make} -C %{_kernelsrcdir} \
126 KERNEL_LOCATION="%{_kernelsrcdir}" M=$PWD O=$PWD \
127 EM8300_DEBUG="%{rpmcflags} -D__KERNEL_SMP" modules
129 for f in em8300.ko adv717x.ko bt865.ko; do
136 KERNEL_LOCATION="%{_kernelsrcdir}" \
137 EM8300_DEBUG="%{rpmcflags}"
141 rm -rf $RPM_BUILD_ROOT
143 %if %{with userspace}
145 DESTDIR=$RPM_BUILD_ROOT
147 mv -f modules/{INSTALL,INSTALL.modules}
149 install -D modules/em8300.uc $RPM_BUILD_ROOT%{_datadir}/misc/em8300.uc
151 install scripts/microcode_upload.pl $RPM_BUILD_ROOT%{_bindir}/em8300_microcode_upload
153 install -D %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
154 install -D %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/%{name}
156 rm -f $RPM_BUILD_ROOT%{_datadir}/em8300/{modules.tar.gz,em8300.sysv}
160 install -d $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}{,smp}/kernel/drivers/video
161 for f in em8300.ko adv717x.ko bt865.ko; do
163 $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}/kernel/drivers/video/$f
164 install modules/$f.smp \
165 $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}smp/kernel/drivers/video/$f
170 rm -rf $RPM_BUILD_ROOT
173 /sbin/chkconfig --add %{name}
174 if [ -f /var/lock/subsys/%{name} ]; then
175 /etc/rc.d/init.d/%{name} restart 1>&2
177 echo "Run \"/etc/rc.d/init.d/%{name} start\" to load %{name} modules."
181 if [ "$1" = "0" ]; then
182 if [ -f /var/lock/subsys/%{name} ]; then
183 /etc/rc.d/init.d/%{name} stop 1>&2
185 /sbin/chkconfig --del %{name}
188 %post -n kernel-video-em8300
189 %depmod %{_kernel_ver}
191 %postun -n kernel-video-em8300
192 %depmod %{_kernel_ver}
194 %post -n kernel-smp-video-em8300
195 %depmod %{_kernel_ver}smp
197 %postun -n kernel-smp-video-em8300
198 %depmod %{_kernel_ver}smp
200 %if %{with userspace}
202 %defattr(644,root,root,755)
203 %doc AUTHORS ChangeLog README modules/{README*,INSTALL*,devices.sh,devfs_symlinks}
204 %attr(755,root,root) %{_bindir}/em8300_microcode_upload
205 %{_datadir}/misc/em8300.uc
206 %dir %{_datadir}/em8300
207 %{_datadir}/em8300/em8300.pm
208 %attr(755,root,root) %{_datadir}/em8300/*.pl
209 %attr(754,root,root) /etc/rc.d/init.d/%{name}
210 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/%{name}
213 %defattr(644,root,root,755)
214 %{_includedir}/linux/em8300.h
217 %defattr(644,root,root,755)
218 %attr(755,root,root) %{_bindir}/autocal
219 %attr(755,root,root) %{_bindir}/dhc
220 %attr(755,root,root) %{_bindir}/dxr3view
221 %attr(755,root,root) %{_bindir}/em8300setup
225 %files -n kernel-video-em8300
226 %defattr(644,root,root,755)
227 /lib/modules/%{_kernel_ver}/kernel/drivers/video/*.ko*
229 %files -n kernel-smp-video-em8300
230 %defattr(644,root,root,755)
231 /lib/modules/%{_kernel_ver}smp/kernel/drivers/video/*.ko*