]>
Commit | Line | Data |
---|---|---|
1 | # | |
2 | # Conditional build: | |
3 | %bcond_without apidocs # API documentation | |
4 | %bcond_with api # GST VA-API libraries API [no longer exported as of 1.6.0] | |
5 | ||
6 | %define gstapi 1.6 | |
7 | %define gst_ver 1.24.0 | |
8 | %define gstpb_ver 1.24.0 | |
9 | %define gstpd_ver 1.24.0 | |
10 | Summary: GStreamer plugin to support Video Acceleration API | |
11 | Summary(pl.UTF-8): Wtyczka GStreamera obsługująca Video Acceleration API | |
12 | Name: gstreamer-vaapi | |
13 | Version: 1.24.2 | |
14 | Release: 1 | |
15 | License: LGPL v2.1+ | |
16 | Group: Libraries | |
17 | Source0: https://gstreamer.freedesktop.org/src/gstreamer-vaapi/%{name}-%{version}.tar.xz | |
18 | # Source0-md5: 920572f5fdd73bb8b04efb59f7b9747f | |
19 | URL: https://gstreamer.freedesktop.org/ | |
20 | BuildRequires: EGL-devel | |
21 | BuildRequires: OpenGL-devel | |
22 | BuildRequires: OpenGL-GLX-devel | |
23 | BuildRequires: OpenGLESv2-devel | |
24 | BuildRequires: OpenGLESv3-devel | |
25 | BuildRequires: glib2-devel >= 1:2.67.4 | |
26 | BuildRequires: gstreamer-devel >= %{gst_ver} | |
27 | BuildRequires: gstreamer-gl-devel >= %{gstpb_ver} | |
28 | # gstreamer-codecparsers | |
29 | BuildRequires: gstreamer-plugins-bad-devel >= %{gstpd_ver} | |
30 | BuildRequires: gstreamer-plugins-base-devel >= %{gstpb_ver} | |
31 | %{?with_apidocs:BuildRequires: hotdoc >= 0.11.0} | |
32 | BuildRequires: libdrm-devel >= 2.4.98 | |
33 | BuildRequires: libva-devel >= 1.10.0 | |
34 | BuildRequires: libva-drm-devel >= 1.1.0 | |
35 | BuildRequires: libva-wayland-devel >= 1.1.0 | |
36 | BuildRequires: libva-x11-devel >= 1.0.3 | |
37 | BuildRequires: meson >= 1.1 | |
38 | BuildRequires: ninja >= 1.5 | |
39 | BuildRequires: pkgconfig | |
40 | BuildRequires: pkgconfig(egl) | |
41 | BuildRequires: pkgconfig(gl) | |
42 | BuildRequires: pkgconfig(glesv2) | |
43 | # libva API versions | |
44 | BuildRequires: pkgconfig(libva) >= 1.10 | |
45 | BuildRequires: pkgconfig(libva-drm) >= 0.39.0 | |
46 | BuildRequires: pkgconfig(libva-wayland) >= 0.39.0 | |
47 | BuildRequires: pkgconfig(libva-x11) >= 0.39.0 | |
48 | BuildRequires: rpm-build >= 4.6 | |
49 | BuildRequires: rpmbuild(macros) >= 1.736 | |
50 | BuildRequires: tar >= 1:1.22 | |
51 | BuildRequires: udev-devel | |
52 | BuildRequires: wayland-devel >= 1.11.0 | |
53 | BuildRequires: wayland-protocols >= 1.15 | |
54 | BuildRequires: xorg-lib-libX11-devel | |
55 | BuildRequires: xorg-lib-libXrandr-devel | |
56 | BuildRequires: xz | |
57 | %ifarch %{ix86} %{x8664} x32 | |
58 | BuildRequires: yasm | |
59 | %endif | |
60 | Requires: glib2 >= 1:2.67.4 | |
61 | Requires: gstreamer >= %{gst_ver} | |
62 | Requires: gstreamer-gl-libs >= %{gstpb_ver} | |
63 | Requires: gstreamer-plugins-bad >= %{gstpd_ver} | |
64 | Requires: gstreamer-plugins-base >= %{gstpb_ver} | |
65 | Requires: libdrm >= 2.4.98 | |
66 | Requires: libva >= 1.10.0 | |
67 | Requires: wayland >= 1.11.0 | |
68 | %if %{without api} | |
69 | Obsoletes: gstreamer-vaapi-devel < %{version} | |
70 | Obsoletes: gstreamer-vaapi-static < %{version} | |
71 | %endif | |
72 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
73 | ||
74 | %description | |
75 | gstreamer-vaapi consists in a collection of VA-API based plugins for | |
76 | GStreamer and helper libraries. | |
77 | ||
78 | %description -l pl.UTF-8 | |
79 | gstreamer-vaapi zawiera zestaw opartych ma VA-API wtyczek dla | |
80 | GStreamera i bibliotek pomocniczych. | |
81 | ||
82 | %package devel | |
83 | Summary: Header files for GStreamer VA-API libraries | |
84 | Summary(pl.UTF-8): Pliki nagłówkowe bibliotek VA-API GStreamera | |
85 | Group: Development/Libraries | |
86 | Requires: %{name} = %{version}-%{release} | |
87 | Requires: gstreamer-devel >= %{gst_ver} | |
88 | Requires: gstreamer-plugins-base-devel >= %{gstpb_ver} | |
89 | Requires: libva-devel >= 1.10.0 | |
90 | Requires: libva-drm-devel >= 1.1.0 | |
91 | Requires: libva-wayland-devel >= 1.1.0 | |
92 | Requires: libva-x11-devel >= 1.0.3 | |
93 | Obsoletes: gstreamer-vaapi-static < %{version} | |
94 | ||
95 | %description devel | |
96 | Header files for GStreamer VA-API helper libraries. | |
97 | ||
98 | %description devel -l pl.UTF-8 | |
99 | Pliki nagłówkowe bibliotek pomocniczych VA-API GStreamera. | |
100 | ||
101 | %package apidocs | |
102 | Summary: GStreamer VA-API plugins documentation | |
103 | Summary(pl.UTF-8): Dokumentacja do wtyczek GStreamera VA-API | |
104 | Group: Documentation | |
105 | BuildArch: noarch | |
106 | ||
107 | %description apidocs | |
108 | GStreamer VA-API plugins documentation. | |
109 | ||
110 | %description apidocs -l pl.UTF-8 | |
111 | Dokumentacja do wtyczek GStreamera VA-API. | |
112 | ||
113 | %prep | |
114 | %setup -q | |
115 | ||
116 | %build | |
117 | %meson build \ | |
118 | --default-library=shared \ | |
119 | %{!?with_apidocs:-Ddoc=false} | |
120 | ||
121 | %ninja_build -C build | |
122 | ||
123 | %if %{with apidocs} | |
124 | cd build/docs | |
125 | LC_ALL=C.UTF-8 hotdoc run --conf-file vaapi-doc.json | |
126 | %endif | |
127 | ||
128 | %install | |
129 | rm -rf $RPM_BUILD_ROOT | |
130 | ||
131 | %ninja_install -C build | |
132 | ||
133 | %if %{with apidocs} | |
134 | install -d $RPM_BUILD_ROOT%{_docdir}/gstreamer-%{gstmver} | |
135 | cp -pr build/docs/vaapi-doc $RPM_BUILD_ROOT%{_docdir}/gstreamer-%{gstmver} | |
136 | %endif | |
137 | ||
138 | %clean | |
139 | rm -rf $RPM_BUILD_ROOT | |
140 | ||
141 | %if %{with api} | |
142 | %post -p /sbin/ldconfig | |
143 | %postun -p /sbin/ldconfig | |
144 | %endif | |
145 | ||
146 | %files | |
147 | %defattr(644,root,root,755) | |
148 | %doc AUTHORS NEWS README RELEASE | |
149 | %if %{with api} | |
150 | %attr(755,root,root) %{_libdir}/libgstcodecparsers_vpx.so.*.*.* | |
151 | %attr(755,root,root) %ghost %{_libdir}/libgstcodecparsers_vpx.so.0 | |
152 | %attr(755,root,root) %{_libdir}/libgstvaapi-%{gstapi}.so.*.*.* | |
153 | %attr(755,root,root) %ghost %{_libdir}/libgstvaapi-%{gstapi}.so.1 | |
154 | %attr(755,root,root) %{_libdir}/libgstvaapi-drm-%{gstapi}.so.*.*.* | |
155 | %attr(755,root,root) %ghost %{_libdir}/libgstvaapi-drm-%{gstapi}.so.1 | |
156 | %attr(755,root,root) %{_libdir}/libgstvaapi-egl-%{gstapi}.so.*.*.* | |
157 | %attr(755,root,root) %ghost %{_libdir}/libgstvaapi-egl-%{gstapi}.so.1 | |
158 | %attr(755,root,root) %{_libdir}/libgstvaapi-glx-%{gstapi}.so.*.*.* | |
159 | %attr(755,root,root) %ghost %{_libdir}/libgstvaapi-glx-%{gstapi}.so.1 | |
160 | %attr(755,root,root) %{_libdir}/libgstvaapi-wayland-%{gstapi}.so.*.*.* | |
161 | %attr(755,root,root) %ghost %{_libdir}/libgstvaapi-wayland-%{gstapi}.so.1 | |
162 | %attr(755,root,root) %{_libdir}/libgstvaapi-x11-%{gstapi}.so.*.*.* | |
163 | %attr(755,root,root) %ghost %{_libdir}/libgstvaapi-x11-%{gstapi}.so.1 | |
164 | %endif | |
165 | %attr(755,root,root) %{_libdir}/gstreamer-1.0/libgstvaapi.so | |
166 | ||
167 | %if %{with api} | |
168 | %files devel | |
169 | %defattr(644,root,root,755) | |
170 | %attr(755,root,root) %{_libdir}/libgstcodecparsers_vpx.so | |
171 | %attr(755,root,root) %{_libdir}/libgstvaapi-%{gstapi}.so | |
172 | %attr(755,root,root) %{_libdir}/libgstvaapi-drm-%{gstapi}.so | |
173 | %attr(755,root,root) %{_libdir}/libgstvaapi-egl-%{gstapi}.so | |
174 | %attr(755,root,root) %{_libdir}/libgstvaapi-glx-%{gstapi}.so | |
175 | %attr(755,root,root) %{_libdir}/libgstvaapi-wayland-%{gstapi}.so | |
176 | %attr(755,root,root) %{_libdir}/libgstvaapi-x11-%{gstapi}.so | |
177 | %{_includedir}/gstreamer-1.0/gst/vaapi | |
178 | %{_pkgconfigdir}/gstreamer-vaapi-1.0.pc | |
179 | %{_pkgconfigdir}/gstreamer-vaapi-drm-1.0.pc | |
180 | %{_pkgconfigdir}/gstreamer-vaapi-glx-1.0.pc | |
181 | %{_pkgconfigdir}/gstreamer-vaapi-wayland-1.0.pc | |
182 | %{_pkgconfigdir}/gstreamer-vaapi-x11-1.0.pc | |
183 | %endif | |
184 | ||
185 | %if %{with apidocs} | |
186 | %files apidocs | |
187 | %defattr(644,root,root,755) | |
188 | %{_docdir}/gstreamer-%{gstmver}/vaapi-doc | |
189 | %endif |