]> git.pld-linux.org Git - packages/crystalhd.git/blob - crystalhd.spec
- typo
[packages/crystalhd.git] / crystalhd.spec
1 #
2 # Conditional build:
3 %bcond_without  dist_kernel     # allow non-distribution kernel
4 %bcond_with     kernel          # kernel module (already in 3.6 staging)
5 %bcond_without  userspace       # userspace
6 %bcond_without  gstreamer       # gstreamer 0.10 module
7 #
8 %if %{without kernel}
9 %undefine       with_dist_kernel
10 %endif
11 Summary:        Linux Crystal HD drivers
12 Summary(pl.UTF-8):      Sterowniki Crystal HD dla Linuksa
13 Name:           crystalhd
14 Version:        3.10.0
15 %define snap    20121105
16 %define         rel     0.%{snap}.1
17 Release:        %{rel}
18 License:        LGPL v2.1 (libcrystalhd), GPL v2 (driver), Broadcom (firmware)
19 Group:          Libraries
20 # http://git.linuxtv.org/jarod/crystalhd.git
21 # git clone git://linuxtv.org/jarod/crystalhd.git
22 Source0:        %{name}.tar.xz
23 # Source0-md5:  e7f8cc40c698de485fdb2d76580ea808
24 URL:            http://www.broadcom.com/support/crystal_hd/
25 BuildRequires:  autoconf >= 2.50
26 %if %{with kernel}
27 BuildRequires:  kernel-module-build >= 3:2.6.20}
28 %endif
29 %if %{with userspace}
30 BuildRequires:  libstdc++-devel
31 %if %{with gstreamer}
32 BuildRequires:  automake
33 BuildRequires:  gstreamer0.10-devel >= 0.10.0
34 BuildRequires:  gstreamer0.10-plugins-base-devel >= 0.10.0
35 BuildRequires:  libtool
36 BuildRequires:  pkgconfig
37 %endif
38 %endif
39 ExclusiveArch:  i686 pentium4 athlon %{x8664}
40 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
41
42 %description
43 Linux Crystal HD drivers.
44
45 %description -l pl.UTF-8
46 Sterowniki Crystal HD dla Linuksa.
47
48 %package -n kernel-video-crystalhd
49 Summary:        Linux kernel driver for Broadcom Crystal HD devices
50 Summary(pl.UTF-8):      Sterownik jądra Linuksa dla urządzeń Broadcom Crystal HD
51 Release:        %{rel}@%{_kernel_ver_str}
52 License:        GPL v2
53 Group:          Base/Kernel
54 Requires(post,postun):  /sbin/depmod
55 %if %{with dist_kernel}
56 %requires_releq_kernel
57 %endif
58
59 %description -n kernel-video-crystalhd
60 Linux kernel driver for Broadcom Crystal HD devices.
61
62 %description -n kernel-video-crystalhd -l pl.UTF-8
63 Sterownik jądra Linuksa dla urządzeń Broadcom Crystal HD.
64
65 %package firmware
66 Summary:        Firmware for Broadcom Crystal HD devices
67 Summary(pl.UTF-8):      Firmware dla urządzeń Broadcom Crystal HD
68 Release:        %{rel}
69 License:        Broadcom
70 Group:          Base
71
72 %description firmware
73 Firmware for Broadcom Crystal HD devices.
74
75 %description firmware -l pl.UTF-8
76 Firmware dla urządzeń Broadcom Crystal HD.
77
78 %package -n libcrystalhd
79 Summary:        Crystal HD device interface library
80 Summary(pl.UTF-8):      Biblioteka interfejsu do urządzeń Crystal HD
81 Release:        %{rel}
82 License:        LGPL v2.1
83 Group:          Libraries
84 #Requires:      cpuinfo(sse2)
85
86 %description -n libcrystalhd
87 Crystal HD device interface library.
88
89 %description -n libcrystalhd -l pl.UTF-8
90 Biblioteka interfejsu do urządzeń Crystal HD.
91
92 %package -n libcrystalhd-devel
93 Summary:        Header files for Crystal HD library
94 Summary(pl.UTF-8):      Pliki nagłówkowe biblioteki Crystal HD
95 Release:        %{rel}
96 License:        LGPL v2.1
97 Group:          Development/Libraries
98 Requires:       libcrystalhd = %{version}-%{rel}
99
100 %description -n libcrystalhd-devel
101 Header files for Crystal HD library.
102
103 %description -n libcrystalhd-devel -l pl.UTF-8
104 Pliki nagłówkowe biblioteki Crystal HD.
105
106 %package -n gstreamer0.10-bcmdec
107 Summary:        Broadcom video decoder plugin for GStreamer
108 Summary(pl.UTF-8):      Wtyczka dekodera obrazu Broadcoma dla GStreamera
109 Release:        %{rel}
110 License:        LGPL v2.1
111 Group:          Libraries
112 Requires:       libcrystalhd = %{version}-%{rel}
113
114 %description -n gstreamer0.10-bcmdec
115 Broadcom video decoder plugin for GStreamer.
116
117 %description -n gstreamer0.10-bcmdec -l pl.UTF-8
118 Wtyczka dekodera obrazu Broadcoma dla GStreamera.
119
120 %prep
121 %setup -q -n %{name}
122
123 %build
124 cd driver/linux
125 %{__autoconf}
126 %configure \
127         --with-kernel=%{_kernelsrcdir}
128 %if %{with kernel}
129 %{__make}
130 %endif
131 cd ../..
132
133 %if %{with userspace}
134 %{__make} -C linux_lib/libcrystalhd \
135         CXX="%{__cxx}" \
136         BCGCC="%{__cxx}" \
137         CPPFLAGS='$(INCLUDES) %{rpmcxxflags} -D__LINUX_USER__ -Wall -fPIC -shared -fstrict-aliasing -msse2'
138
139 %if %{with gstreamer}
140 cd filters/gst/gst-plugin
141 %{__libtoolize}
142 %{__aclocal} -I m4
143 %{__autoconf}
144 %{__autoheader}
145 %{__automake}
146 %configure \
147         --disable-static
148 %{__make} \
149         CC="%{__cxx}" \
150         CPP="%{__cxx}" \
151         BCMDEC_CFLAGS="-I. -I../../../../linux_lib/libcrystalhd -I../../../../include -D__LINUX_USER__ -DWMV_FILE_HANDLING" \
152         BCMDEC_LDFLAGS="-L../../../../linux_lib/libcrystalhd -lcrystalhd"
153 %endif
154 %endif
155
156 %install
157 rm -rf $RPM_BUILD_ROOT
158
159 %if %{with kernel}
160 install -D driver/linux/crystalhd.ko $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}/kerenl/drivers/video/crystalhd.ko
161 %endif
162
163 %if %{with userspace}
164 install -D driver/linux/20-crystalhd.rules $RPM_BUILD_ROOT/lib/udev/rules.d/20-crystalhd.rules
165
166 %{__make} -C linux_lib/libcrystalhd install \
167         DESTDIR=$RPM_BUILD_ROOT \
168         LIBDIR=%{_libdir}
169
170 %if %{with gstreamer}
171 %{__make} -C filters/gst/gst-plugin install \
172         DESTDIR=$RPM_BUILD_ROOT
173 %{__rm} $RPM_BUILD_ROOT%{_libdir}/gstreamer-0.10/libgst*.la
174 %endif
175 %endif
176
177 %clean
178 rm -rf $RPM_BUILD_ROOT
179
180 %post   -n kernel-video-crystalhd
181 %depmod %{_kernel_ver}
182
183 %postun -n kernel-video-crystalhd
184 %depmod %{_kernel_ver}
185
186 %post   -n libcrystalhd -p /sbin/ldconfig
187 %postun -n libcrystalhd -p /sbin/ldconfig
188
189 %if %{with kernel}
190 %files -n kernel-video-crystalhd
191 %defattr(644,root,root,755)
192 /lib/modules/%{_kernel_ver}/kernel/drivers/video/crystalhd.ko*
193 %endif
194
195 %if %{with userspace}
196 %files firmware
197 %defattr(644,root,root,755)
198 /lib/firmware/bcm70012fw.bin
199 /lib/firmware/bcm70015fw.bin
200 /lib/udev/rules.d/20-crystalhd.rules
201
202 %files -n libcrystalhd
203 %defattr(644,root,root,755)
204 %attr(755,root,root) %{_libdir}/libcrystalhd.so.*.*
205 %attr(755,root,root) %ghost %{_libdir}/libcrystalhd.so.3
206
207 %files -n libcrystalhd-devel
208 %defattr(644,root,root,755)
209 %attr(755,root,root) %{_libdir}/libcrystalhd.so
210 %{_includedir}/libcrystalhd
211
212 %files -n gstreamer0.10-bcmdec
213 %defattr(644,root,root,755)
214 %doc filters/gst/gst-plugin/AUTHORS
215 %attr(755,root,root) %{_libdir}/gstreamer-0.10/libgstbcmdec.so
216 %endif
This page took 0.064742 seconds and 4 git commands to generate.