]> git.pld-linux.org Git - packages/em8300.git/blob - em8300.spec
- Release undumbed
[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:  b0ea281df97c830642c5917cfc435d6c
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:  libtool
26 BuildRequires:  gtk+-devel >= 1.2.0
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 %{__make} \
145         KERNEL_LOCATION="%{_kernelsrcdir}" \
146         EM8300_DEBUG="%{rpmcflags} -D__KERNEL_SMP"
147
148 for f in em8300.ko adv717x.ko bt865.ko; do
149         mv -f $f $f.smp
150 done
151
152 %{__make} clean
153
154 %{__make} \
155         KERNEL_LOCATION="%{_kernelsrcdir}" \
156         EM8300_DEBUG="%{rpmcflags}"
157 %endif
158
159 %install
160 rm -rf $RPM_BUILD_ROOT
161
162 %if %{with userspace}
163 %{__make} install \
164         DESTDIR=$RPM_BUILD_ROOT
165
166 mv -f modules/{INSTALL,INSTALL.modules}
167
168 install -D modules/em8300.uc $RPM_BUILD_ROOT%{_datadir}/misc/em8300.uc
169
170 install scripts/microcode_upload.pl $RPM_BUILD_ROOT%{_bindir}/em8300_microcode_upload
171
172 install -D %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
173 install -D %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/%{name}
174
175 rm -f $RPM_BUILD_ROOT%{_datadir}/em8300/{modules.tar.gz,em8300.sysv}
176 %endif
177
178 %if %{with kernel}
179 install -d $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}{,smp}/kernel/drivers/video
180 for f in em8300.ko adv717x.ko bt865.ko; do
181         install modules/$f \
182                 $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}/kernel/drivers/video/$f
183         install modules/$f.smp \
184                 $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}smp/kernel/drivers/video/$f
185 done
186 %endif
187
188 %clean
189 rm -rf $RPM_BUILD_ROOT
190
191 %post
192 /sbin/chkconfig --add %{name}
193 if [ -f /var/lock/subsys/%{name} ]; then
194         /etc/rc.d/init.d/%{name} restart 1>&2
195 else
196         echo "Run \"/etc/rc.d/init.d/%{name} start\" to load %{name} modules."
197 fi
198
199 %preun
200 if [ "$1" = "0" ]; then
201         if [ -f /var/lock/subsys/%{name} ]; then
202                 /etc/rc.d/init.d/%{name} stop 1>&2
203         fi
204         /sbin/chkconfig --del %{name}
205 fi
206
207 %post   libs -p /sbin/ldconfig
208 %postun libs -p /sbin/ldconfig
209
210 %post   -n kernel-video-em8300
211 %depmod %{_kernel_ver}
212  
213 %postun -n kernel-video-em8300
214 %depmod %{_kernel_ver}
215
216 %post   -n kernel-smp-video-em8300
217 %depmod %{_kernel_ver}smp
218  
219 %postun -n kernel-smp-video-em8300
220 %depmod %{_kernel_ver}smp
221
222 %if %{with userspace}
223 %files
224 %defattr(644,root,root,755)
225 %doc AUTHORS ChangeLog README modules/{README*,INSTALL*,devices.sh,devfs_symlinks}
226 %attr(755,root,root) %{_bindir}/em8300_microcode_upload
227 %{_datadir}/misc/em8300.uc
228 %dir %{_datadir}/em8300
229 %{_datadir}/em8300/em8300.pm
230 %attr(755,root,root) %{_datadir}/em8300/*.pl
231 %attr(754,root,root) /etc/rc.d/init.d/%{name}
232 %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/%{name}
233
234 %files libs
235 %defattr(644,root,root,755)
236 %attr(755,root,root) %{_libdir}/lib*.so.*.*.*
237
238 %files devel
239 %defattr(644,root,root,755)
240 %attr(755,root,root) %{_libdir}/lib*.so
241 %{_libdir}/lib*.la
242 %{_includedir}/libdxr3
243 %{_includedir}/linux/em8300.h
244
245 %files static
246 %defattr(644,root,root,755)
247 %{_libdir}/lib*.a
248
249 %files gtk
250 %defattr(644,root,root,755)
251 %attr(755,root,root) %{_bindir}/autocal
252 %attr(755,root,root) %{_bindir}/dhc
253 %attr(755,root,root) %{_bindir}/dxr3view
254 %attr(755,root,root) %{_bindir}/em8300setup
255 %endif
256
257 %if %{with kernel}
258 %files -n kernel-video-em8300
259 %defattr(644,root,root,755)
260 /lib/modules/%{_kernel_ver}/kernel/drivers/video/*.ko*
261
262 %files -n kernel-smp-video-em8300
263 %defattr(644,root,root,755)
264 /lib/modules/%{_kernel_ver}smp/kernel/drivers/video/*.ko*
265 %endif
This page took 0.704196 seconds and 4 git commands to generate.