5 %bcond_without dist_kernel # allow non-distribution kernel
6 %bcond_without kernel # don't build kernel modules
7 %bcond_without up # don't build UP module
8 %bcond_without smp # don't build SMP module
9 %bcond_without userspace # don't build userspace tools
10 %bcond_with verbose # verbose build (V=1)
11 %bcond_with grsec_kernel # build for kernel-grsecurity
14 # kernel modules won't build on sparc32, no I2C in kernel
19 %undefine with_dist_kernel
22 %if %{with kernel} && %{with dist_kernel} && %{with grsec_kernel}
23 %define alt_kernel grsecurity
27 Summary: DXR3 and H+ driver
28 Summary(pl): Sterowniki dla DXR3 i H+
33 Group: Applications/System
34 Source0: http://dl.sourceforge.net/dxr3/%{name}-%{version}.tar.gz
35 # Source0-md5: 9e9b769b99927079b4fd6ec423d95049
37 Source2: %{name}.sysconf
38 Patch0: %{name}-make.patch
39 URL: http://dxr3.sourceforge.net/
41 BuildRequires: autoconf >= 2.13
42 BuildRequires: automake
43 BuildRequires: gtk+2-devel >= 1:2.0.0
44 BuildRequires: pkgconfig
47 %{?with_dist_kernel:BuildRequires: kernel%{_alt_kernel}-module-build >= 3:2.6.14}
48 BuildRequires: rpmbuild(macros) >= 1.308
50 Requires(post,preun): /sbin/chkconfig
53 Obsoletes: em8300-libs
54 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
57 em8300 is a Linux driver for Creative DXR3 and Sigma Designs
58 Hollywood+ cards. Both cards are hardware MPEG1, MPEG2, AC3 decoders.
59 Additionaly Xine and MPlayer with help of this driver allow you to
60 play all the video formats that they recognise through the tv-out of
64 em8300 pozwala na uruchomienie pod Linuksem kart Creative DXR3 i Sigma
65 Designs Hollywood+. Obie karty, o prawie identycznej konstrukcji s±
66 sprzêtowymi dekoderami MPEG1, MPEG2 i AC3. Programy Xine i MPlayer
67 pozwalaj± przy u¿yciu tego sterownika na odtwarzanie przez wyj¶cie
68 telewizyjne tych kart nie tylko w/w formatów, ale tak¿e wszystkich
69 formatów video, które te programy rozpoznaj±.
72 Summary: Header file to communicate with em8300 Linux kernel modules
73 Summary(pl): Plik nag³ówkowy do komunikacji z modu³ami j±dra Linuksa em8300
74 Group: Development/Libraries
75 Obsoletes: em8300-static
78 Header file to communicate with em8300 Linux kernel modules.
80 %description devel -l pl
81 Plik nag³ówkowy do komunikacji z modu³ami j±dra Linuksa em8300.
84 Summary: Utility programs for em8300 using GTK+
85 Summary(pl): Programy u¿ytkowe em8300 u¿ywaj±ce bibliteki GTK+
86 Group: X11/Applications
87 Requires: %{name} = %{version}-%{release}
90 Utility programs for em8300 using GTK+ toolkit.
92 %description gtk -l pl
93 Programy u¿ytkowe em8300 u¿ywaj±ce biblioteki GTK+.
95 %package -n kernel%{_alt_kernel}-video-em8300
96 Summary: em8300 Linux kernel modules
97 Summary(pl): Modu³y j±dra Linuksa em8300
99 Requires(post,postun): /sbin/depmod
100 %if %{with dist_kernel}
101 %requires_releq_kernel_up
102 Requires(postun): %releq_kernel_up
105 %description -n kernel%{_alt_kernel}-video-em8300
106 em8300 Linux kernel modules.
108 %description -n kernel%{_alt_kernel}-video-em8300 -l pl
109 Modu³y j±dra Linuksa em8300.
111 %package -n kernel%{_alt_kernel}-smp-video-em8300
112 Summary: em8300 Linux SMP kernel modules
113 Summary(pl): Modu³y j±dra Linuksa SMP em8300
115 Requires(post,postun): /sbin/depmod
116 %if %{with dist_kernel}
117 %requires_releq_kernel_smp
118 Requires(postun): %releq_kernel_smp
121 %description -n kernel%{_alt_kernel}-smp-video-em8300
122 em8300 Linux SMP kernel modules.
124 %description -n kernel%{_alt_kernel}-smp-video-em8300 -l pl
125 Modu³y j±dra Linuksa SMP em8300.
132 %if %{with userspace}
133 %{__aclocal} -I autotools
143 for cfg in %{?with_dist_kernel:%{?with_smp:smp} up}%{!?with_dist_kernel:nondist}; do
144 if [ ! -r "%{_kernelsrcdir}/config-$cfg" ]; then
147 install -d o/include/linux
148 ln -sf %{_kernelsrcdir}/config-$cfg o/.config
149 ln -sf %{_kernelsrcdir}/Module.symvers-$cfg o/Module.symvers
150 ln -sf %{_kernelsrcdir}/include/linux/autoconf-$cfg.h o/include/linux/autoconf.h
151 %if %{with dist_kernel}
152 %{__make} -j1 -C %{_kernelsrcdir} O=$PWD/o prepare scripts
154 install -d o/include/config
155 touch o/include/config/MARKER
156 ln -sf %{_kernelsrcdir}/scripts o/scripts
158 cp ../include/linux/em8300.h o/include/linux/em8300.h
160 %{__make} -C %{_kernelsrcdir} clean \
161 RCS_FIND_IGNORE="-name '*.ko' -o" \
162 SYSSRC=%{_kernelsrcdir} \
166 %{__make} -C %{_kernelsrcdir} modules \
167 CC="%{__cc}" CPP="%{__cpp}" \
168 SYSSRC=%{_kernelsrcdir} \
173 for i in em8300 adv717x bt865; do
180 rm -rf $RPM_BUILD_ROOT
182 %if %{with userspace}
184 DESTDIR=$RPM_BUILD_ROOT
186 install -D %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
187 install -D %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/%{name}
191 install -d $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}{,smp}/kernel/drivers/video
192 for i in adv717x bt865 em8300; do
193 install modules/$i-%{?with_dist_kernel:up}%{!?with_dist_kernel:nondist}.ko \
194 $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}/kernel/drivers/video/$i.ko
196 %if %{with smp} && %{with dist_kernel}
197 for i in adv717x bt865 em8300; do
198 install modules/$i-smp.ko \
199 $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}smp/kernel/drivers/video/$i.ko
205 rm -rf $RPM_BUILD_ROOT
208 /sbin/chkconfig --add %{name}
209 %service %{name} restart
212 if [ "$1" = "0" ]; then
214 /sbin/chkconfig --del %{name}
217 %post -n kernel%{_alt_kernel}-video-em8300
218 %depmod %{_kernel_ver}
220 %postun -n kernel%{_alt_kernel}-video-em8300
221 %depmod %{_kernel_ver}
223 %post -n kernel%{_alt_kernel}-smp-video-em8300
224 %depmod %{_kernel_ver}smp
226 %postun -n kernel%{_alt_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*
233 %attr(755,root,root) %{_bindir}/em8300setup
234 /lib/firmware/em8300.bin
235 %dir %{_datadir}/em8300
236 %{_datadir}/em8300/em8300.pm
237 %attr(755,root,root) %{_datadir}/em8300/*.pl
238 %{_mandir}/man1/em8300setup.1*
239 %attr(754,root,root) /etc/rc.d/init.d/%{name}
240 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/%{name}
241 # subpackage? (is it usable without alsa?)
242 %{_datadir}/alsa/cards/EM8300.conf
245 %defattr(644,root,root,755)
246 %{_includedir}/linux/em8300.h
249 %defattr(644,root,root,755)
250 %attr(755,root,root) %{_bindir}/autocal
251 %attr(755,root,root) %{_bindir}/dhc
252 %attr(755,root,root) %{_bindir}/dxr3view
256 %if %{with up} || %{without dist_kernel}
257 %files -n kernel%{_alt_kernel}-video-em8300
258 %defattr(644,root,root,755)
259 /lib/modules/%{_kernel_ver}/kernel/drivers/video/*.ko*
262 %if %{with dist_kernel} && %{with smp}
263 %files -n kernel%{_alt_kernel}-smp-video-em8300
264 %defattr(644,root,root,755)
265 /lib/modules/%{_kernel_ver}smp/kernel/drivers/video/*.ko*