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