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
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
52 Obsoletes: em8300-libs
53 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
56 em8300 is a Linux driver for Creative DXR3 and Sigma Designs
57 Hollywood+ cards. Both cards are hardware MPEG1, MPEG2, AC3 decoders.
58 Additionaly Xine and MPlayer with help of this driver allow you to
59 play all the video formats that they recognise through the tv-out of
63 em8300 pozwala na uruchomienie pod Linuksem kart Creative DXR3 i Sigma
64 Designs Hollywood+. Obie karty, o prawie identycznej konstrukcji s±
65 sprzêtowymi dekoderami MPEG1, MPEG2 i AC3. Programy Xine i MPlayer
66 pozwalaj± przy u¿yciu tego sterownika na odtwarzanie przez wyj¶cie
67 telewizyjne tych kart nie tylko w/w formatów, ale tak¿e wszystkich
68 formatów video, które te programy rozpoznaj±.
71 Summary: Header file to communicate with em8300 Linux kernel modules
72 Summary(pl): Plik nag³ówkowy do komunikacji z modu³ami j±dra Linuksa em8300
73 Group: Development/Libraries
74 Obsoletes: em8300-static
77 Header file to communicate with em8300 Linux kernel modules.
79 %description devel -l pl
80 Plik nag³ówkowy do komunikacji z modu³ami j±dra Linuksa em8300.
83 Summary: Utility programs for em8300 using GTK+
84 Summary(pl): Programy u¿ytkowe em8300 u¿ywaj±ce bibliteki GTK+
85 Group: X11/Applications
86 Requires: %{name} = %{version}-%{release}
89 Utility programs for em8300 using GTK+ toolkit.
91 %description gtk -l pl
92 Programy u¿ytkowe em8300 u¿ywaj±ce biblioteki GTK+.
94 %package -n kernel%{_alt_kernel}-video-em8300
95 Summary: em8300 Linux kernel modules
96 Summary(pl): Modu³y j±dra Linuksa em8300
98 Requires(post,postun): /sbin/depmod
99 %if %{with dist_kernel}
100 %requires_releq_kernel_up
101 Requires(postun): %releq_kernel_up
104 %description -n kernel%{_alt_kernel}-video-em8300
105 em8300 Linux kernel modules.
107 %description -n kernel%{_alt_kernel}-video-em8300 -l pl
108 Modu³y j±dra Linuksa em8300.
110 %package -n kernel%{_alt_kernel}-smp-video-em8300
111 Summary: em8300 Linux SMP kernel modules
112 Summary(pl): Modu³y j±dra Linuksa SMP em8300
114 Requires(post,postun): /sbin/depmod
115 %if %{with dist_kernel}
116 %requires_releq_kernel_smp
117 Requires(postun): %releq_kernel_smp
120 %description -n kernel%{_alt_kernel}-smp-video-em8300
121 em8300 Linux SMP kernel modules.
123 %description -n kernel%{_alt_kernel}-smp-video-em8300 -l pl
124 Modu³y j±dra Linuksa SMP em8300.
131 %if %{with userspace}
132 %{__aclocal} -I autotools
142 for cfg in %{?with_dist_kernel:%{?with_smp:smp} up}%{!?with_dist_kernel:nondist}; do
143 if [ ! -r "%{_kernelsrcdir}/config-$cfg" ]; then
146 install -d o/include/linux
147 ln -sf %{_kernelsrcdir}/config-$cfg o/.config
148 ln -sf %{_kernelsrcdir}/Module.symvers-$cfg o/Module.symvers
149 ln -sf %{_kernelsrcdir}/include/linux/autoconf-$cfg.h o/include/linux/autoconf.h
150 %if %{with dist_kernel}
151 %{__make} -j1 -C %{_kernelsrcdir} O=$PWD/o prepare scripts
153 install -d o/include/config
154 touch o/include/config/MARKER
155 ln -sf %{_kernelsrcdir}/scripts o/scripts
157 cp ../include/linux/em8300.h o/include/linux/em8300.h
159 %{__make} -C %{_kernelsrcdir} clean \
160 RCS_FIND_IGNORE="-name '*.ko' -o" \
161 SYSSRC=%{_kernelsrcdir} \
165 %{__make} -C %{_kernelsrcdir} modules \
166 CC="%{__cc}" CPP="%{__cpp}" \
167 SYSSRC=%{_kernelsrcdir} \
172 for i in em8300 adv717x bt865; do
179 rm -rf $RPM_BUILD_ROOT
181 %if %{with userspace}
183 DESTDIR=$RPM_BUILD_ROOT
185 install -D %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
186 install -D %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/%{name}
190 install -d $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}{,smp}/kernel/drivers/video
191 for i in adv717x bt865 em8300; do
192 install modules/$i-%{?with_dist_kernel:up}%{!?with_dist_kernel:nondist}.ko \
193 $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}/kernel/drivers/video/$i.ko
195 %if %{with smp} && %{with dist_kernel}
196 for i in adv717x bt865 em8300; do
197 install modules/$i-smp.ko \
198 $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}smp/kernel/drivers/video/$i.ko
204 rm -rf $RPM_BUILD_ROOT
207 /sbin/chkconfig --add %{name}
208 if [ -f /var/lock/subsys/%{name} ]; then
209 /etc/rc.d/init.d/%{name} restart 1>&2
211 echo "Run \"/etc/rc.d/init.d/%{name} start\" to load %{name} modules."
215 if [ "$1" = "0" ]; then
216 if [ -f /var/lock/subsys/%{name} ]; then
217 /etc/rc.d/init.d/%{name} stop 1>&2
219 /sbin/chkconfig --del %{name}
222 %post -n kernel%{_alt_kernel}-video-em8300
223 %depmod %{_kernel_ver}
225 %postun -n kernel%{_alt_kernel}-video-em8300
226 %depmod %{_kernel_ver}
228 %post -n kernel%{_alt_kernel}-smp-video-em8300
229 %depmod %{_kernel_ver}smp
231 %postun -n kernel%{_alt_kernel}-smp-video-em8300
232 %depmod %{_kernel_ver}smp
234 %if %{with userspace}
236 %defattr(644,root,root,755)
237 %doc AUTHORS ChangeLog README modules/README*
238 %attr(755,root,root) %{_bindir}/em8300setup
239 /lib/firmware/em8300.bin
240 %dir %{_datadir}/em8300
241 %{_datadir}/em8300/em8300.pm
242 %attr(755,root,root) %{_datadir}/em8300/*.pl
243 %{_mandir}/man1/em8300setup.1*
244 %attr(754,root,root) /etc/rc.d/init.d/%{name}
245 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/%{name}
246 # subpackage? (is it usable without alsa?)
247 %{_datadir}/alsa/cards/EM8300.conf
250 %defattr(644,root,root,755)
251 %{_includedir}/linux/em8300.h
254 %defattr(644,root,root,755)
255 %attr(755,root,root) %{_bindir}/autocal
256 %attr(755,root,root) %{_bindir}/dhc
257 %attr(755,root,root) %{_bindir}/dxr3view
261 %if %{with up} || %{without dist_kernel}
262 %files -n kernel%{_alt_kernel}-video-em8300
263 %defattr(644,root,root,755)
264 /lib/modules/%{_kernel_ver}/kernel/drivers/video/*.ko*
267 %if %{with dist_kernel} && %{with smp}
268 %files -n kernel%{_alt_kernel}-smp-video-em8300
269 %defattr(644,root,root,755)
270 /lib/modules/%{_kernel_ver}smp/kernel/drivers/video/*.ko*