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