]> git.pld-linux.org Git - packages/crystalhd.git/blame - crystalhd.spec
- typo
[packages/crystalhd.git] / crystalhd.spec
CommitLineData
e0f61679
JB
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
11Summary: Linux Crystal HD drivers
12Summary(pl.UTF-8): Sterowniki Crystal HD dla Linuksa
13Name: crystalhd
14Version: 3.10.0
15%define snap 20121105
16%define rel 0.%{snap}.1
17Release: %{rel}
18License: LGPL v2.1 (libcrystalhd), GPL v2 (driver), Broadcom (firmware)
19Group: Libraries
20# http://git.linuxtv.org/jarod/crystalhd.git
21# git clone git://linuxtv.org/jarod/crystalhd.git
22Source0: %{name}.tar.xz
23# Source0-md5: e7f8cc40c698de485fdb2d76580ea808
24URL: http://www.broadcom.com/support/crystal_hd/
25BuildRequires: autoconf >= 2.50
26%if %{with kernel}
27BuildRequires: kernel-module-build >= 3:2.6.20}
28%endif
29%if %{with userspace}
30BuildRequires: libstdc++-devel
31%if %{with gstreamer}
32BuildRequires: automake
33BuildRequires: gstreamer0.10-devel >= 0.10.0
34BuildRequires: gstreamer0.10-plugins-base-devel >= 0.10.0
35BuildRequires: libtool
36BuildRequires: pkgconfig
37%endif
38%endif
9fe6936a 39ExclusiveArch: i686 pentium4 athlon %{x8664}
e0f61679
JB
40BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
41
42%description
43Linux Crystal HD drivers.
44
45%description -l pl.UTF-8
46Sterowniki Crystal HD dla Linuksa.
47
48%package -n kernel-video-crystalhd
49Summary: Linux kernel driver for Broadcom Crystal HD devices
50Summary(pl.UTF-8): Sterownik jądra Linuksa dla urządzeń Broadcom Crystal HD
51Release: %{rel}@%{_kernel_ver_str}
52License: GPL v2
53Group: Base/Kernel
54Requires(post,postun): /sbin/depmod
55%if %{with dist_kernel}
56%requires_releq_kernel
57%endif
58
59%description -n kernel-video-crystalhd
60Linux kernel driver for Broadcom Crystal HD devices.
61
62%description -n kernel-video-crystalhd -l pl.UTF-8
63Sterownik jądra Linuksa dla urządzeń Broadcom Crystal HD.
64
65%package firmware
66Summary: Firmware for Broadcom Crystal HD devices
67Summary(pl.UTF-8): Firmware dla urządzeń Broadcom Crystal HD
68Release: %{rel}
69License: Broadcom
70Group: Base
71
72%description firmware
73Firmware for Broadcom Crystal HD devices.
74
75%description firmware -l pl.UTF-8
76Firmware dla urządzeń Broadcom Crystal HD.
77
78%package -n libcrystalhd
79Summary: Crystal HD device interface library
80Summary(pl.UTF-8): Biblioteka interfejsu do urządzeń Crystal HD
81Release: %{rel}
82License: LGPL v2.1
83Group: Libraries
9fe6936a 84#Requires: cpuinfo(sse2)
e0f61679
JB
85
86%description -n libcrystalhd
87Crystal HD device interface library.
88
89%description -n libcrystalhd -l pl.UTF-8
90Biblioteka interfejsu do urządzeń Crystal HD.
91
92%package -n libcrystalhd-devel
93Summary: Header files for Crystal HD library
94Summary(pl.UTF-8): Pliki nagłówkowe biblioteki Crystal HD
95Release: %{rel}
96License: LGPL v2.1
97Group: Development/Libraries
98Requires: libcrystalhd = %{version}-%{rel}
99
100%description -n libcrystalhd-devel
101Header files for Crystal HD library.
102
103%description -n libcrystalhd-devel -l pl.UTF-8
104Pliki nagłówkowe biblioteki Crystal HD.
105
106%package -n gstreamer0.10-bcmdec
107Summary: Broadcom video decoder plugin for GStreamer
108Summary(pl.UTF-8): Wtyczka dekodera obrazu Broadcoma dla GStreamera
109Release: %{rel}
110License: LGPL v2.1
111Group: Libraries
112Requires: libcrystalhd = %{version}-%{rel}
113
114%description -n gstreamer0.10-bcmdec
115Broadcom video decoder plugin for GStreamer.
116
117%description -n gstreamer0.10-bcmdec -l pl.UTF-8
118Wtyczka dekodera obrazu Broadcoma dla GStreamera.
119
120%prep
121%setup -q -n %{name}
122
123%build
124cd driver/linux
125%{__autoconf}
126%configure \
127 --with-kernel=%{_kernelsrcdir}
128%if %{with kernel}
129%{__make}
130%endif
131cd ../..
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}
140cd 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
157rm -rf $RPM_BUILD_ROOT
158
159%if %{with kernel}
160install -D driver/linux/crystalhd.ko $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}/kerenl/drivers/video/crystalhd.ko
161%endif
162
163%if %{with userspace}
164install -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
178rm -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.165972 seconds and 4 git commands to generate.