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