]>
Commit | Line | Data |
---|---|---|
af7d046d JB |
1 | # TODO: handle GMP plugins better in browser-plugins architecture (only firefox33+ based browsers supported) |
2 | # | |
3 | # Conditional build: | |
4 | %bcond_without xulrunner # GMP plugin | |
5 | # | |
9d5b9eed JB |
6 | Summary: H.264 codec library |
7 | Summary(pl.UTF-8): Biblioteka kodeka H.264 | |
8 | Name: openh264 | |
533955da | 9 | Version: 1.4.0 |
9d5b9eed JB |
10 | Release: 1 |
11 | License: BSD | |
12 | Group: Libraries | |
13 | Source0: https://github.com/cisco/openh264/archive/v%{version}/%{name}-%{version}.tar.gz | |
533955da JB |
14 | # Source0-md5: 06d92ee5bd231814394b7e29f0545e57 |
15 | Patch0: %{name}-libdir.patch | |
9d5b9eed JB |
16 | URL: http://www.openh264.org/ |
17 | BuildRequires: libstdc++-devel | |
533955da JB |
18 | %ifarch %{ix86} %{x8664} |
19 | BuildRequires: nasm | |
20 | %endif | |
af7d046d JB |
21 | BuildRequires: rpmbuild(macros) >= 1.357 |
22 | %{?with_xulrunner:BuildRequires: xulrunner-devel >= 2:33} | |
9d5b9eed JB |
23 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
24 | ||
af7d046d JB |
25 | %define gmp_plugindir %{_browserpluginsdir} |
26 | ||
9d5b9eed JB |
27 | %description |
28 | OpenH264 is a codec library which supports H.264 encoding and | |
29 | decoding. It is suitable for use in real time applications such as | |
30 | WebRTC. | |
31 | ||
32 | %description -l pl.UTF-8 | |
33 | OpenH264 to biblioteka kodeka obsługująca kodowanie i dekodowanie | |
34 | H.264. Nadaje się do użycia w aplikacjach czasu rzeczywistego, takich | |
35 | jak WebRTC. | |
36 | ||
37 | %package devel | |
38 | Summary: Header files for OpenH264 library | |
39 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki OpenH264 | |
40 | Group: Development/Libraries | |
41 | Requires: %{name} = %{version}-%{release} | |
09372493 | 42 | Requires: libstdc++-devel |
9d5b9eed JB |
43 | |
44 | %description devel | |
45 | Header files for OpenH264 library. | |
46 | ||
47 | %description devel -l pl.UTF-8 | |
48 | Pliki nagłówkowe biblioteki OpenH264. | |
49 | ||
50 | %package static | |
51 | Summary: Static OpenH264 library | |
52 | Summary(pl.UTF-8): Statyczna biblioteka OpenH264 | |
53 | Group: Development/Libraries | |
54 | Requires: %{name}-devel = %{version}-%{release} | |
55 | ||
56 | %description static | |
57 | Static OpenH264 library. | |
58 | ||
59 | %description static -l pl.UTF-8 | |
60 | Statyczna biblioteka OpenH264. | |
61 | ||
af7d046d JB |
62 | %package -n browser-gmp-openh264 |
63 | Summary: OpenH264 plugin for Gecko based browsers | |
64 | Summary(pl.UTF-8): Wtyczka OpenH264 dla przeglądarek opartych na Gecko | |
65 | License: BSD and MPL v2.0 | |
66 | Group: Libraries | |
67 | Requires: browser-plugins >= 2.0 | |
68 | ||
69 | %description -n browser-gmp-openh264 | |
70 | OpenH264 Gecko Media Plugin for modern Gecko based browsers (like | |
71 | Firefox/Iceweasel 33+). | |
72 | ||
73 | %description -n browser-gmp-openh264 -l pl.UTF-8 | |
74 | Wtyczka GMP (Gecko Media Plugin) OpenH264 dla nowych przeglądarek | |
75 | opartych na Gecko (takich jak Firefox/Iceweasel 33+). | |
76 | ||
9d5b9eed JB |
77 | %prep |
78 | %setup -q | |
af7d046d JB |
79 | %patch0 -p1 |
80 | ||
81 | %if %{with xulrunner} | |
b1033ce2 | 82 | ln -s $(pkg-config --variable=includedir mozilla-plugin) gmp-api |
af7d046d | 83 | %endif |
9d5b9eed JB |
84 | |
85 | %build | |
af7d046d | 86 | %{__make} libraries binaries %{?with_xulrunner:plugin} \ |
533955da | 87 | ARCH=%{_target_base_arch} \ |
9d5b9eed JB |
88 | CXX="%{__cxx}" \ |
89 | CFLAGS_OPT="%{rpmcxxflags}" | |
90 | ||
91 | %install | |
92 | rm -rf $RPM_BUILD_ROOT | |
93 | install -d $RPM_BUILD_ROOT{%{_bindir},%{_libdir}} | |
94 | ||
533955da JB |
95 | %{__make} install \ |
96 | DESTDIR=$RPM_BUILD_ROOT \ | |
97 | PREFIX=%{_prefix} \ | |
98 | LIBDIR=%{_libdir} | |
9d5b9eed | 99 | |
9d5b9eed JB |
100 | install h264dec h264enc $RPM_BUILD_ROOT%{_bindir} |
101 | ||
af7d046d JB |
102 | %if %{with xulrunner} |
103 | # see https://wiki.mozilla.org/GeckoMediaPlugins | |
104 | install -d $RPM_BUILD_ROOT%{gmp_plugindir}/gmp-openh264 | |
105 | install libgmpopenh264.so $RPM_BUILD_ROOT%{gmp_plugindir}/gmp-openh264 | |
106 | cp -p gmpopenh264.info $RPM_BUILD_ROOT%{gmp_plugindir}/gmp-openh264 | |
107 | %endif | |
108 | ||
9d5b9eed JB |
109 | %clean |
110 | rm -rf $RPM_BUILD_ROOT | |
111 | ||
112 | %post -p /sbin/ldconfig | |
113 | %postun -p /sbin/ldconfig | |
114 | ||
af7d046d JB |
115 | %post -n browser-gmp-openh264 |
116 | %update_browser_plugins | |
117 | ||
118 | %postun -n browser-gmp-openh264 | |
119 | if [ "$1" = 0 ]; then | |
120 | %update_browser_plugins | |
121 | fi | |
122 | ||
9d5b9eed JB |
123 | %files |
124 | %defattr(644,root,root,755) | |
125 | %doc CONTRIBUTORS LICENSE README.md RELEASES | |
126 | %attr(755,root,root) %{_bindir}/h264dec | |
127 | %attr(755,root,root) %{_bindir}/h264enc | |
533955da | 128 | %attr(755,root,root) %{_libdir}/libopenh264.so.0 |
9d5b9eed JB |
129 | |
130 | %files devel | |
131 | %defattr(644,root,root,755) | |
533955da | 132 | %attr(755,root,root) %{_libdir}/libopenh264.so |
9d5b9eed | 133 | %{_includedir}/wels |
533955da | 134 | %{_pkgconfigdir}/openh264.pc |
9d5b9eed JB |
135 | |
136 | %files static | |
137 | %defattr(644,root,root,755) | |
138 | %{_libdir}/libopenh264.a | |
af7d046d JB |
139 | |
140 | %if %{with xulrunner} | |
141 | %files -n browser-gmp-openh264 | |
142 | %defattr(644,root,root,755) | |
143 | %dir %{gmp_plugindir}/gmp-openh264 | |
144 | %attr(755,root,root) %{gmp_plugindir}/gmp-openh264/libgmpopenh264.so | |
145 | %{gmp_plugindir}/gmp-openh264/gmpopenh264.info | |
146 | %endif |