]> git.pld-linux.org Git - packages/openh264.git/blob - openh264.spec
085f8d32d1d7cf887d6b777433c6c194f979f071
[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 Summary:        H.264 codec library
7 Summary(pl.UTF-8):      Biblioteka kodeka H.264
8 Name:           openh264
9 Version:        1.4.0
10 Release:        1
11 License:        BSD
12 Group:          Libraries
13 Source0:        https://github.com/cisco/openh264/archive/v%{version}/%{name}-%{version}.tar.gz
14 # Source0-md5:  06d92ee5bd231814394b7e29f0545e57
15 Patch0:         %{name}-libdir.patch
16 URL:            http://www.openh264.org/
17 BuildRequires:  libstdc++-devel
18 %ifarch %{ix86} %{x8664}
19 BuildRequires:  nasm
20 %endif
21 BuildRequires:  rpmbuild(macros) >= 1.357
22 %{?with_xulrunner:BuildRequires:        xulrunner-devel >= 2:33}
23 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
24
25 %define         gmp_plugindir   %{_browserpluginsdir}
26
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}
42 Requires:       libstdc++-devel
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
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
77 %prep
78 %setup -q
79 %patch0 -p1
80
81 %if %{with xulrunner}
82 ln -s $(pkg-config --variable=includedir mozilla-plugin) gmp-api
83 %endif
84
85 %build
86 %{__make} libraries binaries %{?with_xulrunner:plugin} \
87         ARCH=%{_target_base_arch} \
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
95 %{__make} install \
96         DESTDIR=$RPM_BUILD_ROOT \
97         PREFIX=%{_prefix} \
98         LIBDIR=%{_libdir}
99
100 install h264dec h264enc $RPM_BUILD_ROOT%{_bindir}
101
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
109 %clean
110 rm -rf $RPM_BUILD_ROOT
111
112 %post   -p /sbin/ldconfig
113 %postun -p /sbin/ldconfig
114
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
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
128 %attr(755,root,root) %{_libdir}/libopenh264.so.0
129
130 %files devel
131 %defattr(644,root,root,755)
132 %attr(755,root,root) %{_libdir}/libopenh264.so
133 %{_includedir}/wels
134 %{_pkgconfigdir}/openh264.pc
135
136 %files static
137 %defattr(644,root,root,755)
138 %{_libdir}/libopenh264.a
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.093197 seconds and 3 git commands to generate.