2 %bcond_without dist_kernel # without distribution kernel
3 %bcond_without kernel # don't build kernel modules
4 %bcond_without smp # don't build SMP module
5 %bcond_without userspace # don't build userspace tools
6 %bcond_with verbose # verbose build (V=1)
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}-make.patch
20 URL: http://dxr3.sourceforge.net/
22 BuildRequires: autoconf
23 BuildRequires: automake
24 BuildRequires: gtk+-devel >= 1.2.0
26 %if %{with kernel} && %{with dist_kernel}
27 BuildRequires: kernel-headers
28 BuildRequires: rpmbuild(macros) >= 1.118
30 Requires(post,preun): /sbin/chkconfig
32 Obsoletes: em8300-libs
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: Header file to communicate with em8300 Linux kernel modules
52 Summary(pl): Plik nag³ówkowy do komunikacji z modu³ami j±dra Linuksa em8300
53 Group: Development/Libraries
54 Obsoletes: em8300-static
57 Header file to communicate with em8300 Linux kernel modules.
59 %description devel -l pl
60 Plik nag³ówkowy do komunikacji z modu³ami j±dra Linuksa em8300.
63 Summary: Utility programs for em8300 using GTK+
64 Summary(pl): Programy u¿ytkowe em8300 u¿ywaj±ce bibliteki GTK+
65 Group: X11/Applications
66 Requires: %{name} = %{version}-%{release}
69 Utility programs for em8300 using GTK+ toolkit.
71 %description gtk -l pl
72 Programy u¿ytkowe em8300 u¿ywaj±ce biblioteki GTK+.
74 %package -n kernel-video-em8300
75 Summary: em8300 Linux kernel modules
76 Summary(pl): Modu³y j±dra Linuksa em8300
78 %{?with_dist_kernel:%requires_releq_kernel_up}
79 Requires(post,postun): /sbin/depmod
81 %description -n kernel-video-em8300
82 em8300 Linux kernel modules.
84 %description -n kernel-video-em8300 -l pl
85 Modu³y j±dra Linuksa em8300.
87 %package -n kernel-smp-video-em8300
88 Summary: em8300 Linux SMP kernel modules
89 Summary(pl): Modu³y j±dra Linuksa SMP em8300
91 %{?with_dist_kernel:%requires_releq_kernel_smp}
92 Requires(post,postun): /sbin/depmod
94 %description -n kernel-smp-video-em8300
95 em8300 Linux SMP kernel modules.
97 %description -n kernel-smp-video-em8300 -l pl
98 Modu³y j±dra Linuksa SMP em8300.
101 %setup -q -n %{name}-%{version}
105 %if %{with userspace}
106 %{__aclocal} -I autotools
116 for cfg in %{?with_dist_kernel:%{?with_smp:smp} up}%{!?with_dist_kernel:nondist}; do
117 if [ ! -r "%{_kernelsrcdir}/config-$cfg" ]; then
120 rm -rf include/{linux,config,asm}
121 install -d include/{linux,config}
122 ln -sf %{_kernelsrcdir}/config-$cfg .config
123 ln -sf %{_kernelsrcdir}/include/linux/autoconf-$cfg.h include/linux/autoconf.h
125 install -d include/asm
126 [ ! -d %{_kernelsrcdir}/include/asm-powerpc ] || ln -sf %{_kernelsrcdir}/include/asm-powerpc/* include/asm
127 [ ! -d %{_kernelsrcdir}/include/asm-%{_target_base_arch} ] || ln -snf %{_kernelsrcdir}/include/asm-%{_target_base_arch}/* include/asm
129 ln -sf %{_kernelsrcdir}/include/asm-%{_target_base_arch} include/asm
131 ln -sf %{_kernelsrcdir}/Module.symvers-$cfg Module.symvers
132 touch include/config/MARKER
133 cp ../include/linux/em8300.h include/linux/em8300.h
135 %{__make} -C %{_kernelsrcdir} clean \
136 RCS_FIND_IGNORE="-name '*.ko' -o" \
139 %{__make} -C %{_kernelsrcdir} modules \
140 CC="%{__cc}" CPP="%{__cpp}" \
143 for i in em8300 adv717x bt865; do
150 rm -rf $RPM_BUILD_ROOT
152 %if %{with userspace}
154 DESTDIR=$RPM_BUILD_ROOT
156 install -D %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
157 install -D %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/%{name}
161 install -d $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}{,smp}/kernel/drivers/video
162 for i in adv717x bt865 em8300; do
163 install modules/$i-%{?with_dist_kernel:up}%{!?with_dist_kernel:nondist}.ko \
164 $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}/kernel/drivers/video/$i.ko
166 %if %{with smp} && %{with dist_kernel}
167 for i in adv717x bt865 em8300; do
168 install modules/$i-smp.ko \
169 $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}smp/kernel/drivers/video/$i.ko
175 rm -rf $RPM_BUILD_ROOT
178 /sbin/chkconfig --add %{name}
179 if [ -f /var/lock/subsys/%{name} ]; then
180 /etc/rc.d/init.d/%{name} restart 1>&2
182 echo "Run \"/etc/rc.d/init.d/%{name} start\" to load %{name} modules."
186 if [ "$1" = "0" ]; then
187 if [ -f /var/lock/subsys/%{name} ]; then
188 /etc/rc.d/init.d/%{name} stop 1>&2
190 /sbin/chkconfig --del %{name}
193 %post -n kernel-video-em8300
194 %depmod %{_kernel_ver}
196 %postun -n kernel-video-em8300
197 %depmod %{_kernel_ver}
199 %post -n kernel-smp-video-em8300
200 %depmod %{_kernel_ver}smp
202 %postun -n kernel-smp-video-em8300
203 %depmod %{_kernel_ver}smp
205 %if %{with userspace}
207 %defattr(644,root,root,755)
208 %doc AUTHORS ChangeLog README modules/README*
209 %attr(755,root,root) %{_bindir}/em8300setup
210 /lib/firmware/em8300.bin
211 %dir %{_datadir}/em8300
212 %{_datadir}/em8300/em8300.pm
213 %attr(755,root,root) %{_datadir}/em8300/*.pl
214 %{_mandir}/man1/em8300setup.1*
215 %attr(754,root,root) /etc/rc.d/init.d/%{name}
216 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/%{name}
219 %defattr(644,root,root,755)
220 %{_includedir}/linux/em8300.h
223 %defattr(644,root,root,755)
224 %attr(755,root,root) %{_bindir}/autocal
225 %attr(755,root,root) %{_bindir}/dhc
226 %attr(755,root,root) %{_bindir}/dxr3view
230 %files -n kernel-video-em8300
231 %defattr(644,root,root,755)
232 /lib/modules/%{_kernel_ver}/kernel/drivers/video/*.ko*
234 %if %{with dist_kernel} && %{with smp}
235 %files -n kernel-smp-video-em8300
236 %defattr(644,root,root,755)
237 /lib/modules/%{_kernel_ver}smp/kernel/drivers/video/*.ko*