]> git.pld-linux.org Git - packages/openh264.git/blame - openh264.spec
- use pkg-config to get xulrunner include dir
[packages/openh264.git] / openh264.spec
CommitLineData
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
6Summary: H.264 codec library
7Summary(pl.UTF-8): Biblioteka kodeka H.264
8Name: openh264
533955da 9Version: 1.4.0
9d5b9eed
JB
10Release: 1
11License: BSD
12Group: Libraries
13Source0: https://github.com/cisco/openh264/archive/v%{version}/%{name}-%{version}.tar.gz
533955da
JB
14# Source0-md5: 06d92ee5bd231814394b7e29f0545e57
15Patch0: %{name}-libdir.patch
9d5b9eed
JB
16URL: http://www.openh264.org/
17BuildRequires: libstdc++-devel
533955da
JB
18%ifarch %{ix86} %{x8664}
19BuildRequires: nasm
20%endif
af7d046d
JB
21BuildRequires: rpmbuild(macros) >= 1.357
22%{?with_xulrunner:BuildRequires: xulrunner-devel >= 2:33}
9d5b9eed
JB
23BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
24
af7d046d
JB
25%define gmp_plugindir %{_browserpluginsdir}
26
9d5b9eed
JB
27%description
28OpenH264 is a codec library which supports H.264 encoding and
29decoding. It is suitable for use in real time applications such as
30WebRTC.
31
32%description -l pl.UTF-8
33OpenH264 to biblioteka kodeka obsługująca kodowanie i dekodowanie
34H.264. Nadaje się do użycia w aplikacjach czasu rzeczywistego, takich
35jak WebRTC.
36
37%package devel
38Summary: Header files for OpenH264 library
39Summary(pl.UTF-8): Pliki nagłówkowe biblioteki OpenH264
40Group: Development/Libraries
41Requires: %{name} = %{version}-%{release}
09372493 42Requires: libstdc++-devel
9d5b9eed
JB
43
44%description devel
45Header files for OpenH264 library.
46
47%description devel -l pl.UTF-8
48Pliki nagłówkowe biblioteki OpenH264.
49
50%package static
51Summary: Static OpenH264 library
52Summary(pl.UTF-8): Statyczna biblioteka OpenH264
53Group: Development/Libraries
54Requires: %{name}-devel = %{version}-%{release}
55
56%description static
57Static OpenH264 library.
58
59%description static -l pl.UTF-8
60Statyczna biblioteka OpenH264.
61
af7d046d
JB
62%package -n browser-gmp-openh264
63Summary: OpenH264 plugin for Gecko based browsers
64Summary(pl.UTF-8): Wtyczka OpenH264 dla przeglądarek opartych na Gecko
65License: BSD and MPL v2.0
66Group: Libraries
67Requires: browser-plugins >= 2.0
68
69%description -n browser-gmp-openh264
70OpenH264 Gecko Media Plugin for modern Gecko based browsers (like
71Firefox/Iceweasel 33+).
72
73%description -n browser-gmp-openh264 -l pl.UTF-8
74Wtyczka GMP (Gecko Media Plugin) OpenH264 dla nowych przeglądarek
75opartych 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 82ln -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
92rm -rf $RPM_BUILD_ROOT
93install -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
100install h264dec h264enc $RPM_BUILD_ROOT%{_bindir}
101
af7d046d
JB
102%if %{with xulrunner}
103# see https://wiki.mozilla.org/GeckoMediaPlugins
104install -d $RPM_BUILD_ROOT%{gmp_plugindir}/gmp-openh264
105install libgmpopenh264.so $RPM_BUILD_ROOT%{gmp_plugindir}/gmp-openh264
106cp -p gmpopenh264.info $RPM_BUILD_ROOT%{gmp_plugindir}/gmp-openh264
107%endif
108
9d5b9eed
JB
109%clean
110rm -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
119if [ "$1" = 0 ]; then
120 %update_browser_plugins
121fi
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
This page took 0.106844 seconds and 4 git commands to generate.