]> git.pld-linux.org Git - packages/crystalhd.git/blame - crystalhd.spec
- new
[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
39BuildArch: i686 pentium4 athlon %{x8664}
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
84
85%description -n libcrystalhd
86Crystal HD device interface library.
87
88%description -n libcrystalhd -l pl.UTF-8
89Biblioteka interfejsu do urządzeń Crystal HD.
90
91%package -n libcrystalhd-devel
92Summary: Header files for Crystal HD library
93Summary(pl.UTF-8): Pliki nagłówkowe biblioteki Crystal HD
94Release: %{rel}
95License: LGPL v2.1
96Group: Development/Libraries
97Requires: libcrystalhd = %{version}-%{rel}
98
99%description -n libcrystalhd-devel
100Header files for Crystal HD library.
101
102%description -n libcrystalhd-devel -l pl.UTF-8
103Pliki nagłówkowe biblioteki Crystal HD.
104
105%package -n gstreamer0.10-bcmdec
106Summary: Broadcom video decoder plugin for GStreamer
107Summary(pl.UTF-8): Wtyczka dekodera obrazu Broadcoma dla GStreamera
108Release: %{rel}
109License: LGPL v2.1
110Group: Libraries
111Requires: libcrystalhd = %{version}-%{rel}
112
113%description -n gstreamer0.10-bcmdec
114Broadcom video decoder plugin for GStreamer.
115
116%description -n gstreamer0.10-bcmdec -l pl.UTF-8
117Wtyczka dekodera obrazu Broadcoma dla GStreamera.
118
119%prep
120%setup -q -n %{name}
121
122%build
123cd driver/linux
124%{__autoconf}
125%configure \
126 --with-kernel=%{_kernelsrcdir}
127%if %{with kernel}
128%{__make}
129%endif
130cd ../..
131
132%if %{with userspace}
133%{__make} -C linux_lib/libcrystalhd \
134 CXX="%{__cxx}" \
135 BCGCC="%{__cxx}" \
136 CPPFLAGS='$(INCLUDES) %{rpmcxxflags} -D__LINUX_USER__ -Wall -fPIC -shared -fstrict-aliasing -msse2'
137
138%if %{with gstreamer}
139cd filters/gst/gst-plugin
140%{__libtoolize}
141%{__aclocal} -I m4
142%{__autoconf}
143%{__autoheader}
144%{__automake}
145%configure \
146 --disable-static
147%{__make} \
148 CC="%{__cxx}" \
149 CPP="%{__cxx}" \
150 BCMDEC_CFLAGS="-I. -I../../../../linux_lib/libcrystalhd -I../../../../include -D__LINUX_USER__ -DWMV_FILE_HANDLING" \
151 BCMDEC_LDFLAGS="-L../../../../linux_lib/libcrystalhd -lcrystalhd"
152%endif
153%endif
154
155%install
156rm -rf $RPM_BUILD_ROOT
157
158%if %{with kernel}
159install -D driver/linux/crystalhd.ko $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}/kerenl/drivers/video/crystalhd.ko
160%endif
161
162%if %{with userspace}
163install -D driver/linux/20-crystalhd.rules $RPM_BUILD_ROOT/lib/udev/rules.d/20-crystalhd.rules
164
165%{__make} -C linux_lib/libcrystalhd install \
166 DESTDIR=$RPM_BUILD_ROOT \
167 LIBDIR=%{_libdir}
168
169%if %{with gstreamer}
170%{__make} -C filters/gst/gst-plugin install \
171 DESTDIR=$RPM_BUILD_ROOT
172%{__rm} $RPM_BUILD_ROOT%{_libdir}/gstreamer-0.10/libgst*.la
173%endif
174%endif
175
176%clean
177rm -rf $RPM_BUILD_ROOT
178
179%post -n kernel-video-crystalhd
180%depmod %{_kernel_ver}
181
182%postun -n kernel-video-crystalhd
183%depmod %{_kernel_ver}
184
185%post -n libcrystalhd -p /sbin/ldconfig
186%postun -n libcrystalhd -p /sbin/ldconfig
187
188%if %{with kernel}
189%files -n kernel-video-crystalhd
190%defattr(644,root,root,755)
191/lib/modules/%{_kernel_ver}/kernel/drivers/video/crystalhd.ko*
192%endif
193
194%if %{with userspace}
195%files firmware
196%defattr(644,root,root,755)
197/lib/firmware/bcm70012fw.bin
198/lib/firmware/bcm70015fw.bin
199/lib/udev/rules.d/20-crystalhd.rules
200
201%files -n libcrystalhd
202%defattr(644,root,root,755)
203%attr(755,root,root) %{_libdir}/libcrystalhd.so.*.*
204%attr(755,root,root) %ghost %{_libdir}/libcrystalhd.so.3
205
206%files -n libcrystalhd-devel
207%defattr(644,root,root,755)
208%attr(755,root,root) %{_libdir}/libcrystalhd.so
209%{_includedir}/libcrystalhd
210
211%files -n gstreamer0.10-bcmdec
212%defattr(644,root,root,755)
213%doc filters/gst/gst-plugin/AUTHORS
214%attr(755,root,root) %{_libdir}/gstreamer-0.10/libgstbcmdec.so
215%endif
This page took 0.05014 seconds and 4 git commands to generate.