]> git.pld-linux.org Git - packages/crystalhd.git/blob - crystalhd.spec
- disable outdated gstreamer, rel 3
[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_with     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}.3
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} x32
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 SSE2 to work; commented out to allow development on non-SSE enabled i686
85 #Requires:      cpuinfo(sse2)
86
87 %description -n libcrystalhd
88 Crystal HD device interface library.
89
90 %description -n libcrystalhd -l pl.UTF-8
91 Biblioteka interfejsu do urządzeń Crystal HD.
92
93 %package -n libcrystalhd-devel
94 Summary:        Header files for Crystal HD library
95 Summary(pl.UTF-8):      Pliki nagłówkowe biblioteki Crystal HD
96 Release:        %{rel}
97 License:        LGPL v2.1
98 Group:          Development/Libraries
99 Requires:       libcrystalhd = %{version}-%{rel}
100
101 %description -n libcrystalhd-devel
102 Header files for Crystal HD library.
103
104 %description -n libcrystalhd-devel -l pl.UTF-8
105 Pliki nagłówkowe biblioteki Crystal HD.
106
107 %package -n gstreamer0.10-bcmdec
108 Summary:        Broadcom video decoder plugin for GStreamer
109 Summary(pl.UTF-8):      Wtyczka dekodera obrazu Broadcoma dla GStreamera
110 Release:        %{rel}
111 License:        LGPL v2.1
112 Group:          Libraries
113 Requires:       libcrystalhd = %{version}-%{rel}
114
115 %description -n gstreamer0.10-bcmdec
116 Broadcom video decoder plugin for GStreamer.
117
118 %description -n gstreamer0.10-bcmdec -l pl.UTF-8
119 Wtyczka dekodera obrazu Broadcoma dla GStreamera.
120
121 %prep
122 %setup -q -n %{name}
123
124 %build
125 cd driver/linux
126 %{__autoconf}
127 %configure \
128         --with-kernel=%{_kernelsrcdir}
129 %if %{with kernel}
130 %{__make}
131 %endif
132 cd ../..
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}
141 cd 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
158 rm -rf $RPM_BUILD_ROOT
159
160 %if %{with kernel}
161 install -D driver/linux/crystalhd.ko $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}/kerenl/drivers/video/crystalhd.ko
162 %endif
163
164 %if %{with userspace}
165 install -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
179 rm -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
213 %if %{with gstreamer}
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
219 %endif
This page took 0.074771 seconds and 3 git commands to generate.