1 |
%define crname chromium-browser |
2 |
%define _crdir %{_libdir}/%{crname} |
3 |
|
4 |
# Set up Google API keys, see http://www.chromium.org/developers/how-tos/api-keys |
5 |
# Note: these are for Mageia use ONLY. |
6 |
# For your own builds, please get your own set of keys. |
7 |
%define google_api_key AIzaSyCV9AOzytWwWCtNE8f7ZV56fP1u9yWwhVU |
8 |
%define google_default_client_id 1039996407057.apps.googleusercontent.com |
9 |
%define google_default_client_secret mLT8XooDODav1OJG5G3bY61d |
10 |
|
11 |
Name: chromium-browser-stable |
12 |
Version: 46.0.2490.71 |
13 |
Release: %mkrel 1 |
14 |
Summary: A fast webkit-based web browser |
15 |
Group: Networking/WWW |
16 |
License: BSD, LGPL |
17 |
URL: http://www.chromium.org/Home |
18 |
# http://omahaproxy.appspot.com/ |
19 |
# http://googlechromereleases.blogspot.com/ |
20 |
Source0: http://commondatastorage.googleapis.com/chromium-browser-official/chromium-%{version}.tar.xz |
21 |
Source1: chromium-wrapper |
22 |
Source2: chromium-browser.desktop |
23 |
# (cjw) Don't disable deprecated APIs in ffmpeg header files, some of which change the ABI. |
24 |
# From debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=763632 |
25 |
Patch5: fix_for_system_ffmpeg_ABI.patch |
26 |
# (cjw) Recognize mimetypes for matroska (.mkv) and AVI (.avi) formats (video/x-matroska and audio/x-matroska, video/x-msvideo) |
27 |
Patch6: chromium-40-matroska-avi.patch |
28 |
# (cjw) Handle A52 "AC3" and DTS compressed audio. |
29 |
Patch7: chromium-40-ac3-dts.patch |
30 |
# (cjw) Do not use ffmpeg internal header(s) |
31 |
Patch9: chromium-43-no-ffmpeg-internal.patch |
32 |
# (cjw) disable external components -- this stops chromium from downloading hotword stuff, for example |
33 |
Patch10: chromium-45-no-external-components.patch |
34 |
# (debian) disable third party cookies by default |
35 |
Patch11: chromium-third-party-cookies-off-by-default.patch |
36 |
Provides: %{crname} |
37 |
Obsoletes: chromium-browser-unstable < 26.0.1410.51 |
38 |
Obsoletes: chromium-browser-beta < 26.0.1410.51 |
39 |
Obsoletes: chromium-browser < 1:9.0.597.94 |
40 |
BuildRequires: bison |
41 |
BuildRequires: flex |
42 |
BuildRequires: gperf |
43 |
BuildRequires: icu |
44 |
BuildRequires: ninja |
45 |
BuildRequires: yasm |
46 |
BuildRequires: atk-devel |
47 |
BuildRequires: bzip2-devel |
48 |
BuildRequires: cups-devel |
49 |
BuildRequires: dbus-glib-devel |
50 |
BuildRequires: elfutils-devel |
51 |
BuildRequires: expat-devel |
52 |
BuildRequires: ffmpeg-devel |
53 |
BuildRequires: glib2-devel |
54 |
BuildRequires: gtk2-devel |
55 |
BuildRequires: harfbuzz-devel |
56 |
BuildRequires: jpeg-devel |
57 |
BuildRequires: libalsa-devel |
58 |
BuildRequires: libevent-devel |
59 |
BuildRequires: libflac-devel |
60 |
BuildRequires: libgnome-keyring-devel |
61 |
BuildRequires: libgnutls-devel |
62 |
BuildRequires: libicu-devel |
63 |
BuildRequires: libmesagl-devel |
64 |
BuildRequires: libmesaglu-devel |
65 |
BuildRequires: libnspr-devel |
66 |
BuildRequires: libnss-devel |
67 |
BuildRequires: libpam-devel |
68 |
BuildRequires: libpng-devel |
69 |
BuildRequires: libpulseaudio-devel |
70 |
BuildRequires: libvpx-devel |
71 |
BuildRequires: libxml2-devel |
72 |
BuildRequires: libxscrnsaver-devel |
73 |
BuildRequires: libxslt-devel |
74 |
BuildRequires: libxt-devel |
75 |
BuildRequires: libxtst-devel |
76 |
BuildRequires: libz-devel |
77 |
BuildRequires: minizip-devel |
78 |
BuildRequires: speech-dispatcher-devel |
79 |
BuildRequires: snappy-devel |
80 |
BuildRequires: speex-devel |
81 |
BuildRequires: udev-devel |
82 |
BuildRequires: perl-Switch |
83 |
BuildRequires: pkgconfig(libexif) |
84 |
BuildRequires: pkgconfig(libpci) |
85 |
BuildRequires: pkgconfig(libusb-1.0) |
86 |
BuildRequires: pkgconfig(libwebp) |
87 |
BuildRequires: cap-devel |
88 |
# Unused but building gn wants ot to be present |
89 |
BuildRequires: pkgconfig(gconf-2.0) |
90 |
ExclusiveArch: i586 x86_64 armel |
91 |
|
92 |
%description |
93 |
Chromium is a browser that combines a minimal design with sophisticated |
94 |
technology to make the web faster, safer, and easier. |
95 |
|
96 |
This is the stable channel Chromium browser. It offers a rock solid |
97 |
browser which is updated with features and fixes once they have been |
98 |
thoroughly tested. If you want the latest features, install the |
99 |
chromium-browser-unstable package instead. |
100 |
|
101 |
%package -n chromium-browser |
102 |
Summary: A fast webkit-based web browser (transition package) |
103 |
Epoch: 1 |
104 |
Group: Networking/WWW |
105 |
Requires: %{name} = %{version}-%{release} |
106 |
|
107 |
%description -n chromium-browser |
108 |
Chromium is a browser that combines a minimal design with sophisticated |
109 |
technology to make the web faster, safer, and easier. |
110 |
|
111 |
This is a transition package that installs the stable channel Chromium |
112 |
browser. If you prefer the dev channel browser, install the |
113 |
chromium-browser-unstable package instead. |
114 |
|
115 |
%prep |
116 |
%setup -q -n chromium-%{version} |
117 |
%autopatch -p1 |
118 |
|
119 |
# files we do not want from upstream source bundles |
120 |
rm -rf breakpad/src/processor/testdata/ |
121 |
rm -rf chrome/app/test_data/dlls/ |
122 |
rm -rf chrome/common/extensions/docs/ |
123 |
rm -rf chrome/test/data/ |
124 |
rm -rf chrome/tools/test/reference_build/chrome_linux/ |
125 |
rm -rf components/test/data/component_updater/jebgalgnebhfojomionfpkfelancnnkf/component1.dll |
126 |
rm -rf content/test/data/ |
127 |
rm -rf net/data/ |
128 |
rm -rf ppapi/examples/ |
129 |
rm -rf ppapi/native_client/tests/ |
130 |
rm -rf third_party/apache-win32/ |
131 |
rm -rf third_party/binutils/ |
132 |
rm -rf third_party/expat/files/ |
133 |
rm -rf third_party/ffmpeg/*/* |
134 |
rm -rf third_party/ffmpeg/*.[ch] |
135 |
rm -rf third_party/flac/include |
136 |
rm -rf third_party/flac/src |
137 |
rm -rf third_party/icu/android |
138 |
rm -rf third_party/icu/linux |
139 |
rm -rf third_party/icu/mac |
140 |
rm -rf third_party/icu/patches |
141 |
rm -rf third_party/icu/public |
142 |
rm -rf third_party/icu/source |
143 |
rm -rf third_party/icu/windows |
144 |
rm -rf third_party/lcov |
145 |
rm -rf third_party/libevent/*/* |
146 |
rm -rf third_party/libevent/*.[ch] |
147 |
rm -rf libexif/sources |
148 |
rm -rf libjpeg/*.[ch] |
149 |
rm -rf libjpeg_turbo |
150 |
rm -rf libpng/*.[ch] |
151 |
rm -rf libxslt/libexslt |
152 |
rm -rf libxslt/libxslt |
153 |
rm -rf libxslt/linux |
154 |
rm -rf libxslt/mac |
155 |
rm -rf libxslt/win32 |
156 |
rm -rf mesa/src/src |
157 |
rm -rf swig |
158 |
rm -rf third_party/WebKit/LayoutTests/ |
159 |
rm -rf third_party/WebKit/Tools/Scripts/ |
160 |
rm -rf third_party/xdg-utils/tests/ |
161 |
rm -rf third_party/yasm/source/ |
162 |
rm -rf tools/gyp/test/ |
163 |
rm -rf v8/test/ |
164 |
|
165 |
# Hard code extra version |
166 |
FILE=chrome/common/chrome_version_info_posix.cc |
167 |
sed -i.orig -re 's/char\s*\*(.*)getenv\("CHROME_VERSION_EXTRA"\)/char const *\1"%{product_vendor} %{product_version}"/' $FILE |
168 |
cmp $FILE $FILE.orig && exit 1 |
169 |
|
170 |
%build |
171 |
# TODO -Duse_system_libsrtp=1 -Duse_system_jsoncpp=1 |
172 |
# These don't do anything: -Duse_system_libexif=1 -Duse_system_mesa=1 |
173 |
%define system_gyp_flags -Duse_system_ffmpeg=1 -Duse_system_sqlite=0 -Duse_system_libxml=1 -Duse_system_zlib=1 -Duse_system_bzip2=1 -Duse_system_xdg_utils=1 -Duse_system_libpng=1 -Duse_system_libjpeg=1 -Duse_system_libevent=1 -Duse_system_flac=1 -Duse_system_libvpx=1 -Duse_system_icu=1 -Duse_system_libusb=0 -Duse_system_minizip=1 -Duse_system_protobuf=0 -Duse_system_opus=1 -Duse_system_snappy=1 -Duse_system_speex=1 -Duse_system_yasm=1 -Duse_system_harfbuzz=1 -Duse_system_expat=1 -Duse_system_libxslt=1 -Duse_system_libwebp=1 |
174 |
|
175 |
build/linux/unbundle/replace_gyp_files.py %{system_gyp_flags} |
176 |
|
177 |
export GYP_GENERATORS=ninja |
178 |
build/gyp_chromium --depth=. \ |
179 |
-D linux_sandbox_path=%{_crdir}/chrome-sandbox \ |
180 |
-D linux_sandbox_chrome_path=%{_crdir}/chrome \ |
181 |
-D linux_link_gnome_keyring=0 \ |
182 |
-D use_gconf=0 \ |
183 |
%{system_gyp_flags} \ |
184 |
-D werror='' \ |
185 |
-D use_allocator=none \ |
186 |
-D disable_nacl=1 \ |
187 |
-D linux_use_gold_flags=1 \ |
188 |
-D disable_fatal_linker_warnings=1 \ |
189 |
-D clang=0 \ |
190 |
-D proprietary_codecs=1 \ |
191 |
%ifarch i586 |
192 |
-D disable_sse2=1 \ |
193 |
-D release_extra_cflags="-march=i586 -D_XOPEN_SOURCE=600 -D_DEFAULT_SOURCE=1" \ |
194 |
%else |
195 |
-D release_extra_cflags="-D_XOPEN_SOURCE=600 -D_DEFAULT_SOURCE=1" \ |
196 |
%endif |
197 |
-D google_api_key=%{google_api_key} \ |
198 |
-D google_default_client_id=%{google_default_client_id} \ |
199 |
-D google_default_client_secret=%{google_default_client_secret} \ |
200 |
-D python_ver=2.7 \ |
201 |
-D system_libdir=%{_lib} \ |
202 |
|
203 |
ninja -C out/Release chrome chrome_sandbox |
204 |
|
205 |
%install |
206 |
ls out/Release |
207 |
mkdir -p %{buildroot}%{_bindir} |
208 |
mkdir -p %{buildroot}%{_crdir}/locales |
209 |
mkdir -p %{buildroot}%{_crdir}/themes |
210 |
mkdir -p %{buildroot}%{_crdir}/default_apps |
211 |
mkdir -p %{buildroot}%{_mandir}/man1 |
212 |
install -m 755 %{_sourcedir}/chromium-wrapper %{buildroot}%{_crdir}/ |
213 |
install -m 755 out/Release/chrome %{buildroot}%{_crdir}/ |
214 |
install -m 4755 out/Release/chrome_sandbox %{buildroot}%{_crdir}/chrome-sandbox |
215 |
install -m 644 out/Release/chrome.1 %{buildroot}%{_mandir}/man1/%{crname}.1 |
216 |
install -m 644 out/Release/chrome_100_percent.pak %{buildroot}%{_crdir}/ |
217 |
install -m 644 out/Release/resources.pak %{buildroot}%{_crdir}/ |
218 |
install -m 644 out/Release/natives_blob.bin %{buildroot}%{_crdir}/ |
219 |
install -m 644 out/Release/snapshot_blob.bin %{buildroot}%{_crdir}/ |
220 |
install -m 644 out/Release/content_resources.pak %{buildroot}%{_crdir}/ |
221 |
install -m 644 out/Release/keyboard_resources.pak %{buildroot}%{_crdir}/ |
222 |
install -m 755 out/Release/mksnapshot %{buildroot}%{_crdir}/ |
223 |
install -m 644 out/Release/locales/*.pak %{buildroot}%{_crdir}/locales/ |
224 |
install -m 644 chrome/browser/resources/default_apps/* %{buildroot}%{_crdir}/default_apps/ |
225 |
ln -s %{_crdir}/chromium-wrapper %{buildroot}%{_bindir}/%{crname} |
226 |
|
227 |
find out/Release/resources/ -name "*.d" -exec rm {} \; |
228 |
cp -r out/Release/resources %{buildroot}%{_crdir} |
229 |
|
230 |
# desktop file |
231 |
mkdir -p %{buildroot}%{_datadir}/applications |
232 |
install -m 644 %{_sourcedir}/%{crname}.desktop %{buildroot}%{_datadir}/applications/ |
233 |
|
234 |
# symlink to ICU data file |
235 |
ICUDATADIR=$(icuinfo | grep \"icudata.path\" | sed -re 's/^.*>(.*)<.*$/\1/') |
236 |
ICUDATANAME=$(icuinfo | grep \"icudata.name\" | sed -re 's/^.*>(.*)<.*$/\1/') |
237 |
ICUDATAFILE=$(realpath --relative-to=%{_crdir}/ ${ICUDATADIR}/${ICUDATANAME}.dat) |
238 |
ln -s ${ICUDATAFILE} %{buildroot}%{_crdir}/icudtl.dat |
239 |
|
240 |
# icon |
241 |
for i in 22 24 48 64 128 256; do |
242 |
mkdir -p %{buildroot}%{_iconsdir}/hicolor/${i}x${i}/apps |
243 |
install -m 644 chrome/app/theme/chromium/product_logo_$i.png \ |
244 |
%{buildroot}%{_iconsdir}/hicolor/${i}x${i}/apps/%{crname}.png |
245 |
done |
246 |
|
247 |
for i in 16 26 32; do |
248 |
mkdir -p %{buildroot}%{_iconsdir}/hicolor/${i}x${i}/apps |
249 |
install -m 644 chrome/app/theme/default_100_percent/chromium/product_logo_$i.png \ |
250 |
%{buildroot}%{_iconsdir}/hicolor/${i}x${i}/apps/%{crname}.png |
251 |
done |
252 |
|
253 |
%files -n chromium-browser |
254 |
|
255 |
%files |
256 |
%{_bindir}/%{crname} |
257 |
%dir %{_crdir} |
258 |
%{_crdir}/chromium-wrapper |
259 |
%{_crdir}/chrome |
260 |
%attr(4755,root,root) %{_crdir}/chrome-sandbox |
261 |
%{_crdir}/icudtl.dat |
262 |
%{_crdir}/locales |
263 |
%{_crdir}/natives_blob.bin |
264 |
%{_crdir}/snapshot_blob.bin |
265 |
%{_crdir}/chrome_100_percent.pak |
266 |
%{_crdir}/content_resources.pak |
267 |
%{_crdir}/keyboard_resources.pak |
268 |
%{_crdir}/resources.pak |
269 |
%{_crdir}/resources |
270 |
%{_crdir}/mksnapshot |
271 |
%{_crdir}/themes |
272 |
%{_crdir}/default_apps |
273 |
%{_mandir}/man1/%{crname}* |
274 |
%{_datadir}/applications/*.desktop |
275 |
%{_iconsdir}/hicolor/*/apps/%{crname}.png |