]>
Commit | Line | Data |
---|---|---|
cf661ee9 ER |
1 | # TODO |
2 | # - cc | |
37f88f87 | 3 | # |
416f8666 | 4 | # Conditional build: |
37f88f87 | 5 | %bcond_without dist_kernel # allow non-distribution kernel |
f91f76c6 JB |
6 | %bcond_without kernel # don't build kernel modules |
7 | %bcond_without userspace # don't build userspace tools | |
a7b2743c | 8 | %bcond_with verbose # verbose build (V=1) |
bc2a5c65 | 9 | |
eba23996 | 10 | %ifarch sparc |
11 | # kernel modules won't build on sparc32, no I2C in kernel | |
12 | %undefine with_kernel | |
13 | %endif | |
14 | ||
e573653b ER |
15 | %if %{without kernel} |
16 | %undefine with_dist_kernel | |
17 | %endif | |
bc2a5c65 ER |
18 | %if "%{_alt_kernel}" != "%{nil}" |
19 | %undefine with_userspace | |
37f88f87 | 20 | %endif |
e573653b ER |
21 | %if %{without userspace} |
22 | # nothing to be placed to debuginfo package | |
23 | %define _enable_debug_packages 0 | |
24 | %endif | |
37f88f87 | 25 | |
bc2a5c65 | 26 | %define pname em8300 |
54b35d2f | 27 | %define rel 1 |
f91f76c6 | 28 | Summary: DXR3 and H+ driver |
8d8d6f30 | 29 | Summary(pl.UTF-8): Sterowniki dla DXR3 i H+ |
bc2a5c65 | 30 | Name: %{pname}%{_alt_kernel} |
f1033ae7 | 31 | Version: 0.18.0 |
54b35d2f | 32 | Release: %{rel} |
f1033ae7 | 33 | License: GPL v2+ |
f91f76c6 | 34 | Group: Applications/System |
f1033ae7 JB |
35 | Source0: http://downloads.sourceforge.net/dxr3/%{pname}-%{version}.tar.gz |
36 | # Source0-md5: 2ef10f5159508a31a877e7e6d18c6896 | |
bc2a5c65 ER |
37 | Source1: %{pname}.init |
38 | Source2: %{pname}.sysconf | |
39 | Patch0: %{pname}-make.patch | |
0ad8444f | 40 | URL: http://dxr3.sourceforge.net/ |
f91f76c6 | 41 | %if %{with userspace} |
70cc82ad | 42 | BuildRequires: autoconf >= 2.50 |
a0f81942 | 43 | BuildRequires: automake |
2beafda9 JB |
44 | BuildRequires: gtk+2-devel >= 1:2.0.0 |
45 | BuildRequires: pkgconfig | |
f91f76c6 | 46 | %endif |
37f88f87 | 47 | %if %{with kernel} |
598f9d2e | 48 | %{?with_dist_kernel:BuildRequires: kernel%{_alt_kernel}-module-build >= 3:2.6.14} |
e573653b | 49 | BuildRequires: rpmbuild(macros) >= 1.379 |
f91f76c6 | 50 | %endif |
bb80c930 | 51 | Requires(post,preun): /sbin/chkconfig |
bc2a5c65 | 52 | Requires: rc-scripts |
750055a4 | 53 | Provides: dxr3 |
740aacab | 54 | Obsoletes: em8300-libs |
bc2a5c65 ER |
55 | %if %{without userspace} |
56 | ExcludeArch: sparc | |
57 | %endif | |
0ad8444f | 58 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
59 | ||
60 | %description | |
e250e89c | 61 | em8300 is a Linux driver for Creative DXR3 and Sigma Designs |
62 | Hollywood+ cards. Both cards are hardware MPEG1, MPEG2, AC3 decoders. | |
63 | Additionaly Xine and MPlayer with help of this driver allow you to | |
64 | play all the video formats that they recognise through the tv-out of | |
65 | these cards. | |
0ad8444f | 66 | |
b004246a | 67 | %description -l pl.UTF-8 |
e250e89c | 68 | em8300 pozwala na uruchomienie pod Linuksem kart Creative DXR3 i Sigma |
b004246a JR |
69 | Designs Hollywood+. Obie karty, o prawie identycznej konstrukcji są |
70 | sprzętowymi dekoderami MPEG1, MPEG2 i AC3. Programy Xine i MPlayer | |
71 | pozwalają przy użyciu tego sterownika na odtwarzanie przez wyjście | |
72 | telewizyjne tych kart nie tylko w/w formatów, ale także wszystkich | |
73 | formatów video, które te programy rozpoznają. | |
0ad8444f | 74 | |
a0f81942 | 75 | %package devel |
f8e128d0 | 76 | Summary: Header file to communicate with em8300 Linux kernel modules |
8d8d6f30 | 77 | Summary(pl.UTF-8): Plik nagłówkowy do komunikacji z modułami jądra Linuksa em8300 |
37cc3dac | 78 | Group: Development/Libraries |
740aacab | 79 | Obsoletes: em8300-static |
a0f81942 | 80 | |
81 | %description devel | |
f8e128d0 | 82 | Header file to communicate with em8300 Linux kernel modules. |
a0f81942 | 83 | |
b004246a JR |
84 | %description devel -l pl.UTF-8 |
85 | Plik nagłówkowy do komunikacji z modułami jądra Linuksa em8300. | |
a0f81942 | 86 | |
87 | %package gtk | |
c493f0f4 | 88 | Summary: Utility programs for em8300 using GTK+ |
8d8d6f30 | 89 | Summary(pl.UTF-8): Programy użytkowe em8300 używające bibliteki GTK+ |
37cc3dac | 90 | Group: X11/Applications |
bc2a5c65 | 91 | Requires: %{pname} = %{version}-%{release} |
a0f81942 | 92 | |
93 | %description gtk | |
c493f0f4 | 94 | Utility programs for em8300 using GTK+ toolkit. |
a0f81942 | 95 | |
b004246a JR |
96 | %description gtk -l pl.UTF-8 |
97 | Programy użytkowe em8300 używające biblioteki GTK+. | |
a0f81942 | 98 | |
598f9d2e | 99 | %package -n kernel%{_alt_kernel}-video-em8300 |
416f8666 | 100 | Summary: em8300 Linux kernel modules |
8d8d6f30 | 101 | Summary(pl.UTF-8): Moduły jądra Linuksa em8300 |
54b35d2f | 102 | Release: %{rel}@%{_kernel_ver_str} |
416f8666 | 103 | Group: Base/Kernel |
416f8666 | 104 | Requires(post,postun): /sbin/depmod |
37f88f87 PS |
105 | %if %{with dist_kernel} |
106 | %requires_releq_kernel_up | |
107 | Requires(postun): %releq_kernel_up | |
108 | %endif | |
8f822a8a | 109 | Obsoletes: kernel%{_alt_kernel}-smp-video-em8300 |
416f8666 | 110 | |
598f9d2e | 111 | %description -n kernel%{_alt_kernel}-video-em8300 |
416f8666 JB |
112 | em8300 Linux kernel modules. |
113 | ||
b004246a JR |
114 | %description -n kernel%{_alt_kernel}-video-em8300 -l pl.UTF-8 |
115 | Moduły jądra Linuksa em8300. | |
416f8666 | 116 | |
0ad8444f | 117 | %prep |
bc2a5c65 | 118 | %setup -q -n %{pname}-%{version} |
8f822a8a | 119 | %patch0 -p1 |
0ad8444f | 120 | |
121 | %build | |
f91f76c6 | 122 | %if %{with userspace} |
f89b0e9d TP |
123 | %{__aclocal} -I autotools |
124 | %{__autoconf} | |
125 | %{__autoheader} | |
37cc3dac | 126 | %{__automake} |
0ad8444f | 127 | %configure |
128 | %{__make} | |
f91f76c6 JB |
129 | %endif |
130 | ||
131 | %if %{with kernel} | |
8f822a8a ER |
132 | %build_kernel_modules -C modules -m em8300,adv717x,bt865 <<'EOF' |
133 | cp ../include/linux/em8300.h o/include/linux/em8300.h | |
134 | EOF | |
e573653b | 135 | %endif |
0ad8444f | 136 | |
137 | %install | |
138 | rm -rf $RPM_BUILD_ROOT | |
f85c02a0 | 139 | |
f91f76c6 | 140 | %if %{with userspace} |
f85c02a0 PG |
141 | %{__make} install \ |
142 | DESTDIR=$RPM_BUILD_ROOT | |
0ad8444f | 143 | |
bc2a5c65 ER |
144 | install -D %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{pname} |
145 | install -D %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/%{pname} | |
f91f76c6 JB |
146 | %endif |
147 | ||
148 | %if %{with kernel} | |
e573653b | 149 | %install_kernel_modules -m modules/{em8300,adv717x,bt865} -d kernel/drivers/video |
99a8fd01 | 150 | %endif |
f8e128d0 | 151 | |
0ad8444f | 152 | %clean |
416f8666 | 153 | rm -rf $RPM_BUILD_ROOT |
0ad8444f | 154 | |
155 | %post | |
bc2a5c65 ER |
156 | /sbin/chkconfig --add %{pname} |
157 | %service %{pname} restart | |
00ffb758 | 158 | |
159 | %preun | |
160 | if [ "$1" = "0" ]; then | |
bc2a5c65 ER |
161 | %service stop |
162 | /sbin/chkconfig --del %{pname} | |
00ffb758 | 163 | fi |
a0f81942 | 164 | |
598f9d2e | 165 | %post -n kernel%{_alt_kernel}-video-em8300 |
416f8666 | 166 | %depmod %{_kernel_ver} |
067f8360 | 167 | |
598f9d2e | 168 | %postun -n kernel%{_alt_kernel}-video-em8300 |
416f8666 JB |
169 | %depmod %{_kernel_ver} |
170 | ||
f91f76c6 | 171 | %if %{with userspace} |
416f8666 | 172 | %files |
a0f81942 | 173 | %defattr(644,root,root,755) |
f8e128d0 JB |
174 | %doc AUTHORS ChangeLog README modules/README* |
175 | %attr(755,root,root) %{_bindir}/em8300setup | |
176 | /lib/firmware/em8300.bin | |
f91f76c6 JB |
177 | %dir %{_datadir}/em8300 |
178 | %{_datadir}/em8300/em8300.pm | |
179 | %attr(755,root,root) %{_datadir}/em8300/*.pl | |
f8e128d0 | 180 | %{_mandir}/man1/em8300setup.1* |
bc2a5c65 ER |
181 | %attr(754,root,root) /etc/rc.d/init.d/%{pname} |
182 | %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/%{pname} | |
2beafda9 JB |
183 | # subpackage? (is it usable without alsa?) |
184 | %{_datadir}/alsa/cards/EM8300.conf | |
a0f81942 | 185 | |
186 | %files devel | |
187 | %defattr(644,root,root,755) | |
f91f76c6 | 188 | %{_includedir}/linux/em8300.h |
0ad8444f | 189 | |
a0f81942 | 190 | %files gtk |
0ad8444f | 191 | %defattr(644,root,root,755) |
416f8666 JB |
192 | %attr(755,root,root) %{_bindir}/autocal |
193 | %attr(755,root,root) %{_bindir}/dhc | |
194 | %attr(755,root,root) %{_bindir}/dxr3view | |
f91f76c6 | 195 | %endif |
416f8666 | 196 | |
f91f76c6 | 197 | %if %{with kernel} |
598f9d2e | 198 | %files -n kernel%{_alt_kernel}-video-em8300 |
416f8666 | 199 | %defattr(644,root,root,755) |
003c9599 | 200 | /lib/modules/%{_kernel_ver}/kernel/drivers/video/*.ko* |
025eed2f | 201 | %endif |