]> git.pld-linux.org Git - packages/em8300.git/blob - em8300.spec
- updated to 0.18.0 (kernel part not verified)
[packages/em8300.git] / em8300.spec
1 # TODO
2 # - cc
3 #
4 # Conditional build:
5 %bcond_without  dist_kernel     # allow non-distribution kernel
6 %bcond_without  kernel          # don't build kernel modules
7 %bcond_without  userspace       # don't build userspace tools
8 %bcond_with     verbose         # verbose build (V=1)
9
10 %ifarch sparc
11 # kernel modules won't build on sparc32, no I2C in kernel
12 %undefine       with_kernel
13 %endif
14
15 %if %{without kernel}
16 %undefine       with_dist_kernel
17 %endif
18 %if "%{_alt_kernel}" != "%{nil}"
19 %undefine       with_userspace
20 %endif
21 %if %{without userspace}
22 # nothing to be placed to debuginfo package
23 %define         _enable_debug_packages  0
24 %endif
25
26 %define         pname   em8300
27 %define         rel             1
28 Summary:        DXR3 and H+ driver
29 Summary(pl.UTF-8):      Sterowniki dla DXR3 i H+
30 Name:           %{pname}%{_alt_kernel}
31 Version:        0.18.0
32 Release:        %{rel}
33 License:        GPL v2+
34 Group:          Applications/System
35 Source0:        http://downloads.sourceforge.net/dxr3/%{pname}-%{version}.tar.gz
36 # Source0-md5:  2ef10f5159508a31a877e7e6d18c6896
37 Source1:        %{pname}.init
38 Source2:        %{pname}.sysconf
39 Patch0:         %{pname}-make.patch
40 URL:            http://dxr3.sourceforge.net/
41 %if %{with userspace}
42 BuildRequires:  autoconf >= 2.50
43 BuildRequires:  automake
44 BuildRequires:  gtk+2-devel >= 1:2.0.0
45 BuildRequires:  pkgconfig
46 %endif
47 %if %{with kernel}
48 %{?with_dist_kernel:BuildRequires:      kernel%{_alt_kernel}-module-build >= 3:2.6.14}
49 BuildRequires:  rpmbuild(macros) >= 1.379
50 %endif
51 Requires(post,preun):   /sbin/chkconfig
52 Requires:       rc-scripts
53 Provides:       dxr3
54 Obsoletes:      em8300-libs
55 %if %{without userspace}
56 ExcludeArch:    sparc
57 %endif
58 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
59
60 %description
61 em8300 is a Linux driver for Creative DXR3 and Sigma Designs
62 Hollywood+ cards. Both cards are hardware MPEG1, MPEG2, AC3 decoders.
63 Additionaly Xine and MPlayer with help of this driver allow you to
64 play all the video formats that they recognise through the tv-out of
65 these cards.
66
67 %description -l pl.UTF-8
68 em8300 pozwala na uruchomienie pod Linuksem kart Creative DXR3 i Sigma
69 Designs Hollywood+. Obie karty, o prawie identycznej konstrukcji są
70 sprzętowymi dekoderami MPEG1, MPEG2 i AC3. Programy Xine i MPlayer
71 pozwalają przy użyciu tego sterownika na odtwarzanie przez wyjście
72 telewizyjne tych kart nie tylko w/w formatów, ale także wszystkich
73 formatów video, które te programy rozpoznają.
74
75 %package devel
76 Summary:        Header file to communicate with em8300 Linux kernel modules
77 Summary(pl.UTF-8):      Plik nagłówkowy do komunikacji z modułami jądra Linuksa em8300
78 Group:          Development/Libraries
79 Obsoletes:      em8300-static
80
81 %description devel
82 Header file to communicate with em8300 Linux kernel modules.
83
84 %description devel -l pl.UTF-8
85 Plik nagłówkowy do komunikacji z modułami jądra Linuksa em8300.
86
87 %package gtk
88 Summary:        Utility programs for em8300 using GTK+
89 Summary(pl.UTF-8):      Programy użytkowe em8300 używające bibliteki GTK+
90 Group:          X11/Applications
91 Requires:       %{pname} = %{version}-%{release}
92
93 %description gtk
94 Utility programs for em8300 using GTK+ toolkit.
95
96 %description gtk -l pl.UTF-8
97 Programy użytkowe em8300 używające biblioteki GTK+.
98
99 %package -n kernel%{_alt_kernel}-video-em8300
100 Summary:        em8300 Linux kernel modules
101 Summary(pl.UTF-8):      Moduły jądra Linuksa em8300
102 Release:        %{rel}@%{_kernel_ver_str}
103 Group:          Base/Kernel
104 Requires(post,postun):  /sbin/depmod
105 %if %{with dist_kernel}
106 %requires_releq_kernel_up
107 Requires(postun):       %releq_kernel_up
108 %endif
109 Obsoletes:      kernel%{_alt_kernel}-smp-video-em8300
110
111 %description -n kernel%{_alt_kernel}-video-em8300
112 em8300 Linux kernel modules.
113
114 %description -n kernel%{_alt_kernel}-video-em8300 -l pl.UTF-8
115 Moduły jądra Linuksa em8300.
116
117 %prep
118 %setup -q -n %{pname}-%{version}
119 %patch0 -p1
120
121 %build
122 %if %{with userspace}
123 %{__aclocal} -I autotools
124 %{__autoconf}
125 %{__autoheader}
126 %{__automake}
127 %configure
128 %{__make}
129 %endif
130
131 %if %{with kernel}
132 %build_kernel_modules -C modules -m em8300,adv717x,bt865 <<'EOF'
133         cp ../include/linux/em8300.h o/include/linux/em8300.h
134 EOF
135 %endif
136
137 %install
138 rm -rf $RPM_BUILD_ROOT
139
140 %if %{with userspace}
141 %{__make} install \
142         DESTDIR=$RPM_BUILD_ROOT
143
144 install -D %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{pname}
145 install -D %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/%{pname}
146 %endif
147
148 %if %{with kernel}
149 %install_kernel_modules -m modules/{em8300,adv717x,bt865} -d kernel/drivers/video
150 %endif
151
152 %clean
153 rm -rf $RPM_BUILD_ROOT
154
155 %post
156 /sbin/chkconfig --add %{pname}
157 %service %{pname} restart
158
159 %preun
160 if [ "$1" = "0" ]; then
161         %service stop
162         /sbin/chkconfig --del %{pname}
163 fi
164
165 %post   -n kernel%{_alt_kernel}-video-em8300
166 %depmod %{_kernel_ver}
167
168 %postun -n kernel%{_alt_kernel}-video-em8300
169 %depmod %{_kernel_ver}
170
171 %if %{with userspace}
172 %files
173 %defattr(644,root,root,755)
174 %doc AUTHORS ChangeLog README modules/README*
175 %attr(755,root,root) %{_bindir}/em8300setup
176 /lib/firmware/em8300.bin
177 %dir %{_datadir}/em8300
178 %{_datadir}/em8300/em8300.pm
179 %attr(755,root,root) %{_datadir}/em8300/*.pl
180 %{_mandir}/man1/em8300setup.1*
181 %attr(754,root,root) /etc/rc.d/init.d/%{pname}
182 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/%{pname}
183 # subpackage? (is it usable without alsa?)
184 %{_datadir}/alsa/cards/EM8300.conf
185
186 %files devel
187 %defattr(644,root,root,755)
188 %{_includedir}/linux/em8300.h
189
190 %files gtk
191 %defattr(644,root,root,755)
192 %attr(755,root,root) %{_bindir}/autocal
193 %attr(755,root,root) %{_bindir}/dhc
194 %attr(755,root,root) %{_bindir}/dxr3view
195 %endif
196
197 %if %{with kernel}
198 %files -n kernel%{_alt_kernel}-video-em8300
199 %defattr(644,root,root,755)
200 /lib/modules/%{_kernel_ver}/kernel/drivers/video/*.ko*
201 %endif
This page took 0.05075 seconds and 3 git commands to generate.