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
13 %if %{with kernel} && %{with dist_kernel} && %{with grsec_kernel}
14 %define alt_kernel grsecurity
18 # kernel modules won't build on sparc32, no I2C in kernel
23 %undefine with_dist_kernel
26 Summary: DXR3 and H+ driver
27 Summary(pl): Sterowniki dla DXR3 i H+
32 Group: Applications/System
33 Source0: http://dl.sourceforge.net/dxr3/%{name}-%{version}.tar.gz
34 # Source0-md5: 9e9b769b99927079b4fd6ec423d95049
36 Source2: %{name}.sysconf
37 Patch0: %{name}-make.patch
38 URL: http://dxr3.sourceforge.net/
40 BuildRequires: autoconf >= 2.13
41 BuildRequires: automake
42 BuildRequires: gtk+2-devel >= 1:2.0.0
43 BuildRequires: pkgconfig
46 %{?with_dist_kernel:BuildRequires: kernel%{_alt_kernel}-module-build >= 3:2.6.14}
47 BuildRequires: rpmbuild(macros) >= 1.308
49 Requires(post,preun): /sbin/chkconfig
51 Obsoletes: em8300-libs
52 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
55 em8300 is a Linux driver for Creative DXR3 and Sigma Designs
56 Hollywood+ cards. Both cards are hardware MPEG1, MPEG2, AC3 decoders.
57 Additionaly Xine and MPlayer with help of this driver allow you to
58 play all the video formats that they recognise through the tv-out of
62 em8300 pozwala na uruchomienie pod Linuksem kart Creative DXR3 i Sigma
63 Designs Hollywood+. Obie karty, o prawie identycznej konstrukcji s±
64 sprzêtowymi dekoderami MPEG1, MPEG2 i AC3. Programy Xine i MPlayer
65 pozwalaj± przy u¿yciu tego sterownika na odtwarzanie przez wyj¶cie
66 telewizyjne tych kart nie tylko w/w formatów, ale tak¿e wszystkich
67 formatów video, które te programy rozpoznaj±.
70 Summary: Header file to communicate with em8300 Linux kernel modules
71 Summary(pl): Plik nag³ówkowy do komunikacji z modu³ami j±dra Linuksa em8300
72 Group: Development/Libraries
73 Obsoletes: em8300-static
76 Header file to communicate with em8300 Linux kernel modules.
78 %description devel -l pl
79 Plik nag³ówkowy do komunikacji z modu³ami j±dra Linuksa em8300.
82 Summary: Utility programs for em8300 using GTK+
83 Summary(pl): Programy u¿ytkowe em8300 u¿ywaj±ce bibliteki GTK+
84 Group: X11/Applications
85 Requires: %{name} = %{version}-%{release}
88 Utility programs for em8300 using GTK+ toolkit.
90 %description gtk -l pl
91 Programy u¿ytkowe em8300 u¿ywaj±ce biblioteki GTK+.
93 %package -n kernel%{_alt_kernel}-video-em8300
94 Summary: em8300 Linux kernel modules
95 Summary(pl): Modu³y j±dra Linuksa em8300
97 Requires(post,postun): /sbin/depmod
98 %if %{with dist_kernel}
99 %requires_releq_kernel_up
100 Requires(postun): %releq_kernel_up
103 %description -n kernel%{_alt_kernel}-video-em8300
104 em8300 Linux kernel modules.
106 %description -n kernel%{_alt_kernel}-video-em8300 -l pl
107 Modu³y j±dra Linuksa em8300.
109 %package -n kernel%{_alt_kernel}-smp-video-em8300
110 Summary: em8300 Linux SMP kernel modules
111 Summary(pl): Modu³y j±dra Linuksa SMP em8300
113 Requires(post,postun): /sbin/depmod
114 %if %{with dist_kernel}
115 %requires_releq_kernel_smp
116 Requires(postun): %releq_kernel_smp
119 %description -n kernel%{_alt_kernel}-smp-video-em8300
120 em8300 Linux SMP kernel modules.
122 %description -n kernel%{_alt_kernel}-smp-video-em8300 -l pl
123 Modu³y j±dra Linuksa SMP em8300.
130 %if %{with userspace}
131 %{__aclocal} -I autotools
141 for cfg in %{?with_dist_kernel:%{?with_smp:smp} up}%{!?with_dist_kernel:nondist}; do
142 if [ ! -r "%{_kernelsrcdir}/config-$cfg" ]; then
145 install -d o/include/linux
146 ln -sf %{_kernelsrcdir}/config-$cfg o/.config
147 ln -sf %{_kernelsrcdir}/Module.symvers-$cfg o/Module.symvers
148 ln -sf %{_kernelsrcdir}/include/linux/autoconf-$cfg.h o/include/linux/autoconf.h
149 %if %{with dist_kernel}
150 %{__make} -j1 -C %{_kernelsrcdir} O=$PWD/o prepare scripts
152 install -d o/include/config
153 touch o/include/config/MARKER
154 ln -sf %{_kernelsrcdir}/scripts o/scripts
156 cp ../include/linux/em8300.h o/include/linux/em8300.h
158 %{__make} -C %{_kernelsrcdir} clean \
159 RCS_FIND_IGNORE="-name '*.ko' -o" \
160 SYSSRC=%{_kernelsrcdir} \
164 %{__make} -C %{_kernelsrcdir} modules \
165 CC="%{__cc}" CPP="%{__cpp}" \
166 SYSSRC=%{_kernelsrcdir} \
171 for i in em8300 adv717x bt865; do
178 rm -rf $RPM_BUILD_ROOT
180 %if %{with userspace}
182 DESTDIR=$RPM_BUILD_ROOT
184 install -D %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
185 install -D %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/%{name}
189 install -d $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}{,smp}/kernel/drivers/video
190 for i in adv717x bt865 em8300; do
191 install modules/$i-%{?with_dist_kernel:up}%{!?with_dist_kernel:nondist}.ko \
192 $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}/kernel/drivers/video/$i.ko
194 %if %{with smp} && %{with dist_kernel}
195 for i in adv717x bt865 em8300; do
196 install modules/$i-smp.ko \
197 $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}smp/kernel/drivers/video/$i.ko
203 rm -rf $RPM_BUILD_ROOT
206 /sbin/chkconfig --add %{name}
207 if [ -f /var/lock/subsys/%{name} ]; then
208 /etc/rc.d/init.d/%{name} restart 1>&2
210 echo "Run \"/etc/rc.d/init.d/%{name} start\" to load %{name} modules."
214 if [ "$1" = "0" ]; then
215 if [ -f /var/lock/subsys/%{name} ]; then
216 /etc/rc.d/init.d/%{name} stop 1>&2
218 /sbin/chkconfig --del %{name}
221 %post -n kernel%{_alt_kernel}-video-em8300
222 %depmod %{_kernel_ver}
224 %postun -n kernel%{_alt_kernel}-video-em8300
225 %depmod %{_kernel_ver}
227 %post -n kernel%{_alt_kernel}-smp-video-em8300
228 %depmod %{_kernel_ver}smp
230 %postun -n kernel%{_alt_kernel}-smp-video-em8300
231 %depmod %{_kernel_ver}smp
233 %if %{with userspace}
235 %defattr(644,root,root,755)
236 %doc AUTHORS ChangeLog README modules/README*
237 %attr(755,root,root) %{_bindir}/em8300setup
238 /lib/firmware/em8300.bin
239 %dir %{_datadir}/em8300
240 %{_datadir}/em8300/em8300.pm
241 %attr(755,root,root) %{_datadir}/em8300/*.pl
242 %{_mandir}/man1/em8300setup.1*
243 %attr(754,root,root) /etc/rc.d/init.d/%{name}
244 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/%{name}
245 # subpackage? (is it usable without alsa?)
246 %{_datadir}/alsa/cards/EM8300.conf
249 %defattr(644,root,root,755)
250 %{_includedir}/linux/em8300.h
253 %defattr(644,root,root,755)
254 %attr(755,root,root) %{_bindir}/autocal
255 %attr(755,root,root) %{_bindir}/dhc
256 %attr(755,root,root) %{_bindir}/dxr3view
260 %if %{with up} || %{without dist_kernel}
261 %files -n kernel%{_alt_kernel}-video-em8300
262 %defattr(644,root,root,755)
263 /lib/modules/%{_kernel_ver}/kernel/drivers/video/*.ko*
266 %if %{with dist_kernel} && %{with smp}
267 %files -n kernel%{_alt_kernel}-smp-video-em8300
268 %defattr(644,root,root,755)
269 /lib/modules/%{_kernel_ver}smp/kernel/drivers/video/*.ko*