1 |
%define crname chromium-browser |
2 |
%define _crdir %{_libdir}/%{crname} |
3 |
%define _src %{_topdir}/SOURCES |
4 |
%define basever 39.0.2171.65 |
5 |
|
6 |
# Set up Google API keys, see http://www.chromium.org/developers/how-tos/api-keys |
7 |
# Note: these are for Mageia use ONLY. |
8 |
# For your own builds, please get your own set of keys. |
9 |
%define google_api_key AIzaSyCV9AOzytWwWCtNE8f7ZV56fP1u9yWwhVU |
10 |
%define google_default_client_id 1039996407057.apps.googleusercontent.com |
11 |
%define google_default_client_secret mLT8XooDODav1OJG5G3bY61d |
12 |
|
13 |
%define build_plf 0 |
14 |
|
15 |
%if "%distro_section" == "tainted" |
16 |
%global build_plf 1 |
17 |
%endif |
18 |
|
19 |
Name: chromium-browser-stable |
20 |
Version: %{basever} |
21 |
Release: %mkrel 1 |
22 |
Summary: A fast webkit-based web browser |
23 |
Group: Networking/WWW |
24 |
License: BSD, LGPL |
25 |
Source0: http://commondatastorage.googleapis.com/chromium-browser-official/chromium-%{basever}-mga3.tar.xz |
26 |
Source1: chromium-wrapper |
27 |
Source2: chromium-browser.desktop |
28 |
Patch2: chromium-37.0.2062.120-harfbuzz.patch |
29 |
Patch3: chromium-38.0.2125.104-alignof.patch |
30 |
Provides: %{crname} |
31 |
Obsoletes: chromium-browser-unstable < 26.0.1410.51 |
32 |
Obsoletes: chromium-browser-beta < 26.0.1410.51 |
33 |
Obsoletes: chromium-browser < 1:9.0.597.94 |
34 |
BuildRequires: bison, flex, gtk2-devel, atk-devel, libexpat-devel, gperf |
35 |
BuildRequires: libnspr-devel, libnss-devel, libalsa-devel |
36 |
BuildRequires: libglib2-devel, libbzip2-devel, libz-devel, libpng-devel |
37 |
BuildRequires: libjpeg-devel, libmesagl-devel, libmesaglu-devel |
38 |
BuildRequires: libxscrnsaver-devel, libdbus-glib-devel, libcups-devel |
39 |
BuildRequires: libgnome-keyring-devel libvpx-devel libxtst-devel |
40 |
BuildRequires: libxslt-devel libxml2-devel libxt-devel libpam-devel |
41 |
BuildRequires: libevent-devel libflac-devel libpulseaudio-devel |
42 |
BuildRequires: perl-Switch, libgnutls-devel |
43 |
BuildRequires: libelfutils-devel |
44 |
BuildRequires: udev-devel |
45 |
BuildRequires: speex-devel |
46 |
BuildRequires: minizip-devel |
47 |
BuildRequires: yasm |
48 |
BuildRequires: pkgconfig(libusb-1.0) |
49 |
BuildRequires: speech-dispatcher-devel |
50 |
BuildRequires: pkgconfig(libpci) |
51 |
BuildRequires: python-pyxml |
52 |
BuildRequires: cap-devel |
53 |
BuildRequires: ninja |
54 |
BuildRequires: pkgconfig(libexif) |
55 |
ExclusiveArch: i586 x86_64 armel |
56 |
|
57 |
%description |
58 |
Chromium is a browser that combines a minimal design with sophisticated |
59 |
technology to make the web faster, safer, and easier. |
60 |
|
61 |
This is the stable channel Chromium browser. It offers a rock solid |
62 |
browser which is updated with features and fixes once they have been |
63 |
thoroughly tested. If you want the latest features, install the |
64 |
chromium-browser-unstable package instead. |
65 |
|
66 |
%package -n chromium-browser |
67 |
Summary: A fast webkit-based web browser (transition package) |
68 |
Epoch: 1 |
69 |
Group: Networking/WWW |
70 |
Requires: %{name} = %{version}-%{release} |
71 |
|
72 |
%description -n chromium-browser |
73 |
Chromium is a browser that combines a minimal design with sophisticated |
74 |
technology to make the web faster, safer, and easier. |
75 |
|
76 |
This is a transition package that installs the stable channel Chromium |
77 |
browser. If you prefer the dev channel browser, install the |
78 |
chromium-browser-unstable package instead. |
79 |
|
80 |
%prep |
81 |
%setup -q -n chromium |
82 |
#-%{basever} |
83 |
cd src |
84 |
%apply_patches |
85 |
|
86 |
# Hard code extra version |
87 |
FILE=chrome/common/chrome_version_info_posix.cc |
88 |
sed -i.orig -e 's/getenv("CHROME_VERSION_EXTRA")/"%{product_vendor} %{product_version}"/' $FILE |
89 |
cmp $FILE $FILE.orig && exit 1 |
90 |
|
91 |
%build |
92 |
cd src |
93 |
%define system_gyp_flags -Duse_system_yasm=1 -Duse_system_zlib=1 |
94 |
export GYP_GENERATORS=ninja |
95 |
build/gyp_chromium --depth=. \ |
96 |
-Dlinux_sandbox_path=%{_crdir}/chrome-sandbox \ |
97 |
-Dlinux_sandbox_chrome_path=%{_crdir}/chrome \ |
98 |
-Dlinux_link_gnome_keyring=0 \ |
99 |
-Duse_gconf=0 \ |
100 |
-Dwerror='' \ |
101 |
%{system_gyp_flags} \ |
102 |
-Duse_system_sqlite=0 \ |
103 |
-Duse_system_libxml=1 \ |
104 |
-Duse_system_bzip2=1 \ |
105 |
-Duse_system_xdg_utils=1 \ |
106 |
-Duse_system_libpng=1 \ |
107 |
-Duse_system_libjpeg=1 \ |
108 |
-Duse_system_libevent=1 \ |
109 |
-Duse_system_flac=1 \ |
110 |
-Duse_system_vpx=0 \ |
111 |
-Duse_system_icu=0 \ |
112 |
-Duse_system_libusb=1 \ |
113 |
-Dlinux_use_tcmalloc=0 \ |
114 |
-Duse_system_minizip=1 \ |
115 |
-Duse_system_protobuf=0 \ |
116 |
-Ddisable_nacl=1 \ |
117 |
-Dlinux_use_gold_binary=0 \ |
118 |
-Dlinux_use_gold_flags=0 \ |
119 |
-Dclang=0 \ |
120 |
%if %{build_plf} |
121 |
-Dproprietary_codecs=1 \ |
122 |
-Dffmpeg_branding=Chrome \ |
123 |
%else |
124 |
-Dproprietary_codecs=0 \ |
125 |
%endif |
126 |
-Duse_system_speex=1 \ |
127 |
%ifarch i586 |
128 |
-Ddisable_sse2=1 \ |
129 |
-Drelease_extra_cflags="-march=i586" \ |
130 |
%endif |
131 |
-Duse_aura=1 \ |
132 |
-Dgoogle_api_key=%{google_api_key} \ |
133 |
-Dgoogle_default_client_id=%{google_default_client_id} \ |
134 |
-Dgoogle_default_client_secret=%{google_default_client_secret} \ |
135 |
-Dpython_ver=2.7 \ |
136 |
-Dsystem_libdir=%{_lib} \ |
137 |
|
138 |
ninja -C out/Release chrome chrome_sandbox |
139 |
|
140 |
%install |
141 |
cd src |
142 |
ls out/Release |
143 |
mkdir -p %{buildroot}%{_bindir} |
144 |
mkdir -p %{buildroot}%{_crdir}/locales |
145 |
mkdir -p %{buildroot}%{_crdir}/themes |
146 |
mkdir -p %{buildroot}%{_crdir}/default_apps |
147 |
mkdir -p %{buildroot}%{_mandir}/man1 |
148 |
install -m 755 %{_sourcedir}/chromium-wrapper %{buildroot}%{_crdir}/ |
149 |
install -m 755 out/Release/chrome %{buildroot}%{_crdir}/ |
150 |
install -m 4755 out/Release/chrome_sandbox %{buildroot}%{_crdir}/chrome-sandbox |
151 |
install -m 644 out/Release/chrome.1 %{buildroot}%{_mandir}/man1/%{crname}.1 |
152 |
install -m 755 out/Release/libffmpegsumo.so %{buildroot}%{_crdir}/ |
153 |
install -m 644 out/Release/locales/*.pak %{buildroot}%{_crdir}/locales/ |
154 |
install -m 644 out/Release/*.pak %{buildroot}%{_crdir}/ |
155 |
install -m 644 out/Release/icudtl.dat %{buildroot}%{_crdir}/ |
156 |
install -m 644 chrome/browser/resources/default_apps/* %{buildroot}%{_crdir}/default_apps/ |
157 |
|
158 |
ln -s %{_crdir}/chromium-wrapper %{buildroot}%{_bindir}/%{crname} |
159 |
|
160 |
find out/Release/resources/ -name "*.d" -exec rm {} \; |
161 |
cp -r out/Release/resources %{buildroot}%{_crdir} |
162 |
|
163 |
# desktop file |
164 |
mkdir -p %{buildroot}%{_datadir}/applications |
165 |
install -m 644 %{_sourcedir}/%{crname}.desktop %{buildroot}%{_datadir}/applications/ |
166 |
|
167 |
# icon |
168 |
for i in 22 24 48 64 128 256; do |
169 |
mkdir -p %{buildroot}%{_iconsdir}/hicolor/${i}x${i}/apps |
170 |
install -m 644 chrome/app/theme/chromium/product_logo_$i.png \ |
171 |
%{buildroot}%{_iconsdir}/hicolor/${i}x${i}/apps/%{crname}.png |
172 |
done |
173 |
|
174 |
for i in 16 26 32; do |
175 |
mkdir -p %{buildroot}%{_iconsdir}/hicolor/${i}x${i}/apps |
176 |
install -m 644 chrome/app/theme/default_100_percent/chromium/product_logo_$i.png \ |
177 |
%{buildroot}%{_iconsdir}/hicolor/${i}x${i}/apps/%{crname}.png |
178 |
done |
179 |
|
180 |
%files -n chromium-browser |
181 |
|
182 |
%files |
183 |
%{_bindir}/%{crname} |
184 |
%{_crdir}/chromium-wrapper |
185 |
%{_crdir}/chrome |
186 |
%{_crdir}/chrome-sandbox |
187 |
%{_crdir}/icudtl.dat |
188 |
%{_crdir}/libffmpegsumo.so |
189 |
%{_crdir}/locales |
190 |
%{_crdir}/chrome_100_percent.pak |
191 |
%{_crdir}/content_resources.pak |
192 |
%{_crdir}/keyboard_resources.pak |
193 |
%{_crdir}/resources.pak |
194 |
%{_crdir}/resources |
195 |
%{_crdir}/themes |
196 |
%{_crdir}/default_apps |
197 |
%{_mandir}/man1/%{crname}* |
198 |
%{_datadir}/applications/*.desktop |
199 |
%{_iconsdir}/hicolor/*/apps/%{crname}.png |