File chromium-ffmpeg-extra.spec of Package chromium-ffmpeg-extra (Revision edff4236ea405746ad02b23f8de36ff9)

Currently displaying revision edff4236ea405746ad02b23f8de36ff9 , Show latest

107
 
1
#
2
# spec file for package chromium-ffmpeg-extra
3
#
4
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
5
#
6
# All modifications and additions to the file contributed by third parties
7
# remain the property of their copyright owners, unless otherwise agreed
8
# upon. The license for this file, and modifications and additions to the
9
# file, is the same license as for the pristine package itself (unless the
10
# license for the pristine package is not an Open Source License, in which
11
# case the license is the MIT License). An "Open Source License" is a
12
# license that conforms to the Open Source Definition (Version 1.9)
13
# published by the Open Source Initiative.
14
15
# Please submit bugfixes or comments via http://bugs.opensuse.org/
16
#
17
18
19
%define srcname chromium
20
Name:           chromium-ffmpeg-extra
21
Version:        59.0.3071.104
22
Release:        0
23
Summary:        Extra ffmpeg codecs for browsers based on Chromium
24
License:        BSD-3-Clause and LGPL-2.1+
25
Group:          Productivity/Networking/Web/Browsers
26
Url:            http://code.google.com/p/chromium/
27
Source0:        http://commondatastorage.googleapis.com/chromium-browser-official/%{srcname}-%{version}.tar.xz
28
Source1:        BUILD.gn
29
Patch0:         chromium-last-commit-position-r0.patch
30
Patch1:         chromium-gcc7.patch
31
Patch2:         chromium-dma-buf.patch
32
BuildRequires:  gcc
33
BuildRequires:  gcc-c++
34
BuildRequires:  ninja
35
BuildRequires:  pkgconfig
36
BuildRequires:  pkgconfig(gtk+-2.0)
37
BuildRequires:  pkgconfig(gtk+-3.0)
38
BuildRequires:  pkgconfig(libexif)
39
BuildRequires:  pkgconfig(libffi)
40
BuildRequires:  pkgconfig(libpci)
41
BuildRequires:  pkgconfig(libpulse)
42
BuildRequires:  pkgconfig(nss)
43
BuildRequires:  pkgconfig(python)
44
BuildRequires:  pkgconfig(xscrnsaver)
45
BuildRequires:  pkgconfig(xtst)
46
ExclusiveArch:  %{ix86} x86_64
47
48
%description
49
This package contains proprietary codecs needed for the HTML5
50
(audio and video tags).
51
52
%prep
53
%setup -q -n %{srcname}-%{version}
54
%patch0 -p1
55
%patch1 -p1
56
%patch2 -p1
57
58
mkdir toolchain
59
cp %{SOURCE1} toolchain/BUILD.gn
60
61
if [ ! -f chrome/test/data/webui/i18n_process_css_test.html ]; then
62
    touch chrome/test/data/webui/i18n_process_css_test.html
63
fi
64
65
%build
66
export CC=gcc
67
export CXX=g++
68
CFLAGS="%{optflags}"
69
export CFLAGS="${CFLAGS/-g /}"
70
export CXXFLAGS="${CFLAGS}"
71
72
myconf_gn=""
73
myconf_gn+=" custom_toolchain=\"./toolchain:default\""
74
myconf_gn+=" ffmpeg_branding=\"Chrome\""
75
myconf_gn+=" proprietary_codecs=true"
76
myconf_gn+=" enable_hevc_demuxing=true"
77
myconf_gn+=" use_gconf=false"
78
myconf_gn+=" use_gio=false"
79
myconf_gn+=" use_gnome_keyring=false"
80
myconf_gn+=" use_kerberos=false"
81
myconf_gn+=" use_cups=false"
82
myconf_gn+=" use_sysroot=false"
83
myconf_gn+=" use_gold=false"
84
myconf_gn+=" linux_use_bundled_binutils=false"
85
myconf_gn+=" fatal_linker_warnings=false"
86
myconf_gn+=" treat_warnings_as_errors=false"
87
myconf_gn+=" is_clang=false"
88
myconf_gn+=" is_component_build=true"
89
myconf_gn+=" is_debug=false"
90
myconf_gn+=" symbol_level=0"
91
92
93
tools/gn/bootstrap/bootstrap.py --gn-gen-args "${myconf_gn}"
94
out/Release/gn gen --args="${myconf_gn}" out/Release
95
ninja -C out/Release media/ffmpeg
96
97
%install
98
install -Dm0644 out/Release/libffmpeg.so %{buildroot}%{_libdir}/%{name}/libffmpeg.so
99
100
%files
101
%defattr(-,root,root)
102
%doc AUTHORS LICENSE
103
%dir %{_libdir}/%{name}
104
%{_libdir}/%{name}/libffmpeg.so
105
106
%changelog
107