]> git.pld-linux.org Git - packages/em8300.git/blob - em8300.spec
- new-style bconds, kernel/userspace scheme
[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 Summary:        DXR3 and H+ driver
8 Summary(pl):    Sterowniki dla DXR3 i H+
9 Name:           em8300
10 Version:        0.13.0
11 Release:        2
12 License:        GPL
13 Group:          Applications/System
14 Source0:        http://dxr3.sourceforge.net/download/%{name}-%{version}.tar.gz
15 # Source0-md5:  306984dfd4f0f29538179cbbf391f5a8
16 Source1:        %{name}.init
17 Source2:        %{name}.sysconf
18 Patch0:         %{name}-automake.patch
19 URL:            http://dxr3.sourceforge.net/
20 %if %{with userspace}
21 BuildRequires:  autoconf
22 BuildRequires:  automake
23 BuildRequires:  libtool
24 BuildRequires:  gtk+-devel >= 1.2.0
25 %endif
26 %if %{with kernel} && %{with dist_kernel}
27 BuildRequires:  kernel-headers >= 2.4
28 BuildRequires:  kernel-headers < 2.5
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
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 %{__make} -C modules \
143         KERNEL_LOCATION="%{_kernelsrcdir}" \
144         EM8300_DEBUG="%{rpmcflags} -D__SMP__"
145
146 for f in em8300.o adv717x.o bt865.o; do
147         mv -f modules/$f modules/$f.smp
148 done
149
150 %{__make} -C modules clean
151
152 %{__make} -C modules \
153         KERNEL_LOCATION="%{_kernelsrcdir}" \
154         EM8300_DEBUG="%{rpmcflags}"
155 %endif
156
157 %install
158 rm -rf $RPM_BUILD_ROOT
159
160 %if %{with userspace}
161 %{__make} install \
162         DESTDIR=$RPM_BUILD_ROOT
163
164 mv -f modules/{INSTALL,INSTALL.modules}
165
166 install -D modules/em8300.uc $RPM_BUILD_ROOT%{_datadir}/misc/em8300.uc
167
168 install scripts/microcode_upload.pl $RPM_BUILD_ROOT%{_bindir}/em8300_microcode_upload
169
170 install -D %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
171 install -D %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/%{name}
172
173 rm -f $RPM_BUILD_ROOT%{_datadir}/em8300/{modules.tar.gz,em8300.sysv}
174 %endif
175
176 %if %{with kernel}
177 %{__make} -C modules install-newkern \
178         KERNVER=%{_kernel_ver} \
179         SMODINST=kernel/drivers/video
180         prefix=$RPM_BUILD_ROOT
181 install -d $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}smp/kernel/drivers/video
182 for f in em8300.o adv717x.o bt865.o; do
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/*.o*
261
262 %files -n kernel-smp-video-em8300
263 %defattr(644,root,root,755)
264 /lib/modules/%{_kernel_ver}smp/kernel/drivers/video/*.o*
265 %endif
This page took 0.254428 seconds and 4 git commands to generate.