]> git.pld-linux.org Git - packages/em8300.git/blob - em8300.spec
c1e05c3bd6ae81fab1e2dbab5a8867e3a3a56a06
[packages/em8300.git] / em8300.spec
1 #
2 # Conditional build:
3 %bcond_without  dist_kernel     # without distribution kernel
4 %bcond_without  kernel          # don't build kernel modules
5 %bcond_without  userspace       # don't build userspace tools
6 %define         snap            20040919
7 #
8 Summary:        DXR3 and H+ driver
9 Summary(pl):    Sterowniki dla DXR3 i H+
10 Name:           em8300
11 Version:        0.14.0
12 Release:        3.%{snap}.1
13 License:        GPL
14 Group:          Applications/System
15 #Source0:       http://dl.sourceforge.net/dxr3/%{name}-%{version}.tar.gz
16 Source0:        http://www.kernel.pl/~adasi/%{name}-%{snap}.tar.bz2
17 # Source0-md5:  832f5a03826701a71193ca235973dd12
18 Source1:        %{name}.init
19 Source2:        %{name}.sysconf
20 Patch0:         %{name}-automake.patch
21 URL:            http://dxr3.sourceforge.net/
22 %if %{with userspace}
23 BuildRequires:  autoconf
24 BuildRequires:  automake
25 BuildRequires:  gtk+-devel >= 1.2.0
26 BuildRequires:  libtool
27 %endif
28 %if %{with kernel} && %{with dist_kernel}
29 BuildRequires:  kernel-headers 
30 BuildRequires:  rpmbuild(macros) >= 1.118
31 %endif
32 Requires(post,preun):   /sbin/chkconfig
33 Requires:       %{name}-libs = %{version}-%{release}
34 Provides:       dxr3
35 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
36
37 %description
38 em8300 is a Linux driver for Creative DXR3 and Sigma Designs
39 Hollywood+ cards. Both cards are hardware MPEG1, MPEG2, AC3 decoders.
40 Additionaly Xine and MPlayer with help of this driver allow you to
41 play all the video formats that they recognise through the tv-out of
42 these cards.
43
44 %description -l pl
45 em8300 pozwala na uruchomienie pod Linuksem kart Creative DXR3 i Sigma
46 Designs Hollywood+. Obie karty, o prawie identycznej konstrukcji s±
47 sprzêtowymi dekoderami MPEG1, MPEG2 i AC3. Programy Xine i MPlayer
48 pozwalaj± przy u¿yciu tego sterownika na odtwarzanie przez wyj¶cie
49 telewizyjne tych kart nie tylko w/w formatów, ale tak¿e wszystkich
50 formatów video, które te programy rozpoznaj±.
51
52 %package libs
53 Summary:        libdxr3 library for DXR3/Hollywood+ cards
54 Summary(pl):    Biblioteka libdxr3 do kart DXR3/Hollywood+
55 Group:          Libraries
56
57 %description libs
58 libdxr3 library for DXR3/Hollywood+ cards.
59
60 %description libs -l pl
61 Biblioteka libdxr3 do kart DXR3/Hollywood+.
62
63 %package devel
64 Summary:        Files required to develop programs using em8300
65 Summary(pl):    Pliki potrzebne do tworzenia programów korzystaj±cych z em8300
66 Group:          Development/Libraries
67 Requires:       %{name}-libs = %{version}-%{release}
68
69 %description devel
70 Header files and additional scripts useful for developers of em8300
71 apps.
72
73 %description devel -l pl
74 Pliki nag³ówkowe i skrypty przydatne dla autorów aplikacji
75 korzystaj±cych z em8300.
76
77 %package static
78 Summary:        Static libraries for em8300
79 Summary(pl):    Statyczne biblioteki dla em8300
80 Group:          Development/Libraries
81 Requires:       %{name}-devel = %{version}-%{release}
82
83 %description static
84 Static libraries for em8300.
85
86 %description static -l pl
87 Statyczne biblioteki dla em8300.
88
89 %package gtk
90 Summary:        Utility programs for em8300 using GTK+
91 Summary(pl):    Programy u¿ytkowe em8300 u¿ywaj±ce bibliteki GTK+
92 Group:          X11/Applications
93 Requires:       %{name} = %{version}-%{release}
94
95 %description gtk
96 Utility programs for em8300 using GTK+ toolkit.
97
98 %description gtk -l pl
99 Programy u¿ytkowe em8300 u¿ywaj±ce biblioteki GTK+.
100
101 %package -n kernel-video-em8300
102 Summary:        em8300 Linux kernel modules
103 Summary(pl):    Modu³y j±dra Linuksa em8300
104 Group:          Base/Kernel
105 %{?with_dist_kernel:%requires_releq_kernel_up}
106 Requires(post,postun):  /sbin/depmod
107
108 %description -n kernel-video-em8300
109 em8300 Linux kernel modules.
110
111 %description -n kernel-video-em8300 -l pl
112 Modu³y j±dra Linuksa em8300.
113
114 %package -n kernel-smp-video-em8300
115 Summary:        em8300 Linux SMP kernel modules
116 Summary(pl):    Modu³y j±dra Linuksa SMP em8300
117 Group:          Base/Kernel
118 %{?with_dist_kernel:%requires_releq_kernel_smp}
119 Requires(post,postun):  /sbin/depmod
120
121 %description -n kernel-smp-video-em8300
122 em8300 Linux SMP kernel modules.
123
124 %description -n kernel-smp-video-em8300 -l pl
125 Modu³y j±dra Linuksa SMP em8300.
126
127 %prep
128 %setup -q -n %{name}
129 %patch0 -p1
130
131 %build
132 %if %{with userspace}
133 %{__libtoolize}
134 %{__aclocal} -I autotools
135 %{__autoconf}
136 %{__autoheader}
137 %{__automake}
138 %configure
139 %{__make}
140 %endif
141
142 %if %{with kernel}
143 cd modules
144 rm -rf include
145 install -d include/{linux,config}
146 ln -sf %{_kernelsrcdir}/config-smp .config
147 ln -sf %{_kernelsrcdir}/include/linux/autoconf-up.h include/linux/autoconf.h
148 ln -sf %{_kernelsrcdir}/include/asm-%{_target_base_arch} include/asm
149 touch include/config/MARKER
150
151 %{__make} -C %{_kernelsrcdir} \
152         KERNEL_LOCATION="%{_kernelsrcdir}" M=$PWD O=$PWD \
153         EM8300_DEBUG="%{rpmcflags} -D__KERNEL_SMP" modules
154
155 for f in em8300.ko adv717x.ko bt865.ko; do
156         mv -f $f $f.smp
157 done
158
159 %{__make} clean
160
161 %{__make} \
162         KERNEL_LOCATION="%{_kernelsrcdir}" \
163         EM8300_DEBUG="%{rpmcflags}"
164 %endif
165
166 %install
167 rm -rf $RPM_BUILD_ROOT
168
169 %if %{with userspace}
170 %{__make} install \
171         DESTDIR=$RPM_BUILD_ROOT
172
173 mv -f modules/{INSTALL,INSTALL.modules}
174
175 install -D modules/em8300.uc $RPM_BUILD_ROOT%{_datadir}/misc/em8300.uc
176
177 install scripts/microcode_upload.pl $RPM_BUILD_ROOT%{_bindir}/em8300_microcode_upload
178
179 install -D %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
180 install -D %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/%{name}
181
182 rm -f $RPM_BUILD_ROOT%{_datadir}/em8300/{modules.tar.gz,em8300.sysv}
183 %endif
184
185 %if %{with kernel}
186 install -d $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}{,smp}/kernel/drivers/video
187 for f in em8300.ko adv717x.ko bt865.ko; do
188         install modules/$f \
189                 $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}/kernel/drivers/video/$f
190         install modules/$f.smp \
191                 $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}smp/kernel/drivers/video/$f
192 done
193 %endif
194
195 %clean
196 rm -rf $RPM_BUILD_ROOT
197
198 %post
199 /sbin/chkconfig --add %{name}
200 if [ -f /var/lock/subsys/%{name} ]; then
201         /etc/rc.d/init.d/%{name} restart 1>&2
202 else
203         echo "Run \"/etc/rc.d/init.d/%{name} start\" to load %{name} modules."
204 fi
205
206 %preun
207 if [ "$1" = "0" ]; then
208         if [ -f /var/lock/subsys/%{name} ]; then
209                 /etc/rc.d/init.d/%{name} stop 1>&2
210         fi
211         /sbin/chkconfig --del %{name}
212 fi
213
214 %post   libs -p /sbin/ldconfig
215 %postun libs -p /sbin/ldconfig
216
217 %post   -n kernel-video-em8300
218 %depmod %{_kernel_ver}
219
220 %postun -n kernel-video-em8300
221 %depmod %{_kernel_ver}
222
223 %post   -n kernel-smp-video-em8300
224 %depmod %{_kernel_ver}smp
225
226 %postun -n kernel-smp-video-em8300
227 %depmod %{_kernel_ver}smp
228
229 %if %{with userspace}
230 %files
231 %defattr(644,root,root,755)
232 %doc AUTHORS ChangeLog README modules/{README*,INSTALL*,devices.sh,devfs_symlinks}
233 %attr(755,root,root) %{_bindir}/em8300_microcode_upload
234 %{_datadir}/misc/em8300.uc
235 %dir %{_datadir}/em8300
236 %{_datadir}/em8300/em8300.pm
237 %attr(755,root,root) %{_datadir}/em8300/*.pl
238 %attr(754,root,root) /etc/rc.d/init.d/%{name}
239 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/%{name}
240
241 %files libs
242 %defattr(644,root,root,755)
243 %attr(755,root,root) %{_libdir}/lib*.so.*.*.*
244
245 %files devel
246 %defattr(644,root,root,755)
247 %attr(755,root,root) %{_libdir}/lib*.so
248 %{_libdir}/lib*.la
249 %{_includedir}/libdxr3
250 %{_includedir}/linux/em8300.h
251
252 %files static
253 %defattr(644,root,root,755)
254 %{_libdir}/lib*.a
255
256 %files gtk
257 %defattr(644,root,root,755)
258 %attr(755,root,root) %{_bindir}/autocal
259 %attr(755,root,root) %{_bindir}/dhc
260 %attr(755,root,root) %{_bindir}/dxr3view
261 %attr(755,root,root) %{_bindir}/em8300setup
262 %endif
263
264 %if %{with kernel}
265 %files -n kernel-video-em8300
266 %defattr(644,root,root,755)
267 /lib/modules/%{_kernel_ver}/kernel/drivers/video/*.ko*
268
269 %files -n kernel-smp-video-em8300
270 %defattr(644,root,root,755)
271 /lib/modules/%{_kernel_ver}smp/kernel/drivers/video/*.ko*
272 %endif
This page took 0.063111 seconds and 2 git commands to generate.