]> git.pld-linux.org Git - packages/em8300.git/blob - em8300.spec
aa37557bdf8b208c6012d88257db94f98b65a3e2
[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 #
7 # sparc(32) disabled - no I2C_ALGOBIT in kernel24
8 %ifarch %{ix86} alpha ppc sparc64
9 %define         _kernelsrcdir   /usr/src/linux-2.4
10 %else
11 %undefine       with_kernel
12 %endif
13 %define         _rel 3
14 Summary:        DXR3 and H+ driver
15 Summary(pl):    Sterowniki dla DXR3 i H+
16 Name:           em8300
17 Version:        0.14.0
18 Release:        %{_rel}
19 License:        GPL
20 Group:          Applications/System
21 Source0:        http://dl.sourceforge.net/dxr3/%{name}-%{version}.tar.gz
22 # Source0-md5:  b0ea281df97c830642c5917cfc435d6c
23 Source1:        %{name}.init
24 Source2:        %{name}.sysconf
25 Patch0:         %{name}-automake.patch
26 URL:            http://dxr3.sourceforge.net/
27 %if %{with userspace}
28 BuildRequires:  autoconf
29 BuildRequires:  automake
30 BuildRequires:  libtool
31 BuildRequires:  gtk+-devel >= 1.2.0
32 %endif
33 %if %{with kernel} && %{with dist_kernel}
34 BuildRequires:  kernel24-headers >= 2.4
35 BuildRequires:  rpmbuild(macros) >= 1.118
36 %endif
37 Requires(post,preun):   /sbin/chkconfig
38 Requires:       %{name}-libs = %{version}-%{release}
39 Provides:       dxr3
40 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
41
42 %description
43 em8300 is a Linux driver for Creative DXR3 and Sigma Designs
44 Hollywood+ cards. Both cards are hardware MPEG1, MPEG2, AC3 decoders.
45 Additionaly Xine and MPlayer with help of this driver allow you to
46 play all the video formats that they recognise through the tv-out of
47 these cards.
48
49 %description -l pl
50 em8300 pozwala na uruchomienie pod Linuksem kart Creative DXR3 i Sigma
51 Designs Hollywood+. Obie karty, o prawie identycznej konstrukcji s±
52 sprzêtowymi dekoderami MPEG1, MPEG2 i AC3. Programy Xine i MPlayer
53 pozwalaj± przy u¿yciu tego sterownika na odtwarzanie przez wyj¶cie
54 telewizyjne tych kart nie tylko w/w formatów, ale tak¿e wszystkich
55 formatów video, które te programy rozpoznaj±.
56
57 %package libs
58 Summary:        libdxr3 library for DXR3/Hollywood+ cards
59 Summary(pl):    Biblioteka libdxr3 do kart DXR3/Hollywood+
60 Group:          Libraries
61
62 %description libs
63 libdxr3 library for DXR3/Hollywood+ cards.
64
65 %description libs -l pl
66 Biblioteka libdxr3 do kart DXR3/Hollywood+.
67
68 %package devel
69 Summary:        Files required to develop programs using em8300
70 Summary(pl):    Pliki potrzebne do tworzenia programów korzystaj±cych z em8300
71 Group:          Development/Libraries
72 Requires:       %{name}-libs = %{version}-%{release}
73
74 %description devel
75 Header files and additional scripts useful for developers of em8300
76 apps.
77
78 %description devel -l pl
79 Pliki nag³ówkowe i skrypty przydatne dla autorów aplikacji
80 korzystaj±cych z em8300.
81
82 %package static
83 Summary:        Static libraries for em8300
84 Summary(pl):    Statyczne biblioteki dla em8300
85 Group:          Development/Libraries
86 Requires:       %{name}-devel = %{version}-%{release}
87
88 %description static
89 Static libraries for em8300.
90
91 %description static -l pl
92 Statyczne biblioteki dla em8300.
93
94 %package gtk
95 Summary:        Utility programs for em8300 using gtk+
96 Summary(pl):    Programy u¿ytkowe em8300 u¿ywaj±ce bibliteki gtk+
97 Group:          X11/Applications
98 Requires:       %{name} = %{version}-%{release}
99
100 %description gtk
101 Utility programs for em8300 using gtk+ toolkit.
102
103 %description gtk -l pl
104 Programy u¿ytkowe em8300 u¿ywaj±ce biblioteki gtk+.
105
106 %package -n kernel24-video-em8300
107 Summary:        em8300 Linux kernel modules
108 Summary(pl):    Modu³y j±dra Linuksa em8300
109 Group:          Base/Kernel
110 Release:        %{_rel}@%{_kernel_ver_str}
111 %{?with_dist_kernel:%requires_releq_kernel_up}
112 Requires(post,postun):  /sbin/depmod
113
114 %description -n kernel24-video-em8300
115 em8300 Linux kernel modules.
116
117 %description -n kernel24-video-em8300 -l pl
118 Modu³y j±dra Linuksa em8300.
119
120 %package -n kernel24-smp-video-em8300
121 Summary:        em8300 Linux SMP kernel modules
122 Summary(pl):    Modu³y j±dra Linuksa SMP em8300
123 Group:          Base/Kernel
124 Release:        %{_rel}@%{_kernel_ver_str}
125 %{?with_dist_kernel:%requires_releq_kernel_smp}
126 Requires(post,postun):  /sbin/depmod
127
128 %description -n kernel24-smp-video-em8300
129 em8300 Linux SMP kernel modules.
130
131 %description -n kernel24-smp-video-em8300 -l pl
132 Modu³y j±dra Linuksa SMP em8300.
133
134 %prep
135 %setup -q
136 %patch0 -p1
137
138 %build
139 %if %{with userspace}
140 %{__libtoolize}
141 %{__aclocal} -I autotools
142 %{__autoconf}
143 %{__autoheader}
144 %{__automake}
145 %configure
146 %{__make}
147 %endif
148
149 %if %{with kernel}
150 %{__make} -C modules \
151         KERNEL_LOCATION="%{_kernelsrcdir}" \
152         EM8300_DEBUG="%{rpmcflags} -D__KERNEL_SMP"
153
154 for f in em8300.o adv717x.o bt865.o; do
155         mv -f modules/$f modules/$f.smp
156 done
157
158 %{__make} -C modules clean
159
160 %{__make} -C modules \
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.o adv717x.o bt865.o; 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 kernel24-video-em8300
217 %depmod %{_kernel_ver}
218  
219 %postun -n kernel24-video-em8300
220 %depmod %{_kernel_ver}
221
222 %post   -n kernel24-smp-video-em8300
223 %depmod %{_kernel_ver}smp
224  
225 %postun -n kernel24-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 size mtime md5) /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 kernel24-video-em8300
265 %defattr(644,root,root,755)
266 /lib/modules/%{_kernel_ver}/kernel/drivers/video/*.o*
267
268 %files -n kernel24-smp-video-em8300
269 %defattr(644,root,root,755)
270 /lib/modules/%{_kernel_ver}smp/kernel/drivers/video/*.o*
271 %endif
This page took 0.089217 seconds and 3 git commands to generate.