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